CentOS 7安装 apache
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7安装 apache相关的知识,希望对你有一定的参考价值。
1、安装apr
yum -y install gcc gcc-c++ openssl-devel pcre-devel tar zxf apr-1.5.2.tar.gz cd apr-1.5.2 ./configure --prefix=/usr/local/apr --disable-ipv6 make && make install
2、安装apr-util
tar zxf apr-util-1.5.4.tar.gz cd apr-util-1.5.4 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make && make install
3、安装httpd
tar zxf httpd-2.4.17.tar.gz cd httpd-2.4.17 tar zxf httpd-2.4.17.tar.gz cd httpd-2.4.17 ./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-modules=most --enable-mods-shared=most --enable-mpms-shared=all --with-mpm=event make && make install cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd vim /etc/rc.d/init.d/httpd # Comments to support chkconfig on RedHat Linux # chkconfig:2345 90 90 # description:http server vim /etc/httpd/httpd.conf ServerName localhost:80 yum install -y lynx chkconfig --add httpd chkconfig httpd on service httpd start
参考博文:http://www.360doc.com/content/15/0320/09/14900341_456614079.shtml
以上是关于CentOS 7安装 apache的主要内容,如果未能解决你的问题,请参考以下文章
Centos 7 安装 Wordpress-----安装 Apache