PHP环境配置:Apach+Tomcat+mysql+php
1》下载需要的软件:
Apache : apache_2.0.55-win32-x86-no_ssl.msi http://httpd.apache.org/
Tomcat : apache-tomcat-5.5.23.exe http://tomcat.apache.org/
Php : php-5.1.2-Win32.zip http://www.php.net
Mysql : mysql-5.0.19-win32.zip http://www.mysql.org
PhpMyAdmin : phpMyAdmin-2.8 http://www.phpmyadmin.org
JDK :jdk-6-windows-i586.exe http://java.sun.com
JK插件:mod_jk-apache-2.0.59.so http://tomcat.apache.org/download-connectors.cgi
2》安装软件
<1>安装Apache
在安装的过程中将会出现叫你填服务器的地址
我是这样写的:
127.0.0.1 或者localhost 或者是真实的ip地址或域名
127.0.0.1
your@126.com 也就是你的油箱
我的Apache的安装目录是:D:\php\Apache2
<2>安装JDK环境
我的JDK的安装目录是:C:\java\jdk1.6.0
并增加JAVA_HOME和PATH变量
分别是:JAVA_HOME=C:\java\jdk1.6.0
PATH=%JAVA_HOME%\bin
<3>安装Tomcat
Tomcat我采用的是默认安装
安装目录是:D:\php\Tomcat 5.5
<4>安装Mysql数据库
我的安装密码是:root
默认数据库编码是:utf-8
安装的目录是:D:\php\Tomcat 5.5
<5>安装php
我的php的安装目录是:D:\php\php
3》配置服务器,使能够提供jsp,php服务
<1>配置php
将php安装目录下的php.ini-dist文件改名为php.ini
php.ini文件中主要修改 Extensions
如果你需要修改其它的php配置,可以参考http;//php.net上的配置说明
修改办法:将扩展加入文件当中
并将:
extension=php_mbstring.dll
extension=php_dbase.dll
extension=php_gd2.dll
extension=php_mysql.dll
这些扩展前面的分号去掉
我做的修改是:
extension_dir = "d:/php/php/ext/"
extension=php_mbstring.dll
extension=php_dbase.dll
extension=php_gd2.dll
extension=php_mysql.dll
修改后的样子是这样的:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
extension_dir = "d:/php/php/ext/"
extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll &n