时间:2021-07-01 10:21:17 帮助过:4人阅读
注:我这里没有此步骤
二、 开始搭建yum
1. 生成依赖关系
[root@localhost Packages]# createrepo -g /mnt/repodata/cda5429be6f36ce1348e8f897f4fc96aa00d5727c75e9e5a0b5dc40d22a51116-comps-ol6-Server.xml /var/ftp/pub/Packages/
Spawning worker 0 with 3720 pkgs
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
注:我这里没有做此步骤,最后也可以。不知道这步骤是不是必须的。
2. 编辑yum仓库配置文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi local.repo
[myyum]
name=olinux Myyum
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
3. 至此本地yum安装完毕,测试下是否能够正常使用
[root@localhost yum.repos.d]# yum grouplist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Group Process
myyum | 3.8 kB 00:00 ...
myyum/primary_db | 3.1 MB 00:00 ...
myyum/group_gz | 204 kB 00:00 ...
Installed Groups:
Additional Development
Base
Debugging Tools
Desktop
Desktop Debugging and Performance Tools
Desktop Platform
Dial-up Networking Support
Directory Client
Network file system client
Assamese Support [as]
Available Language Groups:
Afrikaans Support [af]
Albanian Support [sq]
Amazigh Support [ber]
Azerbaijani Support [az]
Ukrainian Support [uk]
Upper Sorbian Support [hsb]
Uzbek Support [uz]
Vietnamese Support [vi]
Walloon Support [wa]
Welsh Support [cy]
Xhosa Support [xh]
Zulu Support [zu]
Done
[root@localhost yum.repos.d]#
OK !!!
推荐阅读:
RedHat Linux 本地yum源的配置 http://www.linuxidc.com/Linux/2013-08/88217.htm
RedHat 6.2 Linux修改yum源免费使用CentOS源 http://www.linuxidc.com/Linux/2013-07/87383.htm
配置EPEL YUM源 http://www.linuxidc.com/Linux/2012-10/71850.htm
Redhat 本地yum源配置 http://www.linuxidc.com/Linux/2012-11/75127.htm
yum的配置文件说明 http://www.linuxidc.com/Linux/2013-04/83298.htm
RedHat 6.1下安装yum(图文) http://www.linuxidc.com/Linux/2013-06/86535.htm
YUM 安装及清理 http://www.linuxidc.com/Linux/2013-07/87163.htm
Oracle linux6.1配置yum本地源
标签: