完整的升级apache2.4.1 php5.3.10

先把httpd的服务关了。。



 ./configure --prefix=/usr/local/apache-2.4 --enable-so --enable-modules=all --enable-rewrite --enable-deflate --enable-socache-memcache --enable-buffer --enable-proxy-fcgi --enable-session --enable-session-cookie --enable-cache-disk --enable-cache
 --enable-file-cacheso




编译参数看上面。。我以为加的cache比较多。。又加了新模块session。。有fcgi。。rewrite。在测试机上测试。还有个buffer。

然后make make install   不知道是不是我的原因。。在make 的时候 测试机。突然关机了。。。查log,好像是给人关的。。但是没人弄啊。。不知道怎么回事。。

完了以后

# cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
# vi /etc/init.d/httpd 在第二行加入以下两行内容

1 # chkconfig: 2345 10 90
2 # description: Activates/Deactivates Apache Web Server

# chkconfig –add httpd
# chkconfig –level 2345 httpd on
# chown -R www:www /usr/local/httpd

加入开机启动。。然后。修改下。用户和组。。给目录权限。。目录用户权限。。service httpd start  ok。。下一步就是编译你的php。。。

再贴一次我的参数。。

./configure --prefix=/usr/local/php-5.3.10 --with-config-file-path=/usr/local/php-5.3.10/etc --with-apxs2=/usr/local/apache-2.4/bin/apxs --with-mysql=/usr/local/mysql-5.5.16/ --with-mysqli=/usr/local/mysql-5.5.16/bin/mysql_config --with-iconv-dir=/usr/local/libiconv --with-freeype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-curl --with-curlwrappers --with-mhash --with-mcrypt --with-gd --enable-gd-native-ttf --with-xsl --with-openssl  --with-xmlrpc --without-pear --enable-zip --enable-soap --enable-mbstring --enable-ftp --enable-sockets --enable-pcntl --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --disable-rpath --enable-mbregex 


出去吃饭了。。回了在写。


回来了



然后

配置
# vi /usr/local/httpd/conf/httpd.conf
找到

1 AddType application/x-gzip .gz .tgz

下行添加

1 AddType application/x-httpd-php .php

找到

1 <IfModule dir_module>
2     DirectoryIndex index.html
3 </IfModule>

修改为

1 <IfModule dir_module>
2     DirectoryIndex index.html index.htm index.php
3 </IfModule>












  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值