2016年3月29日 星期二

linux FTP及NFS站台架設 2016/3/29

今天我們教了linux 的站台架設,一開始我們現要安裝ftp及nfs的套件

nfs套件安裝指令:  #yum -y install nfs-utils  

接下來就是啟動nfs: #systemctl start nfs-server.service
                       #systemctl enable nfs-server.service

防火牆的開啟: #firewall-cmd --permanent --add-service=nfs
                #firewall-cmd --reload

建立根目錄: #mkdir /myshare

設定分享目錄的權限:#vim /etc/exports/myshare  *.example.com(rw) 10.0.0.0/8(ro)

在 NFS Server 上,發佈分享目錄:#exportfs -r

在 NFS Server 上,啟動 SELiux 放行規定: #setsebool -P nfs_export_all_rw on
                                                                            #setsebool -P nfs_export_all_ro on

在 NFS Server 上,查詢分享狀態:#showmount -e

在 client 端,掛載 NFS Server 所分享目錄: #mkdir /mnt/nfsshare
                                      #mount -t nfs server(ps:請打自己的本機ip位置):/myshare /mnt/nfsshare

參考文獻資料:http://linux.onlinedoc.tw/search/label/Server%3A%3ANFS%20Server

沒有留言:

張貼留言