麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 服務(wù)器 > Linux服務(wù)器 > 正文

實(shí)例分析對于歷史Linux鏡像的問題進(jìn)行修復(fù)處理

2024-09-05 23:05:34
字體:
供稿:網(wǎng)友

歷史Linux鏡像的問題修復(fù)方案

歷史Linux鏡像創(chuàng)建的ECS云服務(wù)器,可能存在NTP沒有配置,YUM沒有配置,還可能存在最近暴漏較高的安全漏洞,請按照以下步驟進(jìn)行修復(fù),可以讓您的云服務(wù)器更加安全,還可以使用阿里云提供的YUM服務(wù)進(jìn)行安裝軟件,可以使用免費(fèi)的阿里云提供的NTP進(jìn)行時(shí)間同步。

1. 配置NTP

不區(qū)分發(fā)行版,先備份 /etc/ntp.conf,然后將其內(nèi)容替換為如下:

# ntp.conf## ntpd config for aliyun ecs.## 6LAN+6LAN+3WAN#        [email protected]#        2014.8.11#driftfile /var/lib/ntp/driftpidfile  /var/run/ntpd.pidlogfile /var/log/ntp.log# Access Control Supportrestrict  default ignorerestrict -6 default ignorerestrict 127.0.0.1restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap nopeer noqueryrestrict 172.16.0.0 mask 255.240.0.0 nomodify notrap nopeer noqueryrestrict 100.64.0.0 mask 255.192.0.0 nomodify notrap nopeer noqueryrestrict 10.0.0.0 mask 255.0.0.0 nomodify notrap nopeer noqueryrestrict ntp1.aliyun.com nomodify notrap nopeer noqueryrestrict ntp2.aliyun.com nomodify notrap nopeer noqueryrestrict ntp3.aliyun.com nomodify notrap nopeer noqueryrestrict ntp4.aliyun.com nomodify notrap nopeer noqueryrestrict ntp5.aliyun.com nomodify notrap nopeer noqueryrestrict ntp6.aliyun.com nomodify notrap nopeer noquery# local clockserver 127.127.1.0fudge 127.127.1.0 stratum 10#public ntp serverserver ntp1.aliyun.com iburst minpoll 4 maxpoll 10server ntp2.aliyun.com iburst minpoll 4 maxpoll 10server ntp3.aliyun.com iburst minpoll 4 maxpoll 10server ntp4.aliyun.com iburst minpoll 4 maxpoll 10server ntp5.aliyun.com iburst minpoll 4 maxpoll 10server ntp6.aliyun.com iburst minpoll 4 maxpoll 10#Private ntp serverserver ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10#New private ntp serverserver ntp7.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp8.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp9.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp10.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp11.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10server ntp12.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

2. 更新軟件源

0 . 先確認(rèn)鏡像當(dāng)前的 Linux 系統(tǒng)發(fā)行版和版本號。

如果有 lsb_release 命令,執(zhí)行:

lsb_release -a

否則執(zhí)行

cat /etc/issue

1 . 對于 CentOS,備份 /etc/yum.repos.d/ 下的 CentOS-Base.repo 和 epel.repo 文件,根據(jù) CentOS 版本,執(zhí)行如下相應(yīng)的命令:

CentOS 5:

wget -qO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repowget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repoCentOS 6:wget -qO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repowget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repoCentOS 7:wget -qO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repowget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

repo 文件下載完成后,執(zhí)行:

yum makecache

2 . 對于 Aliyun 5.7,備份 /etc/yum.repos.d/CentOS-Base.repo ,然后執(zhí)行:

wget -qO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/aliyun-5.repo

repo 文件下載完成后,執(zhí)行:

yum makecache

3 . 對于 Ubuntu,備份 /etc/apt/sources.list 文件,根據(jù)發(fā)行版版本,執(zhí)行命令:

ubuntu12.04:wget -qO /etc/apt/sources.list http://mirrors.aliyun.com/repo/ubuntu1204-lts.listubuntu14.04:wget -qO /etc/apt/sources.list http://mirrors.aliyun.com/repo/ubuntu1404-lts.list

然后執(zhí)行:

apt-get update

4 . 對于 Debian,備份 /etc/apt/sources.list 文件,根據(jù)發(fā)行版版本,執(zhí)行命令:

debian6:wget -qO /etc/apt/sources.list http://mirrors.aliyun.com/repo/debian6-lts.listdebian7:wget -qO /etc/apt/sources.list http://mirrors.aliyun.com/repo/debian7-lts.list

然后執(zhí)行:

apt-get update

3. 安全漏洞修復(fù)補(bǔ)丁

主要修復(fù)目前已知的重大安全漏洞,需要升級的軟件包括: bash 、glibc 、 openssl 、wget 、ntp 。

在執(zhí)行如下命令之前,需要確保系統(tǒng)當(dāng)前的軟件源已經(jīng)設(shè)置正確。

1 . 對于 CentOS 和 Aliyun Linux,執(zhí)行:

yum update bash glibc openssl wget ntp

2 . 對于 Ubuntu 和 Debian,執(zhí)行:

apt-get install bash libc6 libc-bin openssl wget ntp


注:相關(guān)教程知識閱讀請移步到服務(wù)器教程頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 福利四区| 成人国产精品色哟哟 | 午夜国内精品a一区二区桃色 | 成人福利在线视频 | 国产午夜电影在线观看 | 国产成人综合在线视频 | 日韩视频高清 | 午夜精品久久久久久久爽 | 免费一及片 | 国产精品一区视频 | 国产无限资源在线观看 | av在线不卡免费 | 久久精品亚洲国产奇米99 | 毛片三区| 欧美日韩国产成人在线 | 狠狠干天天操 | 国产激情视频在线 | 国产午夜精品一区二区三区视频 | 欧美城网站地址 | 免费1级做55爰片l在线观看 | 一本到免费视频 | 欧美一级片免费在线观看 | 精品久久久久久久久久久久久久 | 欧美成人一级片 | 黄色大片网站在线观看 | 12av毛片 | 蜜桃视频在线免费播放 | 欧美成a人片在线观看久 | 天天草天天爱 | 黄色毛片免费看 | 久久精品99北条麻妃 | 最新中文字幕第一页视频 | 手机视频在线播放 | 久色亚洲| 亚洲午夜视频 | 中文字幕精品一二三四五六七八 | 日韩精品99久久久久久 | japanese hot milf free av | 黄网免费看 | 天天看天天摸天天操 | 91精品国产乱码久久久久久久久 |