【Linux】Linux软件安装管理5 挂载本地iso光盘镜像、配置yum软件仓库

Linux软件安装管理5
挂载本地iso光盘镜像、配置yum软件仓库


当操作异地机房里的服务器,使用rpm命令进行软件包安装时,不方便解决依赖关系
配置yum软件仓库,使用yum安装软件可以自动处理依赖关系
将系统光盘上传到服务器上,linux 挂载iso光盘镜像文件,配置yum软件仓库

1 上传iso文件
使用xftp上传rhel6.4系统光盘镜像到/software


[root@rhel64 ~]# cd /software/
[root@rhel64 software]# ls -lh



为方便使用,重命名光盘镜像文件
[root@rhel64 software]# mv rhel-server-6.4-x86_64-dvd.iso rhel64.iso
[root@rhel64 software]# ls -lh


2 创建挂载点
[root@rhel64 ~]# mkdir /mnt/yum
[root@rhel64 ~]# ls -ld /mnt/yum


3 临时挂载iso文件

[root@rhel64 ~]# df -Th


直接执行mount命令,提示使用-o loop选项
[root@rhel64 ~]# mount /software/rhel64.iso /mnt/yum/


[root@rhel64 ~]# mount -o loop /software/rhel64.iso /mnt/yum
[root@rhel64 ~]# df -Th


卸载
[root@rhel64 ~]# umount /mnt/yum

[root@rhel64 ~]# df -Th


4 实现iso文件开机自动挂载
编写/etc/fstab文件,追加写入信息

/software/rhel64.iso    /mnt/yum                iso9660 loop            0 0

[root@rhel64 ~]# vi /etc/fstab


[root@rhel64 ~]# grep iso /etc/fstab


执行mount -a命令,挂载验证
[root@rhel64 ~]# mount -a
[root@rhel64 ~]# df -Th


重启操作系统验证
[root@rhel64 ~]# reboot


[root@rhel64 ~]# df -Th


5 配置yum软件仓库
[root@rhel64 ~]# cat /etc/yum.repos.d/rhel-source.repo


[root@rhel64 ~]# yum clean all
[root@rhel64 ~]# yum info zsh





吕星昊
2016.3.24


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29475508/viewspace-2063193/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29475508/viewspace-2063193/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值