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-KEY,0為不檢查,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軟件)