1. 开放/nfs/shared目录,供所有用户查阅资料
Serve
dnf -y install nfs-utils
systemctl start nfs-server
systemctl stop firewalld
mkdir -p /nfs/shared
vim /etc/exports
exportfs -arv
Client
dnf -y install nfs-utils
systemctl start nfs-server
systemctl stop firewalld
mkdir -p /mnt/share
showmount -e 192.168.183.131
mount 192.168.183.131:/nfs/shared /mnt/share
2. 开放/nfs/upload目录为x.x.x.0/24网段的数据上传目录,并将所有用户及所属的用户组都映射为nfs-upload,其UID与GID均为3000
Server
mkdir -p /nfs/upload
vim /etc/exports
groupadd -g 3000 nfs-upload
useradd -u 3000 -g 3000 nfs-upload
chown -R nfs-upload /nfs/upload
exportfs -arv
Client
mount 192.168.183.131:/nfs/upload /mnt/share
3. 配置ssh免密登陆,能够通过客户端主机通过redhat用户和服务端主机基于公钥验证方式进行远程连接
Server
useradd redhat
echo 123 | passwd --stdin redhat
Client
ssh-keygen -f ~/.ssh/id_rsa -P '' -q
ssh-copy-id redhat@192.168.183.131