1234567891011121314151617181920212223 |
- #!/bin/bash
- yum install nfs-utils
- mkdir /nextcloud
- mkdir /nextcloud/data
- mkdir /nextcloud/web
- chmod -R 755 /nextcloud/data
- chmod -R 755 /nextcloud/web
- chown 48:48 /nextcloud/data
- chown 48:48 /nextcloud/web
- systemctl enable rpcbind
- systemctl enable nfs-server
- systemctl enable nfs-lock
- systemctl enable nfs-idmap
- systemctl start rpcbind
- systemctl start nfs-server
- systemctl start nfs-lock
- systemctl start nfs-idmap
- cat > /etc/exports <<EOD
- /nextcloud/web 192.168.56.0/255.255.255.0(rw,sync,no_root_squash,no_all_squash)
- /nextcloud/data 192.168.56.0/255.255.255.0(rw,sync,no_root_squash,no_all_squash)
- EOD
- systemctl restart nfs-server
|