历史Linux镜像的问题修复方案

发表于:2015-9-08 09:40

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:chenshoubiao    来源:51Testing软件测试网采编

  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.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 文件下载完成后,执行:
  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.list
  ubuntu14.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.list
  debian7:
  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
22/2<12
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号