Redhat Enterprise5.0 httpd-2.2.11+mysql5.1.32+php5.29 环境搭建。

1》首先装MYSQL

http://dev.mysql.com/downloads/mysql/5.1.html#linux-rhel5-x86-32bit-rpms

下的都是RPM包很方便。

Server : http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.32-0.rhel5.i386.rpm/from/http://mysql.skynet.be/

Client: http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-community-5.1.32-0.rhel5.i386.rpm/from/http://mysql.skynet.be/

Share-Libraries : http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-community-5.1.32-0.rhel5.i386.rpm/from/http://mysql.skynet.be/

 

Share-Libraries 是编译时需要的头文件。

 

 

2》安装apache

 

去www.apache.org下载httpd-2.2.11.tar.gz

 

#tar -zxvf httpd-2.2.11.tar.gz

#cd   httpd-2.2.11

#./configure  --prefix=/usr/local/apache --enable-module=so
#make
#make install

 

3》安装php

去www.php.net下载php-5.2.9.tar.bz2

安装php前我用yum 安装了一些扩展。

 

#yum install zlib-devel

#yum install libpng

#yum install freetype-devel

#yum install libjpeg-devel

#yum install gd-devel

 

#tar jxvf php-5.2.9.tar.bz2

#cd php-5.2.9

 

#./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/share/mysql --with-gd --with-zlib --with-libpng --with-jpeg --with-freetype --enable-sockets --with-iconv --enable-mbstring --enable-track-vars --enable-force-cgi-redirect --with-config-file-path=/usr/local/php5/etc

#make
#make install

#cp php.ini.dist  /usr/local/php5/etc/php.ini

 

4》让apache解析 php

 #vi /usr/local/apche/conf/httpd.conf

====================================================

1》在 AddType application/x-gzip .gz .tgz下添加
     AddType application/x-httpd-php .php

2》在DirectoryIndex里添加index.php

DirectoryIndex index.php index.html

 

5》重新开启apache

#httpd -k stop

#httpd -k start

 

6》建立php测试页

#vi /usr/local/apache/htdocs/test.php

============================================

<?php

phpinfo();

?>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值