国产91精品在线播放,欧美精品在线免费,日韩中文字幕在线有码视频网

上海校區切換校區
圖標

學習文章

當前位置:首頁 > >學習文章 > >

{紅帽 RHCE}RHEL7使用ISO鏡像文件構筑本地YUM

發布時間: 2018-02-25 23:26:53

YUM是在FedoraRedHat以及SUSE中基于rpm的軟件包管理器,它可以使系統管理人員交互和自動化地更細與管理RPM軟件包,能夠從指定的服務器自動下載RPM包并且安裝,可以自動處理依賴性關系,并且一次安裝所有依賴的軟體包,無須繁瑣地一次次下載、安裝。

 

RHEL7中的RedHatYUM需要注冊付費才能使用,本文簡單介紹一下使用iso鏡像文件建立本地YUM源;

 

Step1:上傳RHEL7的鏡像文件到/iso目錄;

[root@rhel7-01 ~]# cd /iso

[root@rhel7-01 iso]# ls -l

total 3948548

-rw-r--r--. 1 root root 4043309056 Feb 25 20:46 rhel-server-7.2-x86_64-dvd.iso

[root@rhel7-01 iso]#

 

Step2mount這個iso文件到/mnt/iso目錄;

[root@rhel7-01 ~]# mount /iso/rhel-server-7.2-x86_64-dvd.iso /mnt/iso

mount: /dev/loop0 is write-protected, mounting read-only

[root@rhel7-01 ~]#

 

Step3:新建repo文件;

[root@rhel7-01 ~]# cd /etc

[root@rhel7-01 etc]# cd yum.repos.d/

[root@rhel7-01 yum.repos.d]# vim rhel7_local.repo

 

Step4:編輯repo文件,指定YUM路徑;

[rhel7_local]

name = rhel7_local

baseurl = file:///mnt/iso

enable = 1

gpgcheck = 0

 

Step5:建立YUM緩存數據庫,加快后續軟件安裝速度;

[root@rhel7-01 ~]# yum makecache

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

rhel7_local                                                                      | 4.1 kB  00:00:00    

(1/4): rhel7_local/group_gz                                                      | 136 kB  00:00:00     

(2/4): rhel7_local/filelists_db                                                  | 3.2 MB  00:00:00    

(3/4): rhel7_local/primary_db                                                    | 3.6 MB  00:00:00    

(4/4): rhel7_local/other_db                                                      | 1.4 MB  00:00:00    

Metadata Cache Created

 

Step6:編輯fstab,實現開機自動mount

[root@rhel7-01 ~]# cd /etc

[root@rhel7-01 etc]# vim fstab

 

Step7:添加最后一行內容,開機自動mount,需要指明iso9660文件類型;

/iso/rhel-server-7.2-x86_64-dvd.iso     /mnt/iso iso9660 defaults       0 0

 

Step8:確認fstab有效性和正確性;

[root@rhel7-01 ~]# mount -a

[root@rhel7-01 ~]# mount | grep iso

/iso/rhel-server-7.2-x86_64-dvd.iso on /mnt/iso type iso9660 (ro,relatime)

 

Step9:本地YUM源生效后,就能直接使用yum install 實現軟件的快速安裝部署;

[root@rhel7-01 ~]# yum install vsftpd* -y

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Resolving Dependencies

--> Running transaction check

---> Package vsftpd.x86_64 0:3.0.2-10.el7 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

========================================================================================================

 Package              Arch                 Version                      Repository                 Size

========================================================================================================

Installing:

 vsftpd               x86_64               3.0.2-10.el7                 rhel7_local               167 k

 

Transaction Summary

========================================================================================================

Install  1 Package

 

Total download size: 167 k

Installed size: 347 k

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : vsftpd-3.0.2-10.el7.x86_64                                                           1/1

  Verifying  : vsftpd-3.0.2-10.el7.x86_64                                                           1/1

 

Installed:

  vsftpd.x86_64 0:3.0.2-10.el7                                                                          

 

Complete!

 

王亦軍 老師 上海騰科

2018.02.25 提交上傳

 

上一篇: {思科 CCNA-SEC }由生成樹引發的端口五種狀態

下一篇: {紅帽 RHCA}Docker生態系統

在線咨詢 ×

您好,請問有什么可以幫您?我們將竭誠提供最優質服務!

<menuitem id="vlare"></menuitem>

    <ul id="vlare"><rp id="vlare"><optgroup id="vlare"></optgroup></rp></ul>

  • 主站蜘蛛池模板: 盈江县| 东平县| 开阳县| 小金县| 泗水县| 温州市| 贵定县| 石景山区| 阿城市| 石狮市| 台州市| 南川市| 左贡县| 麟游县| 吴堡县| 庆云县| 太保市| 两当县| 金华市| 织金县| 双鸭山市| 托里县| 石台县| 平南县| 新竹市| 漳平市| 沂水县| 陇南市| 卓尼县| 玛多县| 新平| 伽师县| 彝良县| 芦山县| 莱芜市| 青铜峡市| 百色市| 房产| 隆回县| 铁岭县| 通化市|