Linux_CentOS学习笔记
文章目录 YUM源 yum命令 搭建并配置Yum软件仓库的大致步骤 创建光盘Yum源实例 仅从光盘YUM源安装软件 利用priorities插件安装多个yum源 第三方软件源 清华大学软件源 阿里云软件源 中国科技大学 USTC软件源 CentOS7 USTC软件源 CentOS 8 Stream USTC软件源 系统安装 软件安装 常见问题 CentOS7 安装软件包时报错 CentOS6 软件源不可用
YUM源
yum命令
语法yum [ options] COMMAND
command 列表 命令 功能说明 check 检查 RPM 数据库问题 check-update 检查是否有可用的软件包更新 clean 删除缓存数据 deplist 列出软件包的依赖关系 distribution-synchronization 已同步软件包到最新可用版本 downgrade 降级软件包 erase 从系统中移除一个或多个软件包 groups 显示或使用、组信息 help 显示用法提示 history 显示或使用事务历史 info 显示关于软件包或组的详细信息 install 向系统中安装一个或多个软件包 list 列出一个或一组软件包 load-transaction 从文件名中加载一个已存事务 makecache 创建元数据缓存 provides 查找提供指定内容的软件包 reinstall 覆盖安装软件包 repo-pkgs 将一个源当作一个软件包组,这样我们就可以一次性安装/移除全部软件包。 repolist 显示已配置的源 search 在软件包详细信息中搜索指定字符串 shell 运行交互式的 yum shell swap Simple way to swap packages, instead of using shell update 更新系统中的一个或多个软件包 upgrade 更新软件包同时考虑软件包取代关系 version 显示机器和/或可用的源版本
options 列表 选项 说明 -h, --help 显示此帮助消息并退出 -t, --tolerant 忽略错误 -C, --cacheonly 完全从系统缓存运行,不升级缓存 -c [config file], --config=[config file] 配置文件路径 -R [minutes], --randomwait=[minutes] 命令最长等待时间 -d [debug level], --debuglevel=[debug level] 调试输出级别 –showduplicates 在 list/search 命令下,显示源里重复的条目 -e [error level], --errorlevel=[error level] 错误输出级别 –rpmverbosity=[debug level name] RPM 调试输出级别 -q, --quiet 静默执行 -v, --verbose 详尽的操作过程 -y, --assumeyes 回答全部问题为是 –assumeno 回答全部问题为否 –version 显示 Yum 版本然后退出 –installroot=[path] 设置安装根目录 –enablerepo=[repo] 启用一个或多个软件源(支持通配符) –disablerepo=[repo] 禁用一个或多个软件源(支持通配符) -x [package], --exclude=[package] 采用全名或通配符排除软件包 –disableexcludes=[repo] 禁止从主配置,从源或者从任何位置排除 –disableincludes=[repo] disable includepkgs for a repo or for everything –obsoletes 更新时处理软件包取代关系 –noplugins 禁用 Yum 插件 –nogpgcheck 禁用 GPG 签名检查 –disableplugin=[plugin] 禁用指定名称的插件 –enableplugin=[plugin] 启用指定名称的插件 –skip-broken 忽略存在依赖关系问题的软件包 –color=COLOR 配置是否使用颜色 –releasever=RELEASEVER 在 yum 配置和 repo 文件里设置 $releasever 的值 –downloadonly 仅下载而不更新 –downloaddir=DLDIR 指定一个其他文件夹用于保存软件包 –setopt=SETOPTS 设置任意配置和源选项
搭建并配置Yum软件仓库的大致步骤
搭建并配置Yum软件仓库的大致步骤 进入到/etc/yum.repos.d/目录中(因为该目录存放着Yum软件仓库的配置文件)。 使用Vim编辑器创建一个名为rhel7.repo的新配置文件(文件名称可随意,但后缀必须为.repo),逐项写入下面加粗的配置参数并保存退出(不要写后面的中文注释)。 [rhel-media] :Yum软件仓库唯一标识符,避免与其他仓库冲突。 name=linuxprobe:Yum软件仓库的名称描述,易于识别仓库用处。 baseurl=file:///media/cdrom:提供的方式包括FTP(ftp://…)、HTTP(http://…)、本地(file:///…)。 enabled=1:设置此源是否可用;1为可用,0为禁用。 gpgcheck=1:设置此源是否校验文件;1为校验,0为不校验。 gpgkey=file:///media/cdrom/RPM-GPG-KEY-redhat-release:若上面参数开启校验,那么请指定公钥文件地址。 按配置参数的路径挂载光盘,并把光盘挂载信息写入到/etc/fstab文件中。 使用“yum install httpd -y”命令检查Yum软件仓库是否已经可用。
创建光盘Yum源实例
Centos7实例
编辑光盘Yum源文件 挂载ISO文件 命令cat > /etc/yum.repos.d/rhel7_cdrom.repo << EOF
##文件内容
[rhel7_cdrom]
name=rhel7_cdrom
baseurl=file:///media/cdrom/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
mkdir /media/cdrom
mount /dev/sr0 /media/cdrom
yum clean all
yum makecache
Centos8实例
编辑光盘Yum源文件 挂载ISO文件 命令cat > /etc/yum.repos.d/rhel8_cdrom.repo << EOF
##文件内容
[rhel8_cdrom_BaseOS]
name = rhel8_cdrom_BaseOS
baseurl = file:///mnt/cdrom/BaseOS
gpgcheck = 0
enable = 1[rhel8_cdrom_AppStream]
name = rhel8_cdrom_AppStream
baseurl = file:///mnt/cdrom/AppStream
gpgcheck = 0
enable = 1
EOF
mkdir /media/cdrom
mount /dev/sr0 /media/cdrom
yum clean all
yum makecache
仅从光盘YUM源安装软件
参考: 创建光盘Yum源实例 清除缓存和重新缓存都是必须的 –enablerepo可以使用多次,以使用多个源 从光盘Yum源安装,以光盘yum源为rhel7_cdrom为例yum --disablerepo = \ * --enablerepo = rhel7_cdrom clean all
yum --disablerepo = \ * --enablerepo = rhel7_cdrom makecache
yum --disablerepo = \ * --enablerepo = rhel7_cdrom install tigervnc
利用priorities插件安装多个yum源
安装priorities插件yum -y install yum-priorities
安装rpmforge软件源sudo yum localinstall -y --nogpgcheck sudo yum localinstall -y --nogpgcheck http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
安装RPM Fusion软件源 RPM Fusion同时提供了一些自由和非自由的软件,同样的它也需要先启用EPELsudo yum localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum localinstall -y --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
安装ELRepo软件源 ELRepo提供了一些硬件驱动相关的包sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
安装NUX-dextop 软件源 NUX-dextop提供了一些桌面和多媒体软件包,它也需要先启用EPEL仓库sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
设置/etc/yum.repos.d/ 目录下的.repo相关文件(如CentOS-Base.repo),在这些文件[base]段中插入顺序指令:priority=N (N为1到99的正整数,数值越小越优先)vi /etc/yum.repos.d/CentOS-Base.repo
priority = 2
vi /etc/yum.repos.d/CentOS-aliyun.repo
priority = 5
vi /etc/yum.repos.d/epel.repo
priority = 10
vi /etc/yum.repos.d/rpmforge.repo
priority = 15
vi /etc/yum.repos.d/nux-dextop.repo
priority = 20
vi /etc/yum.repos.d/rpmfusion-free-updates.repo
priority = 25
vi /etc/yum.repos.d/rpmfusion-free-updates-testing.repo
priority = 30
vi /etc/yum.repos.d/rpmfusion-nonfree-updates.repo
priority = 35
vi /etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo
priority = 40
sudo yum clean all && yum makecache && yum update
第三方软件源
清华大学软件源
CentOS7 清华大学软件源
代码
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/CentOS-fasttrack.repo /etc/yum.repos.d/CentOS-fasttrack.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/CentOS-x86_64-kernel.repo /etc/yum.repos.d/CentOS-x86_64-kernel.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
cat > /etc/yum.repos.d/CentOS-Base.repo << 'EOF'
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
cat > /etc/yum.repos.d/CentOS-fasttrack.repo << 'EOF'
[fasttrack]
name=CentOS-7 - fasttrack
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=fasttrack&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/fasttrack/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
cat > /etc/yum.repos.d/CentOS-x86_64-kernel.repo << 'EOF'
[centos-kernel]
name=CentOS LTS Kernels for $basearch
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=kernel&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/altarch/7/kernel/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[centos-kernel-experimental]
name=CentOS Experimental Kernels for $basearch
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=experimental&infra=$infra
baseurl=https://mirrors.tuna.tsinghua.edu.cn/altarch/7/experimental/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
cat > /etc/yum.repos.d/epel.repo << 'EOF'
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
EOF
yum clean all
yum makecache
阿里云软件源
CentOS7源信息
源ID 源名 源文件名 大小 base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com /etc/yum.repos.d/CentOS-Base.repo 8.9G epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 /etc/yum.repos.d/epel.repo 16G extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com /etc/yum.repos.d/CentOS-Base.repo 950M updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com /etc/yum.repos.d/CentOS-Base.repo 22G
CentOS7配置阿里软件源
常用软件源安装 备份系统软件源 下载阿里源 下载阿里EPEL源 重新生成缓存mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
中国科技大学 USTC软件源
CentOS7 USTC软件源
代码
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
cat > /etc/yum.repos.d/CentOS-Base.repo << 'EOF'
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
cat > /etc/yum.repos.d/epel.repo << 'EOF'
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirrors.ustc.edu.cn/epel/7/$basearch
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirrors.ustc.edu.cn/epel/7/$basearch/debug
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://mirrors.ustc.edu.cn/epel/7/SRPMS
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
EOF
yum clean all
yum makecache
CentOS 8 Stream USTC软件源
代码
mv /etc/yum.repos.d/CentOS-Stream-BaseOS.repo /etc/yum.repos.d/CentOS-Stream-BaseOS.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/CentOS-Stream-Extras.repo /etc/yum.repos.d/CentOS-Stream-Extras.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
mv /etc/yum.repos.d/CentOS-Stream-AppStream.repo /etc/yum.repos.d/CentOS-Stream-AppStream.repo.backup.$( date "+%Y-%m-%d_%H:%M" )
cat > /etc/yum.repos.d/CentOS-Stream-BaseOS.repo << 'EOF'
[baseos]
name=CentOS Stream $releasever - BaseOS
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF
cat > /etc/yum.repos.d/CentOS-Stream-Extras.repo << 'EOF'
[extras]
name=CentOS Stream $releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=extras&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$stream/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF
cat > /etc/yum.repos.d/CentOS-Stream-AppStream.repo << 'EOF'
[appstream]
name=CentOS Stream $releasever - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF
cat > /etc/yum.repos.d/CentOS-Stream-PowerTools.repo << 'EOF'
[powertools]
name=CentOS Stream $releasever - PowerTools
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=PowerTools&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF
yum clean all
yum makecache
系统安装
使用安装选项
方式1 进入光盘启动菜单界面 光标在安装系统选项上,按"TAB"键 前面有些代码,不用管,输入空格加选项,每个选项之间使用空格分隔,回车 方式2 进入光盘启动菜单界面 按"Esc"键 输入linux 选项,每个选项之间使用空格分隔,回车 选项 选项|说明 -|-|- text|文本界面安装 graphical|图形界面安装(内存需大于1G) asknetword|提示用户配置网络功能 dd|指定设备驱动程序位置(本地、光驱、网络)| ks|ks文件路径(本地、光驱、网络)| repo|安装树路径(本地、光驱、网络)| ip netmask gateway dns noipv6 device|配置网络参数| ks示例 网络位置ks = { http| https| ftp} ://ip/path/ks.cfg
ks = nfs:ServerIP:/path/ks.cfg
repo示例 网络位置repo = { http| https| ftp} ://ip/path
repo = nfs:ServerIP:/path
ip示例ip = 192.168 .1.2 netmask = 255.255 .255.0 gateway = 192.168 .1.1 dns = 8.8 .8.8 noipv6 device = eth0
软件安装
CentOS7安装Python3.8
系统版本:CentOS7.9_2009;Python版本:Python3.8.13 安装依赖包yum install -y wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel
下载解压源码包;编译安装wget https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz
tar zxvf Python-3.8.13.tgz
cd Python-3.8.13
./configure prefix = /usr/local/python3
make
make install
添加软连接ln -s /usr/local/python3/bin/python3.8 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3
添加环境变量echo 'export PATH="${PATH}:/usr/local/python3/bin"' >> /etc/profile
source /etc/profile
常见问题
CentOS7 安装软件包时报错
报错信息:获取 GPG 密钥失败:[Errno 14] curl#37 - “Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7” 解决方法:sudo curl -Lo /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
CentOS6 软件源不可用
CentOS 6已经随着2020年11月的结束进入了EOL(Reaches End of Life)。所以在2020年12月2日,CentOS官方停止了对CentOS 6的所有更新,并且下架了包括官方所有的CentOS6源,目前阿里、163、清华等CentOS6源已无法使用。 还要继续使用CentOS6的话,可以使用vault.centos.org作为更新源. CentOS官方 阿里云镜像 解决步骤 关闭fastestmirrorvi /etc/yum/pluginconf.d/fastestmirror.conf
enable = 0
将原来的源改名,养成良好的备份习惯mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak1
更换源 替换为官方Vault源curl -o /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo
替换为阿里云Vault镜像curl -o /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/817310.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!