升级安装apache
时间:2006-03-21 来源:Digico
升级安装apache
[root@lulu /]# whereis apache
apache: /usr/local/apache
(可把apache_1.3.33.tar.gz 放在此目录下)
[root@lulu apache]# gunzip apache_1.3.33.tar.gz
[root@lulu apache]# ls
apache_1.3.33.tar
[root@lulu apache]# tar -xvf apache_1.3.33.tar
....(编译)
[root@lulu apache]# ls
apache_1.3.33
[root@lulu apache]# cd apache_1.3.33
[root@lulu apache_1.3.33]# ./configure --prefix=/usr/local/apache --enable-module=so
.....(编译)
[root@lulu apache_1.3.33]# make
.....(编译)
[root@lulu apache_1.3.33]# make install
.....(编译)
此时 新版apache已经安装完成
但需要重启 apache
[root@lulu ]# cd /usr/local/apache/bin
[root@lulu bin]# ls
* apachectl * * *
[root@lulu bin]# ./apachectl stop (停止apache)
....
[root@lulu bin]# ./apachectl start (重启apache)
....
[root@lulu bin]# ./httpd -v (查看版本号)
Server version: Apache/1.3.33 (Unix)
Server built: Apr 11 2005 10:57:13
此时~ apache 已经升级完毕了。
升级安装php
[root@lulu /]# whereis php
php: /usr/local/bin/php /usr/local/lib/php /usr/local/lib/php.ini /usr/local/php
(可把apache_1.3.33.tar.gz 放在此目录下/usr/local/php)
[root@lulu /]# cd /usr/local/php
[root@lulu php]# ls
php-4.3.8.tar.gz php-5.0.0.tar.gz
[root@lulu php]# gunzip php-4.3.8.tar.gz
[root@lulu php]# ls
php-4.3.8.tar
[root@lulu php]# tar -xvf php-4.3.8.tar
.......(编译)
[root@lulu php]# ls
php-4.3.8
[root@lulu php]# php -i |grep config
Configure Command => './configure' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-oci8' '--with-apxs=/usr/local/apache/bin/apxs' '--with-zlib-dir=/usr/local/lib' '--with-iconv' '--with-mysql'
(将'./configure' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-oci8' '--with-apxs=/usr/local/apache/bin/apxs' '--with-zlib-dir=/usr/local/lib' '--with-iconv' '--with-mysql' 中引号去掉)
[root@lulu php]# cd php-4.3.8
[root@lulu php-4.3.8]# ./configure --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-oci8 --with-apxs=/usr/local/apache/bin/apxs --with-zlib-dir=/usr/local/lib --with-iconv --with-mysql
...........(编译)
[root@lulu php-4.3.8]# make
...........(编译)
[root@lulu php-4.3.8]# make install
...........(编译)
最后需要重启 apache 即可 (方法同上)
查看 php版本 vi phpinfo() 在web上输出就行了。
mysql 升级未做 因为要备份数据库~好麻烦~ 暂时 ``没有升级 日后补了!
相关阅读 更多 +