标签:erb 基于 规则 check mod hat ble term rom
说明:
Yum(Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,可以自动处理依赖性关系。
Yum软件仓库的作用是为了进一步简化RPM管理软件的难度以及自动分析所需软件包及其依赖关系的技术。可以把Yum想象成是一个硕大的软件仓库,里面保存有几乎所有常用的工具,而且只需要说出所需的软件包名称,系统就会自动搞定一切。
既然要使用Yum软件仓库,就要先把它搭建起来,然后将其配置规则确定好才行。
一、挂载本地光盘
1.1.编辑配置文件
[root@desktop ~]# cd /etc/yum.repos.d/ [root@desktop yum.repos.d]# cat my.repo [centos7] name=centos7 baseurl=file:///media/cdrom gpgcheck=0 enabled=1 [root@desktop yum.repos.d]#
1.2.创建挂载目录手动挂载
[root@desktop ~]# mkdir -p /media/cdrom/ [root@desktop ~]# mount -o loop -t iso9660 /dev/cdrom /media/cdrom [root@desktop ~]# ls /media/cdrom/ CentOS_BuildTag EFI EULA GPL images isolinux LiveOS Packages repodata RPM-GPG-KEY-CentOS-7 RPM-GPG-KEY-CentOS-Testing-7 TRANS.TBL [root@desktop ~]#
1.3.测试验证
[root@desktop ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: centos7 Cleaning up list of fastest mirrors Other repos take up 166 M of disk space (use --verbose for details) [root@desktop ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors centos7 | 3.6 kB 00:00:00 (1/4): centos7/group_gz | 166 kB 00:00:00 (2/4): centos7/filelists_db | 3.2 MB 00:00:00 (3/4): centos7/primary_db | 3.1 MB 00:00:00 (4/4): centos7/other_db | 1.3 MB 00:00:00 Metadata Cache Created [root@desktop ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile repo id repo name status centos7 centos7 4,021 repolist: 4,021 [root@desktop ~]# 安装测试: [root@desktop ~]# yum install http\* -y
1.4.设置自动挂载:
[root@desktop ~]# blkid /dev/cdrom /dev/cdrom: UUID="2018-11-25-23-54-16-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" [root@desktop ~]# echo "UUID=2018-11-25-23-54-16-00 /media/cdrom iso9660 defaults 0 0" >>/etc/fstab [root@desktop ~]# [root@desktop ~]# [root@desktop ~]# mount -av / : ignored /boot : already mounted swap : ignored mount: /dev/sr0 is write-protected, mounting read-only /media/cdrom : successfully mounted [root@desktop ~]#
标签:erb 基于 规则 check mod hat ble term rom
原文地址:https://www.cnblogs.com/tanshouke/p/12233541.html