Mysql 并没有重新安装:只修改了mysql的root用户的远程调用功能
1. 用root用户登录mysql
2. use msyql
3. update user set host=’%’ where user=’root ’ and host=’localhost’;
4, flush privileges;
5. 重启msyql
6. 重新安装mysql-devel-5.0.22-2.1.i386.rpm mysql开发包,
Rpm –ivh mysql-devel-5.0.22-2.1.i386.rpm 安装完成 php安装包依赖于这个包
7. 关闭防火墙
2. 安装apache
一、准备好安装包:
①apr-1.3.9.tar.gz 下载地址:http://apr.apache.org/
②apr-util-1.3.9.tar.gz
⑤httpd-2.2.14.tar.gz 下载地址:http://httpd.apache.org/
二、开始安装:把以上安装包上传至/usr/local目录,cd /usr/local 进入该目录
1、安装apr
tar zxvf apr-1.3.9.tar.gz
cd apr-1.3.9
./configure
make
make install
2、安装apr-util
tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --with-apr=/usr/local/apr
make
make install
3、安装 apache
tar zxvf httpd-2.2.14.tar.gz
cd httpd-2.2.14
./configure --prefix=/usr/local/apache2 --enable-dav --enable-so --enable-maintainer-mode --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config #--prefix表示把apache安装在指定目录
make
make install
/usr/local/apache2/bin/apachectl start //启动
//打开浏览器http://localhost/如果有测试页"It works!"出现则证明已经安装成功。
3. php5.2 安装
tar zxvf php-5.2.13.tar.gz
cd php-5.2
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib-dir --with-bz2 --with-tiff-dir --with-libxml-dir --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring --with-mysql=/usr/lib/mysql --with-config-file-path=/etc --disable-ipv6 --enable-gd-native-ttf --enable-libxml --enable-xml
Make
Make install
vi /usr/local/apache/conf/httpd.conf 在最后加入下面二个参数
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
chcon -t textrel_shlib_t /usr/local/apache2/modules/libphp5.so
成功配置后重启apache :/usr/local/apache2/bin/apachectl restart
1. 用root用户登录mysql
2. use msyql
3. update user set host=’%’ where user=’root ’ and host=’localhost’;
4, flush privileges;
5. 重启msyql
6. 重新安装mysql-devel-5.0.22-2.1.i386.rpm mysql开发包,
Rpm –ivh mysql-devel-5.0.22-2.1.i386.rpm 安装完成 php安装包依赖于这个包
7. 关闭防火墙
2. 安装apache
一、准备好安装包:
①apr-1.3.9.tar.gz 下载地址:http://apr.apache.org/
②apr-util-1.3.9.tar.gz
⑤httpd-2.2.14.tar.gz 下载地址:http://httpd.apache.org/
二、开始安装:把以上安装包上传至/usr/local目录,cd /usr/local 进入该目录
1、安装apr
tar zxvf apr-1.3.9.tar.gz
cd apr-1.3.9
./configure
make
make install
2、安装apr-util
tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --with-apr=/usr/local/apr
make
make install
3、安装 apache
tar zxvf httpd-2.2.14.tar.gz
cd httpd-2.2.14
./configure --prefix=/usr/local/apache2 --enable-dav --enable-so --enable-maintainer-mode --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config #--prefix表示把apache安装在指定目录
make
make install
/usr/local/apache2/bin/apachectl start //启动
//打开浏览器http://localhost/如果有测试页"It works!"出现则证明已经安装成功。
3. php5.2 安装
tar zxvf php-5.2.13.tar.gz
cd php-5.2
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib-dir --with-bz2 --with-tiff-dir --with-libxml-dir --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring --with-mysql=/usr/lib/mysql --with-config-file-path=/etc --disable-ipv6 --enable-gd-native-ttf --enable-libxml --enable-xml
Make
Make install
vi /usr/local/apache/conf/httpd.conf 在最后加入下面二个参数
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
chcon -t textrel_shlib_t /usr/local/apache2/modules/libphp5.so
成功配置后重启apache :/usr/local/apache2/bin/apachectl restart