bmc TrueSight 中 apache2.4.20 升级 到2.4.60

apache2.4.20 存在 Apache HTTP Server 输出不当逃逸漏洞(CVE-2024-38482) 需要升级到 2.4.60

1.环境

1.环境

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)

2.配置yum 源–内网镜像

cat /etc/yum.repos.d/centos6.repo

[centos6]
name=centos6
baseurl=http://10.26.211.56:8080/centos6
gpgcheck=0
enabled=1

使用阿里云镜像

curl -o /etc/yum.repos.d/centos6.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
升级前信息
/usr/pw/apache/bin/apachectl -V

Server version: Apache/2.4.20 (Unix)
Server built:   Apr 17 2016 22:59:28
Server's Module Magic Number: 20120211:57
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/pw/apache"
 -D SUEXEC_BIN="/usr/pw/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

2.下载软件

外网下载

1.下载最新稳定版 Apache

wget https://archive.apache.org/dist/httpd/httpd-2.4.60.tar.gz

2.下载并安装 apr 和 apr-util

wget https://downloads.apache.org/apr/apr-1.7.5.tar.gz
wget https://downloads.apache.org/apr/apr-util-1.6.3.tar.gz

3.下载PCRE2源码

wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz

1.下载
cd /soft
wget  http://10.26.211.56:8080/httpd-2.4.60.tar.gz
wget  http://10.26.211.56:8080/apr-1.7.5.tar.gz
wget  http://10.26.211.56:8080/apr-util-1.6.3.tar.gz
wget  http://10.26.211.56:8080/pcre2-10.42.tar.gz
tar -zxvf httpd-2.4.60.tar.gz
tar -zxvf apr-1.7.5.tar.gz
tar -zxvf apr-util-1.6.3.tar.gz
mv apr-1.7.5 httpd-2.4.60/srclib/apr
mv apr-util-1.6.3 httpd-2.4.60/srclib/apr-util

2.编译安装pcre2
#确保目录是不存在的/usr/local/pcre2
tar -zxvf pcre2-10.42.tar.gz
cd /soft/pcre2-10.42
# 配置、编译和安装(安装到自定义目录,避免覆盖系统旧版本)
./configure --prefix=/usr/local/pcre2
make
make install


  • 错误:

    checking for gcc… no
    checking for cc… no
    checking for cl.exe… no
    checking for clang… no
    configure: error: in /soft/pcre2-10.42': configure: error: no acceptable C compiler found in $PATH See config.log’ for more details

    缺少编译工具

    解决问题-方法1–推荐:

    yum -y install gcc c c++

    解决问题-方法2:

https://vault.centos.org/6.4/os/x86_64/Packages/
这里可以下载对应的rpm包

#这个是没有gcc 的报错,下载关于gcc 的包

cd /soft
wget http://10.26.211.56:8080/gcc/cpp-4.4.7-3.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/gcc-4.4.7-3.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/gcc-c%2B%2B-4.4.7-3.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/glibc-devel-2.12-1.107.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/glibc-headers-2.12-1.107.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/gmp-4.3.1-7.el6_2.2.x86_64.rpm
wget http://10.26.211.56:8080/gcc/kernel-headers-2.6.32-358.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/mpfr-2.4.1-6.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/glibc-common-2.12-1.107.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/libstdc%2B%2B-4.4.7-3.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
wget http://10.26.211.56:8080/gcc/ppl-0.10.2-11.el6.x86_64.rpm

rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh cpp-4.4.7-3.el6.x86_64.rpm
rpm -ivh kernel-headers-2.6.32-358.el6.x86_64.rpm 
rpm -ivh glibc-headers-2.12-1.107.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.107.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.7-3.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm 

你可能感兴趣的:(linux,apache,bmc,TrueSight,linux,apache,centos,bmc,TrueSight)