ITPub博客

首页 > Linux操作系统 > Linux操作系统 > yum本地源及网络源配置

yum本地源及网络源配置

原创 Linux操作系统 作者:shawnloong 时间:2016-10-08 17:05:10 0 删除 编辑

本地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/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 批量提交事例
下一篇: mysql 5.7主主同步
请登录后发表评论 登录
全部评论

注册时间:2011-08-29

  • 博文量
    110
  • 访问量
    292630