Linux下安装http+php+zend步骤
Linux下安装http+php+zend步骤:
1,首先先卸载软件包 《卸载系统默认的httpd,php》
使用rpm -qa|grep 软件包名 从下往上卸载 rpm -e 包名 一级一级的找。。
2,下载以下软件包
wget http://downloads.serveropt.com/linux/httpd-2.2.6.tar.bz2
wget http://cn2.php.net/get/php-5.2.4.tar.bz2/from/this/mirror
wget http://downloads.serveropt.com/linux/gd-2.0.34.tar.bz2
wget http://downloads.serveropt.com/linux/libxml2-2.6.30.tar.gz
wget http://downloads.serveropt.com/linux/openssl-0.9.8e.tar.gz
wget http://downloads.serveropt.com/linux/libmcrypt-2.5.8.tar.bz2
wget http://downloads.serveropt.com/linux/ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz
3,解压软件包
Tar.gz结尾的软件包用 tar xzvf来解压
tar xjvf httpd-2.2.6.tar.bz2
tar xjvf php-5.2.4.tar.bz2
tar xjvf gd-2.0.34.tar.bz2
tar xjvf libxml2-2.6.30.tar.gz
tar xzvf openssl-0.9.8e.tar.gz
tar xjvf libmcrypt-2.5.8.tar.bz2
tar xzvf ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz
4,升级linux系统 《更新》
Yum update
5,编译安装软件包 《顺序安装》
(1)安装apache <httpd>:
[root@localhost ~]# cd httpd-2.2.6
[root@localhost httpd-2.2.6]# ./configure "--prefix=/usr/local/apache2" "--with-included-apr" "--enable-so" "--enable-deflate=shared" "--enable-expires=shared" "--enable-rewrite=shared" "--enable-static-support" "--disable-userdir"
[root@localhost httpd-2.2.6]#make
[root@localhost httpd-2.2.6]#make install
[root@localhost httpd-2.2.6]#echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local 写入启动项
[root@localhost httpd-2.2.6]#/usr/local/apache2/bin/apachectl -t 测试apache正常
[root@localhost httpd-2.2.6]#/usr/local/apache2/bin/apachectl restart 启动apache
[root@localhost httpd-2.2.6]#/usr/local/apache2/bin/apachectl stop 停止apache