[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就是对的
编译安装httpd
最新推荐文章于 2024-05-30 14:58:15 发布