一:挂载光盘
1、mkdir /mnt/cdrom:创建新挂载点
2、临时挂载:mount /dev/cdrom /mnt/cdrom
二、配置yum源
1、cd /etc/yum.repos :进入源目录
2、进入该目录查看:ll
[root@localhost yum.repos.d]# ll
total 4
drwxr-xr-x. 2 root root 187 Dec 9 2017 bak
-rw-r--r--. 1 root root 560 Dec 9 2017 local.repo
3、编辑.repo文件:vi local.repo,更改baseurl为:file:///mnt/cdrom,自己的挂载点
三、安装软件
1、输入:yum repolist查看yum仓库状态
[root@localhost yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
repo id repo name
!c7-media CentOS-7 - Media
repolist: 9,363
2、利用yum -y install 软件名开始安装软件。
yum install -y svn git gcc gcc-c++ libX11-devel libtool-ltdl-devel glibc-static libstdc++-devel openssl-randr-devel libXfixes-devel libjpeg-devel cyrus-sasl-devel glib2-devel pixman-devel celt051-devel pyparsing alslugins-base-devel gstreamer-devel gtk2-devel libwebp-devel libva-devel libsysfs-devel SDL-devel SDL_ttf-devel qel dos2unix rpm-build
结束后出现:
Complete! 安装成功!
参考地址:https://www.cnblogs.com/xiaoaofengyue/p/8080494.html