Linux network directory mounting method

NFS:
1. First, configure the server to
edit /etc/exports and add:
/opt/data0/courseware 10.7.110.72(rw) #IP is the address of the client, and the directory is the directory to be shared
/opt/data0/courseware 10.7 .110.73(rw) #IP is the address of the client, and the directory is the directory to be shared

2, then start the nfs service:
/etc/init.d/nfs start
After modifying the /etc/exprots file, you need to restart to take effect
/etc/init.d/nfs restart

3, SSH to the client to
mount mount serverip:/sharedir/localdir

4. After modifying the directory permissions of the server, you can edit the server directory file at the client's end.
chmod -R 777 /opt/data0/courseware

 

*** Regarding the project of war package deployment, it is necessary to create an upload file directory outside the war package, and use the absolute address to access;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326341458&siteId=291194637