一、安装程序
apache:httpd-2.2.17.tar
mysql:MySQL-client-5.5.9-1.rhel5.x86_64.rpm
MySQL-devel-5.5.9-1.rhel5.x86_64.rpm (usr/include/mysql/mysql.h)
MySQL-server-5.5.9-1.rhel5.x86_64.rpm
MySQL-shared-5.5.9-1.rhel5.x86_64.rpm(/usr/lib64/libmysqlclient.so.16.0.0)
php:php-5.3.5.tar.gz
二、安装过程
1.apache
解压 tar xvf httpd-2.2.17.tar
cdhttpd-2.2.17
配置$ ./configure --prefix=/home/xxxx/apache-2.2.17
编译$ make
安装$ make install
2.mysql
rpm -ivh MySQL-server-5.5.9-1.rhel5.x86_64.rpm(其他同)
启动mysql /etc/ini.d/mysql start
3.php
解压:gunzip php-5.3.5.tar.gz
tar xvf php-5.3.5.tar
配置$./configure --prefix=/home/xxxx/php5
--with-apxs2=home/xxxx/apache-2.2.17/bin/apxs
--with-Mysql=/usr
4.修改apache配置文件httpd.conf
vi /home/xxxx/apache-2.2.17/conf/httpd.conf
修改
.....
Options FollowSymLinks
....
修改
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index.php default.php default.phtml default.php3 default.html default.htm index.html
添加
AddType application/x-httpd-php .php .phtml .php3 .php4 .php5 .inc
AddType application/x-httpd-php-source .phps
保存退出
三、测试
测试页info.php
〈?php
phpinfo();
?>
正常的话,可以看到php的信息
分享到:
2011-02-16 17:47
浏览 1119
评论