编译安装httpd

[root@jxy ~]# vim 2.sh
#!/bin/bash

yum groupinstall "Development Tools"
groupadd -r apache
useradd -r -g apache apache
yum -y install openssl-devel pcre-devel expat-devel libtool
cd /usr/src/
tar xf apr-1.6.3.tar.bz2
tar xf apr-util-1.6.1.tar.bz2
ls
cd apr-1.6.3
sed -i '/$RM "$cfgfile"/s/^/#/g' configure
./configure --prefix=/usr/local/apr
make && make install
cd /usr/src/apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd
tar xf httpd-2.4.34.tar.bz2
cd httpd-2.4.34
./configure --prefix=/usr/local/apache \
--sysconfdir=/etc/httpd24 \
--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-mpms-shared=all \
--with-mpm=prefork
make && make install
/usr/local/apache/bin/apachectl start
systemctl stop firewalld

[root@jxy ~]# ss -antl
State      Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN     0      50           *:139                      *:*                  
LISTEN     0      128          *:22                       *:*                  
LISTEN     0      100    127.0.0.1:25                       *:*                  
LISTEN     0      50           *:445                      *:*                  
LISTEN     0      50          :::139                     :::*                  
LISTEN     0      128         :::80                      :::*                  
LISTEN     0      128         :::22                      :::*                  
LISTEN     0      100        ::1:25                      :::*                  
LISTEN     0      50          :::445                     :::*           

运行的结果是It workes就是对的
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值