二进制编译安装httpd服务

systemctl stop httpd

yum remove httpd-----------------------(在做之前 先删掉httpd)

安装编译环境

yum -y groupinstall "Development Tools" "Server Platform Development"

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

yum install apr apr-util apr-devel apr-util-devel       ------------------------(安装相应的包)

先上传httpd-2.4.34.tar.gz到./root 

 tar xzf httpd-2.4.34.tar.gz        ------------------------(解压文件)

cd httpd-2.4.34

ls

./configure --prefix=/usr/local/apache --disable-proxy

make                   ----------------------(预安装)

make install         ----------------------(安装)

cd /usr/local/apache

 /usr/local/apache/bin/apachectl start

ps -ef | grep httpd

iptables -F

iptables -X

iptables -L

原文地址:https://www.cnblogs.com/djlsunshine/p/9633886.html