linux下装apache踩过的坑

来源:互联网 发布:unity3d ios 红色问号 编辑:程序博客网 时间:2024/06/06 20:35

问:Another app is currently holding the yum lock?

答:rm -r /var/run/yum.pid

问:configure: error: ...No recognized SSL/TLS toolkit detected

答:yum install openssl openssl-devel(如果装完还出现这个错误,需要在apahce配置时加入--with-ssl=/usr/local/openssl)

问:checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but c

答:yum install zlib-devel

问:configure: error: APR not found. Please read the documentation.

问:Cannot use an external APR with the bundled APR-util

答:安装apache,加入参数(--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util)

[root@web1 httpd-2.2.19]# ./configure --prefix=/opt/apache --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

1.下载所需软件包:wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip具体步骤如下: a:解决apr not found问题>>>>>>   [root@xt test]# tar -zxf apr-1.4.5.tar.gz     [root@xt test]# cd  apr-1.4.5     [root@xt apr-1.4.5]# ./configure --prefix=/usr/local/apr     [root@xt apr-1.4.5]# make && make install b:解决APR-util not found问题>>>>   [root@xt test]# tar -zxf apr-util-1.3.12.tar.gz     [root@xt test]# cd apr-util-1.3.12     [root@xt apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr    [root@xt apr-util-1.3.12]# make && make install c:解决pcre问题>>>>>>>>>   [root@xt test]#unzip -o pcre-8.10.zip     [root@xt test]#cd pcre-8.10     [root@xt pcre-8.10]#./configure --prefix=/usr/local/pcre     [root@xt pcre-8.10]#make && make install (可能出现g++: command not found,Centos下执行  yum -y update gcc yum -y install gcc+ gcc-c++ ,安装完之后在执行上一步./configure...)


原创粉丝点击