ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 企业内部yum的使用

企业内部yum的使用

原创 Linux操作系统 作者:tonykorn97 时间:2008-04-05 00:00:00 0 删除 编辑

一,建立一个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博客 ” ,链接:https://blog.itpub.net/312079/viewspace-245852/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 通过vnc 安装linux
请登录后发表评论 登录
全部评论

注册时间:2007-12-05

  • 博文量
    1854
  • 访问量
    2088407