2015年8月6日 星期四

在Redhat中建立軟體倉儲

在VirtualBox的視窗裝置>Network>網路設定將原本NAT的設定改成"橋接介面卡"

1.首先在 Redhat映像檔搜尋 vsftpd 並且安裝
2.在電腦/var/ftp/pub , 把redhat映像檔裡的東西全部copy到/pub裡面

^^這樣以後安裝東西就可以不用再從 Redhat裡面來安裝檔案了

3.pub 資料夾裡面尋找createrepo 並且安裝

這邊有解釋createrepo是什麼,並且如何使用 "用createrepo配置Yum本地源1"、"使用createrepo创建自己的yum源2"、"createrepo"


4.在終端機理執行 #createrepo -g /var/ftp/pub/repodata/76..... /var/ftp/pub
5.# cd /etc/yum.repos.d/
6.# gedit test.repo           gedit是Linux裡的記事本
7.在記事本裡面輸入

[RHEL70]
name = RHEL7
baseurl = ftp://localhost/pub
enable = 1
gpgcheck = 0

8.#systemctl enable vsftpd.service
9.#restorecon -R /var/ftp/pub

ˇˇ這邊在防火牆裡增加例外IP,這樣連線近來時才不會被擋住

10.#firewall-cmd --permanent --add-service=ftp
11.#systemctl restart vsftpd.service   重新開啟
12.#systemctl status vsftpd.service    在去看看狀態是否是開啟的



沒有留言:

張貼留言