标签:Apache
手工编译安装Apache``
tar xzvf http-2.4.2.tar.gz -C /opt
tar xzvf apr-1.4.6.tar.gz -C /opt
(支持Apache上层应用跨平台,提供底层接口库)tar xzvf apr-util-1.4.1.tar.gz -C /opt
cp -R apr /opt/httpd-2.4.2/srclib/apr
cp -R apr-util /opt/httpd-2.4.2/srclib/apr-util
yum install gcc gcc-c++ make pcre pcre-devel -y
cd /opt/httpd-2.4.2
./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-rewrite \
--enable-mods-shared=most \
--with-mpm=worker \
--disable-cgid \
--disable-cgi
make && make install
grep -v "#" /usr/local/apache/bin/apachectl > /etc/init.d/httpd
#!/bin/sh
chkconfig:2345 85 15
description:Apache is a World Wide Web server
chmod +x /etc/init.d/httpd
chkconfig --add httpd
chkconfig --list httpd
chkconfig --level 35 httpd on
ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf
vim /etc/httpd.conf
Listen:#监听IP地址,这里修改为自己的本地IP地址。
ServerName:主机名.域名
service httpd shop
service httpd start
service iptables stop
setenforce 0
标签:Apache
原文地址:http://blog.51cto.com/13620950/2119797