- 論壇徽章:
- 0
|
=========================================================== \r\n作者: tonykorn97(http://tonykorn97.itpub.net)\r\n發(fā)表于: 2008.04.05 22:51\r\n分類: linux \r\n出處: http://tonykorn97.itpub.net/post/6414/459075\r\n--------------------------------------------------------------- \r\n\r\n一,建立一個(gè)yum倉庫,建立服務(wù)端\r\n\r\n1,建立一個(gè)目錄/export/yum/Server\r\n2, 拷貝rpm到這個(gè)目錄\r\n\r\n\r\n\r\n\r\n3,安裝createrepo\r\n[root@localhost Server]# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm \r\nwarning: createrepo-0.4.4-2.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186\r\nPreparing... ########################################### [100%]\r\n1:createrepo ########################################### [100%]\r\n[root@localhost yum]# \r\n\r\n4,執(zhí)行:\r\n[root@localhost Server]# createrepo -v /export/yum/Server\r\n1/2158 - libbtctl-0.6.0-9.2.el5.i386.rpm\r\n2/2158 - man-pages-cs-0.16-6.noarch.rpm\r\n\r\n5,配置一下httpd服務(wù)\r\n做鏈接文件:\r\n[root@localhost html]# pwd\r\n/var/www/html\r\n[root@localhost html]# ln -s /export/ ./\r\n\r\n重新啟動(dòng)httpd服務(wù)\r\n[root@localhost html]# service httpd restart\r\nStopping httpd: [ OK ]\r\nStarting httpd: [ OK ]\r\n[root@localhost html]#\r\n\r\n6,客戶端清除yum緩存信息:\r\n[root@localhost ~]# yum clean dbcache\r\nLoading \"security\" plugin\r\nLoading \"rhnplugin\" plugin\r\nLoading \"installonlyn\" plugin\r\nThis system is not registered with RHN.\r\nRHN support will be disabled.\r\n0 cache files removed\r\n[root@localhost ~]# \r\n\r\n\r\n二,建立yum客戶端配置文件\r\ncreate a file in /etc/yum.repos.d for your repository\r\n文件內(nèi)容:\r\n[tonykorn97]\r\nname=tonykorn97 yum server\r\nbaseure=http://172.25.1.141/export/yum/Server\r\nenabled=1\r\ngpgcheck=0\r\n\r\n更新的時(shí)候提示:\r\n[root@localhost yum.repos.d]# yum list httpd\r\nLoading \"security\" plugin\r\nLoading \"rhnplugin\" plugin\r\nLoading \"installonlyn\" plugin\r\nThis system is not registered with RHN.\r\nRHN support will be disabled.\r\nSetting up repositories\r\nError: Cannot find a valid baseurl for repo: tonykorn97\r\n[root@localhost yum.repos.d]# \r\n\r\n更改為就內(nèi)容為:\r\n[tonykorn97]\r\nname=tonykorn97 yum server\r\nbaseure=file:///export/yum/Server\r\nenabled=1\r\ngpgcheck=0\r\n\r\n一樣的結(jié)果。\r\n\r\n發(fā)現(xiàn)是baseurl寫錯(cuò)成baseure了,更改過來后就可以了。 |
|