In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to repair the problems related to the historical Linux image. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
For the ECS CVM created by the historical Linux image, there may be NTP not configured, YUM not configured, and security vulnerabilities with high recent exposures. Follow these steps to repair your CVM to make your CVM more secure. You can also use the YUM service provided by Aliyun to install the software, and you can use the free NTP provided by Aliyun for time synchronization.
1. Configure NTP
Regardless of distribution, back up / etc/ntp.conf first, and then replace its contents with the following:
# ntp.conf## ntpd config for aliyun ecs.## 6LAN+6LAN+3WAN# shijun.cao@alibaba-inc.com# 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
two。 Update software source
0. First confirm the current Linux system release and version number of the image.
If there is a lsb_release command, execute:
Lsb_release-a
Otherwise execute
Cat / etc/issue
1. For CentOS, back up the CentOS-Base.repo and epel.repo files under / etc/yum.repos.d/, depending on the CentOS version, execute the following command:
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
After downloading the repo file, execute:
Yum makecache
2. "for Aliyun 5.7, back up / etc/yum.repos.d/CentOS-Base.repo, and then execute:"
Wget-qO / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/aliyun-5.repo
After downloading the repo file, execute:
Yum makecache
3. For Ubuntu, back up the / etc/apt/sources.list file, depending on the release version, execute the command:
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
Then execute:
Apt-get update
4. For Debian, back up the / etc/apt/sources.list file, depending on the release version, execute the command:
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
Then execute:
Apt-get update
3. Security vulnerability repair patch
Mainly fix major known security vulnerabilities, the software that needs to be upgraded include: bash, glibc, openssl, wget, ntp.
Before executing the following command, you need to make sure that the current software source for the system is set up correctly.
1. For CentOS and Aliyun Linux, execute:
Yum update bash glibc openssl wget ntp
2. For Ubuntu and Debian, execute:
Apt-get install bash libc6 libc-bin openssl wget ntp on the historical Linux image how to repair the problem to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.