二进制编译安装HTTPD服务

先删掉httpd  yum remove 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

先上传在解压文件

tar xzf httpd-2.4.34.tar.gz

预编译安装目录

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

进行预安装

 make

 make install(安装)

启动服务

 /usr/local/apache2/bin/apachectl start

查看进程

 ps -sf | grep httpd

关闭防火墙

 iptables -F

 iptables -X

 iptables -L

猜你喜欢

转载自www.cnblogs.com/yishisanke/p/9636607.html