1、基本信息描述
redhat版本:redhat 7.4
/tools/rhel-server-7.4-x86_64-dvd.iso
2、创建挂载目录与挂载ISO文件
[root@test2 /]# mkdir -p /mnt/cdrom
[root@test2 /]# mount -o loop /tools/rhel-server-7.4-x86_64-dvd.iso /mnt/cdrom/
mount: /dev/loop0 is write-protected, mounting read-only
[root@test2 tools]#
3、配置yum配置文件myself.repo
[root@test2 /]# cd /etc/yum.repos.d/
[root@test2 yum.repos.d]# ll
total 0
[root@test2 yum.repos.d]# vi myself.repo
[RedHat7]
name=RedHat7
baseurl=file:///mnt/cdrom
enabled=1
gpgckeck=0
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
4、清除缓存
[root@test2 yum.repos.d]# yum clean all
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: RedHat7
Cleaning up everything
[root@test2 yum.repos.d]#
5、配置开机启动:
[root@test2 yum.repos.d]# vi /etc/fstab
/tools/rhel-server-7.4-x86_64-dvd.iso /mnt/cdrom/ iso9660 defaults 0 0
6、成功性验证测试
[root@test2 yum.repos.d]# yum -y install gcc*
[root@test2 yum.repos.d]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 25G 4.9G 21G 20% /
devtmpfs 487M 0 487M 0% /dev
tmpfs 497M 0 497M 0% /dev/shm
tmpfs 497M 6.7M 490M 2% /run
tmpfs 497M 0 497M 0% /sys/fs/cgroup
/dev/sda3 2.0G 33M 2.0G 2% /home
/dev/sda1 1014M 119M 896M 12% /boot
tmpfs 100M 0 100M 0% /run/user/0
/dev/loop0 3.8G 3.8G 0 100% /mnt/cdrom
[root@test2 yum.repos.d]#
Redhat7-yum本地源安装配置
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:linux安装mysql
下一篇:linux创建用户设置密码
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
使用Nginx搭建本地YUM源
离线环境使用nginx搭建本地yum源(2种方式)
nginx yum源 服务器 -
RHEL7.6安装DM8数据库
RHEL7.6安装DM8数据库
数据库 图形化界面 -
RHEL7.6升级openssh8.6p1版
升级openssh
openssh Linux RHEL 红帽 -
RHEL5 本地yum
下面是一些步骤: 测试,安装vsftp 这样配置,在rhel不用复制光盘的文件到硬盘,占用硬盘空间。
职场 yum 休闲 本地yum -
rhel 7.6静默安装oracle 11.2.0.4
rhel7.6 静默安装oracle 11.2.0.4
oracle unix 数据库