搭建本地yum源(http方式) on Red Hat Enterprise Linux Server

1)install httpd

yum install httpd

2) start httpd service

start service httpd

3)config file

 /etc/httpd/conf/httpd.conf
care the line

DocumentRoot"/var/www/html"  which is the config root to start http

4)verify the http work or not

http://localhost:80  or  http:httpserverip:80

if the site can't be access fromother client , please trun off the firewall  with 

service iptables stop

5) install  createrepo  

 yum install createrepo  

6) create the dir and copy the rpmsto the corresponding dir which you create just now

mkdir -p /var/www/html/localYum

cp rpms-pakages  /var/www/html/localYum

7)create respon index  and info file 

createrepo /var/www/html/localYum

 

8) in your client on which you wantto use the local yum you just create

vim /etc/yum.repos.d/rhel-source.repo

to add the line

 [CDGlocal]
name=RHEL
baseurl=http://10.200.114.144//localYum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

okay ,it's done ,you can yum cleanand yum update

yun install pkgs which the local yumrespon own

 

if you have any doubt you can referthe below reference which is detail for the process and how to fix the errorsyou may meet .

 



CentOS搭建本地yum源(http方式)

http://my.oschina.net/u/1461927/blog/372147



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值