centos6.9 httpd2.4.33安装3.0版本

yum install -y pcre-devel zlib-devel gcc
tar xf apr-1.6.3.tar.gz
cd apr-1.6.3
./configure --prefix=/usr/local/apr
make
make install

yum install -y expat-devel libxml2-devel
tar xf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

tar xf httpd-2.4.33.tar.bz2
cd httpd-2.4.33
CC="gcc -m64" ./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable-ssl=shared --with-ssl=/usr/local/openssl --enable-cgi --enable-expires --enable-deflate --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event | tee /root/apache
make
make install

groupadd www
useradd -g www -s /sbin/nologin -M www

cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpdchmod +x /etc/rc.d/init.d/httpdvim /etc/rc.d/init.d/httpd#chkconfig: 2345 10 90#description: Activates/Deactivates Apache Web Serverchkconfig --add httpdchkconfig --level 35 httpd onvim /usr/local/apache/conf/httpd.confServerName localhost:80vim /etc/profile.d/httpd.shexport PATH=/usr/local/apache/bin:$PATH. /etc/profile.d/httpd.shhttpd -t

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...