centos6.7 本地yum源配置
Posted 张冲andy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6.7 本地yum源配置相关的知识,希望对你有一定的参考价值。
[BEGIN] 2016/11/9 21:47:31
[[email protected] ~]# mount /dev/cdrom /media
mount: block device /dev/sr0 is write-protected, mounting read-only
[[email protected] ~]# cd /etc/yum
yum/ yum.conf yum.repos.d/
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-Debuginfo.repo CentOS-Media.repo
[[email protected] yum.repos.d]# mkdir bak
[[email protected] yum.repos.d]# mv *.repo bak
[[email protected] yum.repos.d]# ls
bak
[[email protected] yum.repos.d]# vi server.repo
添加>
————————————————————
[server]
name=server
baseurl=file:///media
enabled=1
gpgcheck=0
————————————————————
[[email protected] yum.repos.d]# yum list
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
server | 4.0 kB 00:00 ...
server/primary_db | 4.6 MB 00:00 ...
Installed Packages
ConsoleKit.x86_64 0.4.1-3.el6 @anaconda-CentOS-201508042137.x86_64/6.7
ConsoleKit-libs.x86_64 0.4.1-3.el6 @anaconda-CentOS-201508042137.x86_64/6.7
ConsoleKit-x11.x86_64 0.4.1-3.el6 @anaconda-CentOS-201508042137.x86_64/6.7
DeviceKit-power.x86_64 014-3.el6 @anaconda-CentOS-201508042137.x86_64/6.7
GConf2.x86_64 2.28.0-6.el6 @anaconda-CentOS-201508042137.x86_64/6.7
GConf2-gtk.x86_64 2.28.0-6.el6 @anaconda-CentOS-201508042137.x86_64/6.7
MAKEDEV.x86_64 3.24-6.el6 @anaconda-CentOS-201508042137.x86_64/6.7
。。。。此处省略大量输出
[[email protected] yum.repos.d]# cd /media
[[email protected] media]# ls
CentOS_BuildTag isolinux RPM-GPG-KEY-CentOS-Debug-6
EFI Packages RPM-GPG-KEY-CentOS-Security-6
EULA RELEASE-NOTES-en-US.html RPM-GPG-KEY-CentOS-Testing-6
GPL repodata TRANS.TBL
images RPM-GPG-KEY-CentOS-6
[[email protected] media]# cd Packages/
[[email protected] Packages]# yum -y install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
server | 4.0 kB 00:00 ...
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-16.el6 will be installed
--> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-16.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
el6.x86_64
6.x86_64
---> Package cpp.x86_64 0:4.4.7-16.el6 will be installed
4
--> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
gcc x86_64 4.4.7-16.el6 server 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 server 93 k
cpp x86_64 4.4.7-16.el6 server 3.7 M
mpfr x86_64 2.4.1-6.el6 server 157 k
ppl x86_64 0.10.2-11.el6 server 1.3 M
Transaction Summary
====================================================================================
Install 5 Package(s)
Total download size: 15 M
Installed size: 33 M
Downloading Packages:
------------------------------------------------------------------------------------
Total 38 MB/s | 15 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mpfr-2.4.1-6.el6.x86_64 1/5
Installing : cpp-4.4.7-16.el6.x86_64 2/5
Installing : ppl-0.10.2-11.el6.x86_64 3/5
Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 4/5
Installing : gcc-4.4.7-16.el6.x86_64 5/5
Verifying : cpp-4.4.7-16.el6.x86_64 1/5
Verifying : ppl-0.10.2-11.el6.x86_64 2/5
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 3/5
Verifying : mpfr-2.4.1-6.el6.x86_64 4/5
Verifying : gcc-4.4.7-16.el6.x86_64 5/5
Installed:
gcc.x86_64 0:4.4.7-16.el6
Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-16.el6
mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
Complete!
[END] 2016/11/9 21:54:47
以上是关于centos6.7 本地yum源配置的主要内容,如果未能解决你的问题,请参考以下文章