RHEL7 配置FTP yum 源


 

2、接下來配置客戶端

CLIENT的目錄/etc/yum.repos.d/創建文件rhel7.repo ,配置本地yum

cd /etc/yum.repos.d/   #進入yum配置目錄 

touch  rhel7.repo   #建立yum配置文件 

vim  rhel7.repo   #編輯配置文件,添加以下內容 

[rhel-yum]

name=rhel7   #自定義名稱 

baseurl= ftp://192.168.1.6/pub/Packages #ftp訪問路徑 

enabled=1   #啟用yum源,0為不啟用,1為啟用 

gpgcheck=0  #檢查GPG-KEY0為不檢查,1為檢查 

:wq! #保存退出 

(以下為示例,ip地址請自行修改)

4、、CLIENT測試使用yum命令自動安裝軟件

yum clean all   #清除yum緩存 

yum makecache  #緩存本地yum源中的軟件包信息

yum install httpd   #安裝apache 

rpm -ql httpd  #查詢所有安裝httpd的目錄和文件 

systemctl start httpd.service  #啟動apache 

systemctl stop httpd.service  #停止apache 

systemctl restart httpd.service  #重啟apache 

systemctl enable httpd.service  #設置開機啟動 

RHEL 7.0默認使用的是firewall作為防火牆,這里改為iptables防火牆。

5、通過yum安裝GUI圖形界面# yum -y groupinstall "Server with GUI"可以執行startx看下效果。

      通過yum卸載軟件 yum -y remove httpd(移除httpd軟件)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM