apache httpd漏洞修复

修复漏洞1 : CVE-2016-2161

提示:修复有风险,操作需谨慎。
需求:当前版本的Apache存在安全隐患,需要升级到最新版本V2.4.57版本
方式:在线升级
参考外站 Posted 写的文档

#当前系统版本
	[root@centos7 ~]# cat /etc/redhat-release 
	CentOS Linux release 7.9.2009 (Core)
#当前httpd版本
	[root@centos7 opt]# httpd -V
	Server version: Apache/2.4.6 (CentOS)
#安装CodeIT库及其依赖库
	yum install -y epel-release
	wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
	wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
	cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
	yum info httpd		#查看可用的最新版本
	yum upgrade httpd		#升级
	systemctl restart httpd

修复漏洞2 : CVE-2020-15578

提示:修复有风险,操作需谨慎。
真实环境请做好回滚或临时telnet。
需求:当前版本的sshd存在安全隐患,需要升级到最新版本openssh-9.3版本
方式:在线升级
参考博主 MelancholyCat 写的文档

#当前系统版本
	[root@centos7 ~]# cat /etc/redhat-release 
	CentOS Linux release 7.9.2009 (Core)
#当前SSH的版本
	[root@centos7 ~]# ssh -V
	OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
#


需要升级到9.3版本
SSH官网:https://www.openssh.com/
安装依赖包:
yum -y install zlib-devel openssl-devel pam-devel

下载: wget https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.3p1.tar.gz?spm=a2c6h.25603864.0.0.686840adY0RWt7
解压: tar zxvf openssh-9.3p1.tar.gz\?spm\=a2c6h.25603864.0.0.686840adY0RWt7 
进到目录: cd openssh-9.3p1/
编译: ./configure
# 安装
	make
#配置权限
	chmod 600 /etc/ssh/ssh_host_rsa_key
	chmod 600 /etc/ssh/ssh_host_ecdsa_key
	chmod 600 /etc/ssh/ssh_host_ed25519_key
# 安装
	make install
	install -v -m755 contrib/ssh-copy-id /usr/bin
# 修改如下
vim /etc/ssh/sshd_config
	PermitRootLogin yes
	PasswordAuthentication yes
#配置下开机启用
cp -p contrib/redhat/sshd.init /etc/init.d/sshd
chmod +x /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
chkconfig --list sshd
systemctl restart sshd
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>