[修改] Ubuntu nfs编译通过
This commit is contained in:
26
ReadMe.md
26
ReadMe.md
@ -100,9 +100,11 @@ Even if neither end of the connection supports nfs v4, adding nfsver=3 is still
|
||||
Installation of NFS Utilities
|
||||
Before you compile the program, ensure that the nobody user and nogroup group have been created as done in the current LFS book. You can add them by running the following commands as the root user:
|
||||
|
||||
```shell
|
||||
groupadd -g 99 nogroup &&
|
||||
useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
|
||||
-s /bin/false -u 99 nobody
|
||||
```
|
||||
[Note] Note
|
||||
The classic uid and gid values are 65534 which is also -2 when interpreted as a signed 16-bit number. These values impact other files on some filesystems that do not have support for sparse files. The nobody and nogroup values are relatively arbitrary. The impact on a server is nil if the exports file is configured correctly. If it is misconfigured, an ls -l or ps listing will show a uid or gid number of 65534 instead of a name. The client uses nobody only as the user running rpc.statd.
|
||||
|
||||
@ -125,9 +127,25 @@ chown nobody.nogroup /var/lib/nfs
|
||||
|
||||
|
||||
```shell
|
||||
./configure --prefix=${PWD}/../_install \
|
||||
--sbindir=/sbin \
|
||||
--disable-nfsv4 \
|
||||
--disable-gss &&
|
||||
./configure --prefix=${PWD}/../_install --disable-nfsv4 --disable-gss --disable-uuid --disable-mount --sbindir=${PWD}/../_install/sbin/ --with-statedir=${PWD}/../_install/var/lig/nfs/
|
||||
|
||||
# install-data-hook目标错误,修改Makefile,屏蔽chown,/var/lib/nfs
|
||||
|
||||
#
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## 启动
|
||||
|
||||
https://blog.csdn.net/qq_26601681/article/details/104940430
|
||||
http://www.cnitblog.com/gouzhuang/archive/2010/03/23/nfs_utils.html
|
||||
|
||||
|
||||
```shell
|
||||
sudo mount -t nfsd nfsd /proc/fs/nfsd
|
||||
|
||||
./../_install/sbin/rpc.statd
|
||||
./../_install/sbin/rpc.nfsd
|
||||
./../_install/sbin/rpc.mountd
|
||||
```
|
||||
Reference in New Issue
Block a user