NFS服务器
(把远程系统文件挂载到本地的文件系统下)
- 服务器中需配置的内容
#ifconfig ens33 192.168.1.1 netmask 255.255.255.0
#mkdir /mnt/cdrom
#mount /dev/cdrom /mnt/cdrom
#cd /mnt/cdrom/Packages
#rpm -ivh nfs-utils-1.3.0.54.el7.x86_64.rpm “Tab键补全内容”
#systemctl stop firewalld service
#mkdir /date (文件名可自行定义)
#chmod -Rf 777 /date
#vi /etc/exports
*文件内容*
/date 192.168.1.2(客户机IP)(rw, sync, root_squash)
#systemctl restart rpcbind
#systemctl enable rpcbind
#systemctl start nfs-server
#systemctl enable nfs-server
#mkdir /date /11
#echo 22 >> /date/ 22.txt
客户机需配置的内容
#ifconfig eth0 192.168.1.2 netmask 255.255.255.0
#showmount -e 192.168.1.1
#mount -t nfs 192.168.1.1:/date /mnt
#mkdir /mnt /33
#echo 33 >> /mnt/ 33.txt
服务器内容
#cat /date /33.txt