配置Yum步骤

[root@localhost ~]# mkdir /media/dvd
[root@localhost ~]# mount /dev/cdrom /media/dvd
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost Packages]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mkdir /yum.repo.bak
[root@localhost yum.repos.d]# mv * /yum.repo.bak/
[root@localhost yum.repos.d]# vim yum.repo
编辑yum配置文件内容
[local]
name=localyum
baseurl=file:///media/dvd
enabled=1
gpgcheck=0

[root@localhost yum.repos.d]# yum -y install gcc gcc-c++
Loaded plugins: fastestmirror, langpacks
local | 3.6 kB 00:00
(1/2): local/group_gz | 155 kB 00:00
(2/2): local/primary_db | 3.0 MB 00:00
Loading mirror speeds from cached hostfile
Resolving Dependencies
–> Running transaction check
—> Package gcc.x86_64 0:4.8.5-11.el7 will be installed
–> Processing Dependency: cpp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
–> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-11.el7.x86_64
–> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-11.el7.x86_64
—> Package gcc-c++.x86_64 0:4.8.5-11.el7 will be installed
–> Processing Dependency: libstdc+±devel = 4.8.5-11.el7 for package: gcc-c+±4.8.5-11.el7.x86_64
–> Running transaction check
—> Package cpp.x86_64 0:4.8.5-11.el7 will be installed
—> Package glibc-devel.x86_64 0:2.17-157.el7 will be installed
–> Processing Dependency: glibc-headers = 2.17-157.el7 for package: glibc-devel-2.17-157.el7.x86_64
–> Processing Dependency: glibc-headers for package: glibc-devel-2.17-157.el7.x86_64
—> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
—> Package libstdc+±devel.x86_64 0:4.8.5-11.el7 will be installed
–> Running transaction check
—> Package glibc-headers.x86_64 0:2.17-157.el7 will be installed
–> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-157.el7.x86_64
–> Processing Dependency: kernel-headers for package: glibc-headers-2.17-157.el7.x86_64
–> Running transaction check
—> Package kernel-headers.x86_64 0:3.10.0-514.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size

Installing:
gcc x86_64 4.8.5-11.el7 local 16 M
gcc-c++ x86_64 4.8.5-11.el7 local 7.2 M
Installing for dependencies:
cpp x86_64 4.8.5-11.el7 local 5.9 M
glibc-devel x86_64 2.17-157.el7 local 1.1 M
glibc-headers x86_64 2.17-157.el7 local 668 k
kernel-headers x86_64 3.10.0-514.el7 local 4.8 M
libmpc x86_64 1.0.1-3.el7 local 51 k
libstdc+±devel x86_64 4.8.5-11.el7 local 1.5 M

Transaction Summary

Install 2 Packages (+6 Dependent packages)

Total download size: 37 M
Installed size: 84 M
Downloading packages:

Total 74 MB/s | 37 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libmpc-1.0.1-3.el7.x86_64 1/8
Installing : cpp-4.8.5-11.el7.x86_64 2/8
Installing : libstdc+±devel-4.8.5-11.el7.x86_64 3/8
Installing : kernel-headers-3.10.0-514.el7.x86_64 4/8
Installing : glibc-headers-2.17-157.el7.x86_64 5/8
Installing : glibc-devel-2.17-157.el7.x86_64 6/8
Installing : gcc-4.8.5-11.el7.x86_64 7/8
Installing : gcc-c+±4.8.5-11.el7.x86_64 8/8
Verifying : glibc-devel-2.17-157.el7.x86_64 1/8
Verifying : kernel-headers-3.10.0-514.el7.x86_64 2/8
Verifying : gcc-c+±4.8.5-11.el7.x86_64 3/8
Verifying : cpp-4.8.5-11.el7.x86_64 4/8
Verifying : gcc-4.8.5-11.el7.x86_64 5/8
Verifying : glibc-headers-2.17-157.el7.x86_64 6/8
Verifying : libstdc+±devel-4.8.5-11.el7.x86_64 7/8
Verifying : libmpc-1.0.1-3.el7.x86_64 8/8

Installed:
gcc.x86_64 0:4.8.5-11.el7 gcc-c++.x86_64 0:4.8.5-11.el7

Dependency Installed:
cpp.x86_64 0:4.8.5-11.el7 glibc-devel.x86_64 0:2.17-157.el7
glibc-headers.x86_64 0:2.17-157.el7 kernel-headers.x86_64 0:3.10.0-514.el7
libmpc.x86_64 0:1.0.1-3.el7 libstdc+±devel.x86_64 0:4.8.5-11.el7

Complete!
yum安装成功!

List item

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值