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

首頁 > 服務器 > Linux服務器 > 正文

歷史Linux鏡像處理及修復方案

2024-09-05 23:05:07
字體:
來源:轉載
供稿:網友

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

1. 配置NTP

不區分發行版,先備份 /etc/ntp.conf,然后將其內容替換為如下:

# 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 . 先確認鏡像當前的 Linux 系統發行版和版本號。

如果有 lsb_release 命令,執行:

lsb_release -a

否則執行

cat /etc/issue

1 . 對于 CentOS,備份 /etc/yum.repos.d/ 下的 CentOS-Base.repo 和 epel.repo 文件,根據 CentOS 版本,執行如下相應的命令:

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 文件下載完成后,執行:

yum makecache

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

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

repo 文件下載完成后,執行:

yum makecache

3 . 對于 Ubuntu,備份 /etc/apt/sources.list 文件,根據發行版版本,執行命令:

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

然后執行:

apt-get update

4 . 對于 Debian,備份 /etc/apt/sources.list 文件,根據發行版版本,執行命令:

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

然后執行:

apt-get update

3. 安全漏洞修復補丁

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

在執行如下命令之前,需要確保系統當前的軟件源已經設置正確。

1 . 對于 CentOS 和 Aliyun Linux,執行:

yum update bash glibc openssl wget ntp

2 . 對于 Ubuntu 和 Debian,執行:

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


注:相關教程知識閱讀請移步到服務器教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 免费国产人成网站 | 欧美在线观看黄色 | 国产在线1区 | 欧美一级高清片在线 | 天天看逼 | 国产亚洲精品久久久久久久软件 | 国产成人高清成人av片在线看 | 久久久三级免费电影 | 亚洲免费视频一区二区 | 国产日韩在线观看一区 | 毛片在线视频免费观看 | 好吊色欧美一区二区三区四区 | 51国产偷自视频区视频小蝌蚪 | 欧美激情性色生活片在线观看 | 成人男女视频 | 日韩理论电影网 | 在线成人免费av | 国产成年人小视频 | 精品久久久久久久久久 | 污视频在线免费 | 午夜视频观看 | 成人在线网站 | 蜜桃传媒视频麻豆第一区免费观看 | 亚州综合图片 | 日韩在线欧美在线 | 日韩黄色片在线观看 | 久久久婷婷 | 日韩理论电影网 | 欧美日韩激情 | 久国久产久精永久网页 | 小视频在线看 | 精品视频 久久久 | xxnxx中国18 | 男女羞羞在线观看 | 国产在线精品91 | 成人精品久久久 | 黄色一级毛片免费看 | 国产免费看 | av手机在线免费播放 | 久草在线观看福利视频 | 欧美一级视屏 |