shell第9-10章NFS_SMB_Apache_FTP伺服器

weixin_34116110發表於2018-10-11

NFS

1、
NFS-網路檔案系統:Network File System
NFS是一個檔案系統,而RPC 是負責資訊的傳輸,它們是相互利用的關係
2、
引數值:
rw可讀寫(read-write)
ro只讀(read-only)
針對/share-lewis目錄,192.168.1.1/32有隻讀許可權:
/share-lewis   192.168.1.1/32(ro)  
針對/mnt/sda4/share,192.168.1.1/32有讀寫許可權,其他人只有只讀許可權:
/mnt/sda4/share 192.168.17.130/32(rw)  *(ro)
3、
NFS-網路檔案系統-服務和防火牆
systemctl start nfs
systemctl start rpcbind

firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --reload

SAMBA

1、
SAMBA是一個讓Linux和Windows之間通訊的軟體,全程為:server message block
2、
配置SAMBA伺服器
安裝Samba
yum install -y samba
啟動Samba伺服器
systemctl restart smb nmb
systemctl enable smb nmb
檢視配置檔案:/etc/samba/smb.conf

Apache

1、
Apache是裝在伺服器上的一個軟體,提供web服務。是當今裝置排在第一位的web伺服器軟體,遠遠領先於微軟的IIS
2、
安裝Apache軟體
yum install  httpd* -y
3、
Apache主配置檔案介紹:
/etc/httpd -apache主目錄
/etc/httpd/conf/httpd.conf -apache主配置檔案
/etc/httpd/conf.d -apache附加模組配置檔案
/etc/httpd/modules -apache模組檔案路徑連結
/etc/httpd/bin/ -apache二進位制命令
/etc/httpd/logs -apache預設日誌檔案位置
systemctl restart httpd.service
firewall-cmd --permanent --add-service=http

FTP

1、
軟體安裝
yum install -y vsftpd.x86_64
systemctl start vsftpd
systemctl enable vsftpd
firewall-cmd --permanent --add-service=ftp
firewall-cmd --reload

相關文章