s
CentOS7.2配置本地yum源
https://www.cnblogs.com/yybrhr/p/9914392.html
CentOS 7 yum
文件:/etc/yum.repos.d/lindows.repo
[yum-cd] name=cd rpm baseurl=http://10.27.97.1/centos73/x86_64/os gpgcheck=0 enabled=1 [centos73] name=CentOS-7.3 baseurl=http://10.27.97.1/centos73/x86_64/ enabled=1 gpgcheck=0 [centos7.3] name=CentOS-7.3 baseurl=http://192.168.86.5/centos73/x86_64/os/ enabled=1 gpgcheck=0 [centos7.3-updates] name=CentOS-7.3 - Updates baseurl=http://192.168.86.5/centos73/x86_64/updates/ enabled=1 gpgcheck=0 [dockerrepo] name=Docker Repository baseurl=http://10.27.97.35/docker/centos/7/ enabled=1 gpgcheck=0 [centosrepo] name=CentOS Repository baseurl=http://10.27.97.35/centos/7/x86_64/ enabled=1 gpgcheck=0 [update] name=update baseurl=http://10.27.97.35/centos/7/updates/x86_64/ enabled=1 gpgcheck=0 [update-os] name=update-os baseurl=http://10.27.97.35/centos/7/os/x86_64/ enabled=1 gpgcheck=0 [3rdparty] name=3rdparty baseurl=http://10.27.97.35/centos/7/3rdparty/ enabled=1 gpgcheck=0
配置本地yum更新源
1、#停止firewall
[root@cnhq-scts-app28 ~]# systemctl stop firewalld.service
#禁止firewall开机启动
[root@cnhq-scts-app28 ~]# systemctl disable firewalld.service
#查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
[root@cnhq-scts-app28 ~]# firewall-cmd --state
- 获得root 控制权限。在“#”下操作。
- 查看防火墙状态。
systemctl status firewalld
- 临时关闭防火墙命令。重启电脑后,防火墙自动起来。
systemctl stop firewalld
- 永久关闭防火墙命令。重启后,防火墙不会自动启动。
systemctl disable firewalld
- 打开防火墙命令。
systemctl enable firewalld
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
1、 首先卸载以前装的epel以免影响
rpm -e epel-release
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、运行yum makecache生成缓存
end
1、 首先卸载以前装的epel以免影响
rpm -e epel-release