欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

 更新時(shí)間:2019年02月04日 10:14:39   投稿:laozhang  
在本篇內(nèi)容中我們給大家總結(jié)了關(guān)于對(duì)于歷史Linux鏡像的問(wèn)題進(jìn)行修復(fù)處理知識(shí)點(diǎn),有需要的朋友們跟著學(xué)習(xí)下。

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

歷史Linux鏡像創(chuàng)建的ECS云服務(wù)器,可能存在NTP沒(méi)有配置,YUM沒(méi)有配置,還可能存在最近暴漏較高的安全漏洞,請(qǐng)按照以下步驟進(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

#        shijun.cao@alibaba-inc.com

#        2014.8.11

#

driftfile /var/lib/ntp/drift

pidfile  /var/run/ntpd.pid

logfile /var/log/ntp.log

# Access Control Support

restrict  default ignore

restrict -6 default ignore

restrict 127.0.0.1

restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap nopeer noquery

restrict 172.16.0.0 mask 255.240.0.0 nomodify notrap nopeer noquery

restrict 100.64.0.0 mask 255.192.0.0 nomodify notrap nopeer noquery

restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap nopeer noquery

restrict ntp1.aliyun.com nomodify notrap nopeer noquery

restrict ntp2.aliyun.com nomodify notrap nopeer noquery

restrict ntp3.aliyun.com nomodify notrap nopeer noquery

restrict ntp4.aliyun.com nomodify notrap nopeer noquery

restrict ntp5.aliyun.com nomodify notrap nopeer noquery

restrict ntp6.aliyun.com nomodify notrap nopeer noquery

# local clock

server 127.127.1.0

fudge 127.127.1.0 stratum 10

#public ntp server

server ntp1.aliyun.com iburst minpoll 4 maxpoll 10

server ntp2.aliyun.com iburst minpoll 4 maxpoll 10

server ntp3.aliyun.com iburst minpoll 4 maxpoll 10

server ntp4.aliyun.com iburst minpoll 4 maxpoll 10

server ntp5.aliyun.com iburst minpoll 4 maxpoll 10

server ntp6.aliyun.com iburst minpoll 4 maxpoll 10

#Private ntp server

server ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

#New private ntp server

server ntp7.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp8.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp9.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp10.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp11.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

server ntp12.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10

2. 更新軟件源

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

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

lsb_release -a

否則執(zhí)行

cat /etc/issue

1 . 對(duì)于 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.repo

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

CentOS 6:

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

wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

CentOS 7:

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

wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

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

yum makecache

2 . 對(duì)于 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 . 對(duì)于 Ubuntu,備份 /etc/apt/sources.list 文件,根據(jù)發(fā)行版版本,執(zhí)行命令:

ubuntu12.04:

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

ubuntu14.04:

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

然后執(zhí)行:

apt-get update

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

debian6:

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

debian7:

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

然后執(zhí)行:

apt-get update

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

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

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

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

yum update bash glibc openssl wget ntp

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

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

相關(guān)文章

  • Linux server配置安裝Java與Tomcat服務(wù)器教程詳解

    Linux server配置安裝Java與Tomcat服務(wù)器教程詳解

    這篇文章主要介紹了Linux server配置安裝Java與Tomcat服務(wù)器教程詳解,需要的朋友可以參考下
    2017-08-08
  • 解決xampp自啟動(dòng)和mysql.sock問(wèn)題

    解決xampp自啟動(dòng)和mysql.sock問(wèn)題

    Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
    2010-10-10
  • Linux上啟動(dòng)和停止jar的方法示例

    Linux上啟動(dòng)和停止jar的方法示例

    在Linux系統(tǒng)中,要想讓jar包在后臺(tái)運(yùn)行,可以使用nohup命令和&符號(hào),nohup命令可以使進(jìn)程在后臺(tái)不受掛起信號(hào)影響的執(zhí)行,而&符號(hào)則是將任務(wù)放入后臺(tái)執(zhí)行,本文介紹了Linux上啟動(dòng)和停止jar的方法示例,需要的朋友可以參考下
    2024-07-07
  • Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法

    Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法

    這篇文章主要介紹了Apache中使非偽靜態(tài)url跳轉(zhuǎn)到偽靜態(tài)url的方法,主要是在使用.htaccess時(shí)的問(wèn)題,需要的朋友可以參考下
    2015-07-07
  • 用DNSPod和Squid打造自己的CDN (八) 測(cè)試并運(yùn)行SQUID

    用DNSPod和Squid打造自己的CDN (八) 測(cè)試并運(yùn)行SQUID

    想要測(cè)試SQUID是否正常,必須要先把www.naizhao.com這個(gè)域名解析到2.2.2.2這個(gè)IP上。跟上一章一樣,如果你是網(wǎng)通用戶(hù)就不需要做任何操作,DNSPod會(huì)給你返回2.2.2.2這個(gè)IP
    2013-04-04
  • 詳解CentOS 6.5如何安裝Realtek無(wú)線(xiàn)網(wǎng)卡驅(qū)動(dòng)

    詳解CentOS 6.5如何安裝Realtek無(wú)線(xiàn)網(wǎng)卡驅(qū)動(dòng)

    相信大家都應(yīng)該知道CentOS6.5不像CentOS7和Unbuntu那樣自動(dòng)安裝好了無(wú)線(xiàn)網(wǎng)卡驅(qū)動(dòng),如果想要在CentOS 6.5上實(shí)現(xiàn)無(wú)線(xiàn)上網(wǎng),我們就需要折騰一下,這篇文章給大家介紹了詳細(xì)的步驟,感興趣的朋友們下面來(lái)一起看看吧。
    2016-10-10
  • 制作PHP的RPM包詳解及實(shí)例

    制作PHP的RPM包詳解及實(shí)例

    這篇文章主要介紹了制作PHP的RPM包詳解及實(shí)例的相關(guān)資料,為了方便源碼包的安裝,我們需要自己訂制軟件包的需求,我們會(huì)把一些源碼包按照我們的需求來(lái)做成rpm包,需要的朋友可以參考下
    2016-12-12
  • ubuntu15.10下hadoop2.7.2的安裝與配置詳解

    ubuntu15.10下hadoop2.7.2的安裝與配置詳解

    今天小編就為大家分享一篇關(guān)于ubuntu15.10下hadoop2.7.2的安裝與配置詳解,小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧
    2019-02-02
  • 使用?DataAnt?監(jiān)控?Apache?APISIX的原理解析

    使用?DataAnt?監(jiān)控?Apache?APISIX的原理解析

    Apache?APISIX?是一個(gè)開(kāi)源的云原生?API?網(wǎng)關(guān),作為?API?網(wǎng)關(guān),它兼具動(dòng)態(tài)、實(shí)時(shí)、高性能等特點(diǎn),提供了負(fù)載均衡、動(dòng)態(tài)上游、灰度發(fā)布、服務(wù)熔斷、身份認(rèn)證、可觀測(cè)性等豐富的流量管理功能,這篇文章主要介紹了如何使用?DataAnt?監(jiān)控?Apache?APISIX,需要的朋友可以參考下
    2022-06-06
  • 在Linux操作系統(tǒng)中修改環(huán)境變量的方法

    在Linux操作系統(tǒng)中修改環(huán)境變量的方法

    在Linux操作系統(tǒng)中,有時(shí)候跟著教程安裝了一些軟件,安裝成功后,很高興的準(zhǔn)備運(yùn)行該軟件相應(yīng)命令,但是偶爾會(huì)遇到”Command not found…“的提示。原因是因?yàn)槟惆惭b的軟件需要設(shè)置環(huán)境變量才能運(yùn)行。接下來(lái)跟著小編一起學(xué)習(xí)在Linux操作系統(tǒng)中修改環(huán)境變量的方法。
    2015-08-08

最新評(píng)論