Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SHELL script to configure NFS remote sharing on Centos7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

NFS remote sharing 1. Remote shared server configuration script #! / bin/bash# master server NFS configuration script # create a new disk partition echo "n p w" | fdisk / dev/sdb# New disk mount point mkdir / mnt/sdb# format disk partition mkfs.xfs / dev/sdb1# add automatic mount echo "/ dev/sdb1 / mnt/sdb xfs defaults 0 "> > / etc/fstabmount-a # installation service yum install nfs-utils rpcbind-y # modify configuration file echo" / mnt/sdb 192.168.102.128Unip 24 (rw Sync,no_root_squash) "> > / etc/exports# enable service systemctl start nfssystemctl start rpcbind# turn off firewall systemctl stop firewalld.servicesetenforce check whether empty share goes out showmount-e2. The local http site uses the space script #! / bin/bash# client server configuration script # turn off the firewall systemctl stop firewalld.servicesetenforce install the http service yum install httpd-y # mount the http site to the space shared by the master server mount 192.168.102.128:/mnt/sdb / var/www/html# view the space of the site df-hT

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report