rhel8 網絡軟件倉庫的搭建

  • 虛擬機環境:
  • node1:192.168.1.10
  1. 利用鏡像搭建本地軟件倉庫
  2. 安裝共享軟件
  • 共享方式:http:// 超文本傳輸協議
  • 提供此協議的軟件: Apache
  • 軟件包名稱: httpd
  • 共享位置: /var/www/html
  • 安裝命令 在node1: dnf install httpd -y
  1. 啓用共享軟件Apache
 systemctl stop firewalld 
 systemctl disable firewalld
 systemctl enable --now httpd 

在這裏插入圖片描述
4. 建立共享目錄

  • rhel_8是自己建立的目錄,名字可以隨意
mkdir /var/www/html/rhel_8
  1. 掛載鏡像到共享目錄
  • 當鏡像在系統中存在
 mount /xxxxxxx.iso /var/www/html/rhel_8 
  • 當使用光驅讀取鏡像
 mount /dev/cdrom /var/www/html/rhel_8 

在這裏插入圖片描述

  • 在開機時自動掛載 vim /etc/rc.d/rc.local
 mount /dev/cdrom /var/www/html/rhel_8
 chmod 755 /etc/rc.d/rc.local
  1. 在遠程主機node2中訪問資源並書寫repo文件
    vim /etc/yum.repos.d/westos.repo
[AppStream]
name=AppStream
baseurl=http://192.168.1.10/rhel_8/AppStream/
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=http://192.168.1.10/rhel_8/BaseOS/
gpgcheck=0
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章