首页 > 系统服务 > 详细

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

时间:2016-03-27 02:36:51      阅读:270      评论:0      收藏:0      [点我收藏+]
Linux软件安装管理5
挂载本地iso光盘镜像、配置yum软件仓库


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

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

[root@rhel64 ~]# cd /software/
[root@rhel64 software]# ls -lh
bubuko.com,布布扣


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

2 创建挂载点
[root@rhel64 ~]# mkdir /mnt/yum
[root@rhel64 ~]# ls -ld /mnt/yum
bubuko.com,布布扣

3 临时挂载iso文件

[root@rhel64 ~]# df -Th
bubuko.com,布布扣

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

[root@rhel64 ~]# mount -o loop /software/rhel64.iso /mnt/yum
[root@rhel64 ~]# df -Th
bubuko.com,布布扣

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

[root@rhel64 ~]# df -Th
bubuko.com,布布扣

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

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

[root@rhel64 ~]# vi /etc/fstab
bubuko.com,布布扣

[root@rhel64 ~]# grep iso /etc/fstab
bubuko.com,布布扣

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

重启操作系统验证
[root@rhel64 ~]# reboot
bubuko.com,布布扣

[root@rhel64 ~]# df -Th
bubuko.com,布布扣

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

[root@rhel64 ~]# yum clean all
[root@rhel64 ~]# yum info zsh
bubuko.com,布布扣




吕星昊
2016.3.24


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

原文:http://blog.itpub.net/29475508/viewspace-2063193/

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!