CentOS 7手工创建自己的YUM仓库
时间:2015-07-11 19:10 来源:linux.it.net.cn 作者:IT
一、简介
[root
@localhost
~]
# cd /etc/yum.repos.d/
[root
@localhost
yum.repos.d]
# ll
total 24
-rw
-r--r--. 1 root root 1664 Mar 31 15:27 CentOS-Base.repo
-rw
-r--r--. 1 root root 1309 Mar 31 15:27 CentOS-CR.repo
-rw
-r--r--. 1 root root 649 Mar 31 15:27 CentOS-Debuginfo.repo
-rw
-r--r--. 1 root root 290 Mar 31 15:27 CentOS-fasttrack.repo
-rw
-r--r--. 1 root root 1331 Mar 31 15:27 CentOS-Sources.repo
-rw
-r--r--. 1 root root 1002 Mar 31 15:27 CentOS-Vault.repo
[root
@localhost
~]
# cd /
[root
@localhost
/]
# mkdir yum-packages
[root
@localhost
/]
# cp -rv /run/media/centostest/CentOS\ 7\ x86_64/Packages/* /yum-packages/
[root
@localhost
/]
# cd yum-packages/
[root
@localhost
yum-packages]
# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm
warning: createrepo-0.9.9-23.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing...
################################# [100%]
package createrepo-0.9.9-23.el7.noarch is already installed
createrepo /yum-packages/
[root
@localhost
yum-packages]
# cd /etc/yum.repos.d/
[root
@localhost
yum.repos.d]
# vim ownyum.repo
[root
@localhost
yum.repos.d]
# cat ownyum.repo
[centos]
name = centos yum
baseurl = file:///yum-packages/
[root
@localhost
yum.repos.d]
#
[root
@localhost
yum.repos.d]
# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: centos
Cleaning up everything
Cleaning up list of fastest mirrors
[root
@localhost
yum.repos.d]
# yum list
xorg-x11-xbitmaps.noarch 1.1.1-6.el7 centos
xpp3.noarch 1.1.3.8-11.el7 centos
xrestop.x86_64 0.4-14.el7 centos
xsane-common.x86_64 0.999-9.el7 centos
xsane-gimp.x86_64 0.999-9.el7 centos
xsettings-kde.x86_64 0.12.3-7.el7 centos
xsom.noarch 0-10.20110809svn.el7 centos
xterm.x86_64 295-3.el7 centos
xulrunner.x86_64 31.4.0-1.el7.centos centos
xz-devel.x86_64 5.1.2-9alpha.el7 centos
yp-tools.x86_64 2.14-3.el7 centos
ypbind.x86_64 3:1.37.1-7.el7 centos
ypserv.x86_64 2.31-8.el7 centos
yum-plugin-aliases.noarch 1.1.31-29.el7 centos
yum-plugin-changelog.noarch 1.1.31-29.el7 centos
yum-plugin-tmprepo.noarch 1.1.31-29.el7 centos
yum-plugin-verify.noarch 1.1.31-29.el7 centos
yum-plugin-versionlock.noarch 1.1.31-29.el7 centos
zlib-devel.x86_64 1.2.7-13.el7 centos
zsh.x86_64 5.0.2-7.el7 centos
zziplib.x86_64 0.13.62-5.el7 centos
(责任编辑:IT)
一、简介
(责任编辑:IT) |