做之前systemct stop httpd
Yum remove httpd编译前安装编译工具
yum install -y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel
二进制编译安装(下载tar包地址:http://www.apache.org/dist/httpd/)
安装相应包:
yum install apr apr-util apr-devel apr-util-devel
ls
解压文件:
tar xzf httpd-2.4.34.tar.gz
ls
cd httpd-2.4.34(切换到httpd_2.4.34)
预编译安装目录:
./configure –prefix=/usr/local/apache2 –disable-proxy
进行:make && make install
切换到此目录下
cd /usr/local/apache2
ls
启动服务/usr/local/apache2/bin/apachectl start
查看进程:
ps -ef |grep httpd
iptables -F/X/L 清空防火墙设置
iptables -F
iptables -X
setenforce
关闭防火墙进行网页访问
二进制编译httpd
最新推荐文章于 2022-07-03 00:07:12 发布