运维开发网

在线仓库 nfs网络文件系统!

运维开发网 https://www.qedev.com 2020-07-11 14:43 出处:网络
-----------yum 本地仓库----------umount /dev/sr0mount /dev/sr0 /mediacd /etc/yum.r*mkdir amv C* acat > local.repo<<EOF[hfh]name=hfhbaseurl=file:///mediaenable=1gpgcheck=0EOFyum clean allyum m

-----------yum 本地仓库----------

umount /dev/sr0

mount /dev/sr0 /media

cd /etc/yum.r*

mkdir a

mv C* a

cat > local.repo<<EOF

[hfh]

name=hfh

baseurl=file:///media

enable=1

gpgcheck=0

EOF

yum clean all

yum makecache

yum install bash-completion

-----------yum服务器 ftp协议----------

服务器:

yum -y install vsftpd

umount /dev/sr0 

mkdir /var/ftp/asd

mount /dev/sr0 /var/ftp/asd

systemctl restart vsftpd

systemctl enable vsftpd

客户机:

yum -y install ftp

vi /etc/yum.repos.d/local.repo <<EOF

[hfh]

name=hfh

baseurl=ftp://192.168.200.111/asd

enable=1

gpgcheck=0

EOF

yum clean all

yum makecache

-----------yum服务器 http协议----------

服务器:

yum -y install httpd

umount /dev/sr0 

mkdir /var/www/html/aa

mount /dev/sr0 /var/www/html/aa

systemctl restart httpd

systemctl enable httpd

客户机:

vi /etc/yum.repos.d/local.repo <<EOF

[hfh]

name=hfh

baseurl=http://192.168.200.111/aa

enable=1

gpgcheck=0

EOF

yum clean all

yum makecache

NFS 网络文件系统 C/S

rpc 111 远程过程调用机制

S:设置一个共享目录

C:挂载使用这个共享目录 mount

服务器

[[email protected] ~]#yum -y install nfs-utils rpcbind

[[email protected] ~]# mkdir /data

[[email protected] ~]# vim /etc/exports

[[email protected] ~]# cat /etc/exports

/data 192.168.200.0/24(rw)

[[email protected] ~]# systemctl start rpcbind

[[email protected] ~]# systemctl enable rpcbind

[[email protected] ~]# systemctl start nfs

[[email protected] ~]# systemctl enable nfs

客户机

[[email protected] ~]# yum -y install nfs-utils

[[email protected] ~]# showmount -e 192.168.200.111

[[email protected] ~]# mount 192.168.2.30:/data /opt/

[[email protected] ~]# tail -1 /etc/fstab 192.168.200.111:/data /opt nfs defaults,_netdev 0 0

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号