标签:httpd tar 46 gz -- 源码 usr apr
注:这个脚本在 centos7.3 7.9 上面测试过,
测试的虚拟机是处于 cenos刚安装完系统,的快照下测试的
还有一个待补充的是 配置httpd-2.4.46 时候,的具体每一项配置或者可以去 gitee 直接
git clone
https://gitee.com/qt986/shell/blob/master/centos/apache_2.4.46_tar.sh
#!/bin/bash
# httpd-2.4.46
# create apache files
mkdir /usr/src/apache_tar_gz
httpd1="/usr/src/apache_tar_gz"
# centos yi_lai
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel axel expat-devel
# install apr
cd $httpd1
#wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gz
axel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gz
tar zxf apr-1.7.0.tar.gz
cd ./apr-1.7.0
./configure --prefix=/usr/local/apr
make && make install
# install apr-util
cd $httpd1
#wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
axel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
tar zxf apr-util-1.6.1.tar.gz
cd ./apr-util-1.6.1
./configure --prefix=/usr/local/apr-util \
--with-apr=/usr/local/apr
make && make install
# install zlib
cd $httpd1
#wget https://zlib.net/fossils/zlib-1.2.11.tar.gz
axel -n 20 https://zlib.net/fossils/zlib-1.2.11.tar.gz
tar zxf zlib-1.2.11.tar.gz
cd ./zlib-1.2.11
./configure --prefix=/usr/local/zlib
make && make install
# install pcre
cd $httpd1
#wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
axel -n 16 https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
tar zxf pcre-8.44.tar.gz
cd ./pcre-8.44
./configure --prefix=/usr/local/pcre
make && make install
# install openssl
cd $httpd1
#wget https://ftp.openssl.org/source/openssl-1.1.1j.tar.gz
axel -n 16 https://ftp.openssl.org/source/openssl-1.1.1j.tar.gz
tar zxf openssl-1.1.1j.tar.gz
cd ./openssl-1.1.1j
./configure -fPIC --prefix=/usr/local/openssl enable-shared
make && make install
# install httpd
cd $httpd1
#wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.46.tar.gz
axel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.46.tar.gz
tar zxf httpd-2.4.46.tar.gz
cd ./httpd-2.4.46
cp -r ../apr-1.7.0 srclib/apr
cp -r ../apr-util-1.6.1 srclib/apr-util
./configure --prefix=/usr/local/httpd \
--enable-so \
--enable-cgi \
--enable-cgid \
--enable-ssl \
--with-ssl=/usr/local/openssl \
--enable-rewrite \
--with-pcre=/usr/local/pcre \
--with-z=/usr/local/zlib \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--enable-modules=most \
--enable-mods-shared=most \
--enable-mpms-shared=all \
--with-mpm=event \
--enable-proxy \
--enable-proxy-fcgi \
--enable-expires \
--enable-deflate \
--with-included-apr
make && make install
#
ln -s /usr/local/httpd/bin/* /usr/local/bin
cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
echo "# chkconfig: 35 85 85
# description: apache 2.4.46" >> /etc/init.d/httpd
chkconfig --add httpd
echo "__end__"
标签:httpd,tar,46,gz,--,源码,usr,apr 来源: https://blog.51cto.com/15064563/2657765
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。