注:这个脚本在 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 filesmkdir  /usr/src/apache_tar_gzhttpd1="/usr/src/apache_tar_gz"# centos yi_laiyum -y install make gcc gcc-c++ kernel-devel m4  ncurses-devel openssl-devel axel expat-devel# install aprcd $httpd1#wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gzaxel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gztar zxf apr-1.7.0.tar.gzcd ./apr-1.7.0./configure --prefix=/usr/local/aprmake && make install# install apr-utilcd $httpd1#wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gzaxel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gztar zxf apr-util-1.6.1.tar.gzcd ./apr-util-1.6.1./configure --prefix=/usr/local/apr-util \  --with-apr=/usr/local/aprmake && make install# install zlibcd $httpd1#wget https://zlib.net/fossils/zlib-1.2.11.tar.gzaxel -n 20 https://zlib.net/fossils/zlib-1.2.11.tar.gztar zxf zlib-1.2.11.tar.gzcd ./zlib-1.2.11./configure --prefix=/usr/local/zlibmake && make install# install pcrecd $httpd1#wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gzaxel -n 16 https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gztar zxf pcre-8.44.tar.gzcd ./pcre-8.44./configure --prefix=/usr/local/pcremake && make install# install opensslcd $httpd1#wget https://ftp.openssl.org/source/openssl-1.1.1j.tar.gzaxel -n 16 https://ftp.openssl.org/source/openssl-1.1.1j.tar.gztar zxf openssl-1.1.1j.tar.gzcd ./openssl-1.1.1j./configure -fPIC --prefix=/usr/local/openssl enable-sharedmake && make install# install httpdcd $httpd1#wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.46.tar.gzaxel -n 16 https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.46.tar.gztar zxf httpd-2.4.46.tar.gzcd ./httpd-2.4.46cp -r ../apr-1.7.0 srclib/aprcp -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-aprmake && make install# ln -s /usr/local/httpd/bin/* /usr/local/bincp /usr/local/httpd/bin/apachectl /etc/init.d/httpdecho "# chkconfig: 35 85 85# description: apache 2.4.46" >> /etc/init.d/httpdchkconfig --add httpdecho "__end__"
©著作权归作者所有:来自51CTO博客作者qingt2314的原创作品,如需转载,请注明出处,否则将追究法律责任

更多相关文章

  1. 自动化测试如何比较颜色
  2. Nginx动静分离 - 配置笔记
  3. Prometheus+Alertmanager配置邮件报警
  4. 软件测试和开发比例
  5. 自学软件测试 - 功能测试篇
  6. 优秀的软件测试人员有哪些特征?
  7. 软件测试行业状况报告2017
  8. Playbook分发Nginx配置文件
  9. 自学软件测试 - 自动化测试篇

随机推荐

  1. [MD]模仿百度手机助手动态折线图/MPAndro
  2. Android圆弧形ListView的实现
  3. Android在Dialog中显示PopupWindow不全问
  4. sc7731 Android 5.1 Camera 学习之二 fra
  5. 跟随屏幕大小自动调整bitmap大小(横竖屏拍
  6. android启动过程再研
  7. . io .IOException:setDataSource失败了
  8. Android图形图像处理之Bitmap和BitmapFac
  9. android里Toast的用法
  10. 无法向CalendarView事件添加侦听器