服务器初始化操作
-
配置yum源,自建机房的机器无影响,各云服务器建议使用云服务器的yum源地址 以腾讯云为例,CentOS
# CentOS源帮助文档 # 备份系统旧配置文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup # 获取对应版本的CentOS-Base.repo 到/etc/yum.repos.d/目录 # 各版本源配置列表 # CentOS5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos5_base.repo # CentOS6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo # CentOS7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo # CentOS8 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo # 更新缓存 yum clean all yum makecache
EPEL
# epel帮助文档 # EPEL (Extra Packages for Enterprise Linux) 是由 Fedora Special Interest Group 为企业 Linux 创建、维护和管理的一个高质量附加包集合适用于但不仅限于 Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL), Oracle Linux (OL) # 备份系统旧配置文件 mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup # 获取对应版本的epel配置文件到/etc/yum.repos.d/目录 # epel(RHEL5系列) wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-5.repo # epel(RHEL6系列) wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-6.repo # epel(RHEL7系列) wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo # 更新缓存 yum clean all yum makecache
-
更新服务器yum所有软件
yum update -y
本文来自博客园,作者:Lin-Grocery,转载请注明原文链接:https://www.cnblogs.com/moniter/articles/fu-wu-qi-chu-shi-hua-cao-zuo.html