博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos6.4-x86-64系统更新系统自带Apache Http Server
阅读量:4325 次
发布时间:2019-06-06

本文共 1475 字,大约阅读时间需要 4 分钟。

系统自带Apache Http Server 版本比较老,有漏洞。现在对Apache Http Server进行升级。总体思路:先删除老的,再安装新的。详细步骤如下:

1 删除老版本

  1.1 删除老Apache

         rpm -qa httpd得到的东西全部删除(yum remove xxx)

  1.2 删老apr apr-util

        yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs

2 安装Apache Http Server最新稳定版。

  2.1 参考http://httpd.apache.org/docs/2.4/install.html       下载获得apr-1.4.8.tar.gz  、 apr-util-1.5.2.tar.gz 、pcre-8.21.tar.gz、httpd-2.4.6.tar.gz。

  2.2 安装gcc

         yum -y install gcc

         yum -y install gcc-c++

  2.3 解压下载的压缩包

        

 

         tar -xzf apr-1.4.8.tar.gz

         tar -xzf apr-util-1.5.2.tar.gz

 

         tar -xzf httpd-2.4.6.tar.gz

         tar -xzf pcre-8.21.tar.gz 

   2.4 安装apr

         cd apr-1.4.8

         ./configure --prefix=/usr/local/apr

         make

         make install

   2.5 安装apr-util

         cd ../apr-util-1.5.2

         ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
         make

         make install

   2.6 安装pcre

          cd ../pcre-8.21

          ./configure --prefix=/usr/local/pcre --with-apr=/usr/local/apr/bin/apr-1-config
          make

          make install

   2.7 安装apache

          cd ../httpd-2.4.6

          ./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

          make

          make install

   2.8 启动apahce

          /usr/local/apache/bin/apachectl start

   2.9  测试启动是否成功

    http://localhost:80

参考:

1 防火墙开启80和22端口

/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
 /etc/rc.d/init.d/iptables save
2 设置apache 开机自启动

/etc/rc.d/rc.local中添加/usr/local/apache/bin/apachectl start

 

转载于:https://www.cnblogs.com/james1207/p/3322939.html

你可能感兴趣的文章
css背景渐变色
查看>>
Coursera machine learning 第二周 quiz 答案 Linear Regression with Multiple Variables
查看>>
可视化与办公自动化学习
查看>>
关于jquery中prev()和next()的用法
查看>>
for循环的类型以及while循环
查看>>
enote笔记语言(2)(ver0.2)
查看>>
Difference between 2>&-, 2>/dev/null, |&, &>/dev/null and >/dev/null 2>&1
查看>>
seajs的使用--主要了解模块化
查看>>
Noip2018游记
查看>>
一、 kettle开发、上线常见问题以及防错规范步骤
查看>>
eclipse没有server选项
查看>>
CRC码计算及校验原理的最通俗诠释
查看>>
QTcpSocket的连续发送数据和连续接收数据
查看>>
使用Gitbook来编写你的Api文档
查看>>
Python XML解析(转载)
查看>>
jquery扩展 $.fn
查看>>
tomcat 多实例的Sys V风格脚本
查看>>
程序员如何讲清楚技术方案
查看>>
MapReduce-实践1
查看>>
UVa 815 - Flooded!
查看>>