首页 > Linux操作系统 > Linux操作系统 > yum本地源及网络源配置
本地yum服务器配置及网络yum配置
1.本地yum源
setenfoce 0
/etc/init.d/iptables stop
mount -o loop redhat6.7.iso /mnt/
mkdir -pv /yum/repo
cp -avf /mnt/* /yum/repo
vim /etc/yum.repos.d/local.repo
[rhel6.7]
name=rhel6.7
baseurl=file:///yum/repo
enabled=1
gpgcheck=0
yum clean all
yum makecache
2. 配置网络yum源
yum -y install httpd
修改网站root路径
vim /etc/httpd/conf/httpd.conf
DocumentRoot "/yum/repo"
/etc/init.d/httpd restart
修改客户端repo
新增
vim /etc//yum.repos.d/local.repo
[rhel6.7]
name=rhel6.7
baseurl=http://172.16.3.12
enabled=1
gpgcheck=0
3.启用阿里云源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24486203/viewspace-2125945/ ,如需转载,请注明出处,否则将追究法律责任。