企业内部yum的使用

一,建立一个yum仓库,建立服务端

1,建立一个目录/export/yum/Server
2, 拷贝rpm到这个目录



3,安装createrepo
[root@localhost Server]# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
warning: createrepo-0.4.4-2.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
[root@localhost yum]#

4,执行:
[root@localhost Server]# createrepo -v /export/yum/Server
1/2158 - libbtctl-0.6.0-9.2.el5.i386.rpm
2/2158 - man-pages-cs-0.16-6.noarch.rpm

5,配置一下httpd服务
做链接文件:
[root@localhost html]# pwd
/var/www/html
[root@localhost html]# ln -s /export/ ./

重新启动httpd服务
[root@localhost html]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@localhost html]#

6,客户端清除yum缓存信息:
[root@localhost ~]# yum clean dbcache
Loading "security" plugin
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
0 cache files removed
[root@localhost ~]#


二,建立yum客户端配置文件
create a file in /etc/yum.repos.d for your repository
文件内容:
[tonykorn97]
name=tonykorn97 yum server
baseure=http://172.25.1.141/export/yum/Server
enabled=1
gpgcheck=0

更新的时候提示:
[root@localhost yum.repos.d]# yum list httpd
Loading "security" plugin
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up repositories
Error: Cannot find a valid baseurl for repo: tonykorn97
[root@localhost yum.repos.d]#

更改为就内容为:
[tonykorn97]
name=tonykorn97 yum server
baseure=file:///export/yum/Server
enabled=1
gpgcheck=0

一样的结果。

发现是baseurl写错成baseure了,更改过来后就可以了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245852/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/312079/viewspace-245852/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值