编译安装Apache2.4时的步骤:
1.编译安装Apache
1.1首先安装apr和apr-util
解压apr-1.5.2.tar.gz并进入目录后执行
./configure
make
make install
apr 默认安装在/usr/local/apr
安装apr-util
解压apr-util-1.5.4.tar.gz并进入目录后执行
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
2.安装Apache(2.4版本的)
./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-mpms-shared=all --with-mpm=event --enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-balancer --enable-lbmethod-heartbeat --enable-heartbeat --enable-slotmem-shm --enable-slotmem-plain --enable-watchdog
make
make install
既没有改变httpd.conf文件也没有做其他事情,尝试启动httpd时:
/etc/httpd/bin/httpd -k start 什么也没有显示,这时查了一下端口,发现80端口未开启,然后就准备关闭该服务
/etc/httpd/bin/httpd -k stop
出现错误:httpd (no pid file) not running
查了很多文章,但是都无效,于是看了一下Apache的错误日志,显示:
[Mon May 09 20:05:06.645909 2016] [proxy_balancer:emerg] [pid 8795:tid 3077510848] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
这就好理解了,就是因为
mod_slotmem_shm没看未加载导致的,剩下的就是编辑httpd.conf文件找到并加载该模块即可,真是要养成随时看错误日志的习惯啊,不能因为错误日志“密密麻麻”就懒得看!
当时排错参考的文章:
http://ylw6006.blog.51cto.com/470441/965119
阅读(7280) | 评论(0) | 转发(0) |