showmount -e 172.17.0.2 Export list for 172.17.0.2: /nfs/share *
也可以到NFS服务器上查看/etc/exports文件的内容。
执行挂载命令
1
mount -t nfs 172.17.0.2:/nfs/share /mnt/nfs/
会报如下错误:
1 2 3 4 5 6 7
mount: wrong fs type, bad option, bad superblock on 172.17.0.2:/nfs/share, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try dmesg | tail or so.
sudo apt autoremove --purge snapd [sudo] password for simon: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: gnome-software gnome-software-common Suggested packages: apt-config-icons-hidpi gnome-software-plugin-flatpak Recommended packages: gnome-software-plugin-snap The following packages will be REMOVED: apg* gnome-control-center-faces* gnome-online-accounts* gnome-software-plugin-snap* libclutter-imcontext-0.1-0* libclutter-imcontext-0.1-bin* libcolord-gtk1* libgsound0* libgtop-2.0-11* libgtop2-common* mobile-broadband-provider-info* network-manager-gnome* python3-macaroonbakery* python3-protobuf* python3-rfc3339* python3-tz* snapd* ubuntu-system-service* The following packages will be upgraded: gnome-software gnome-software-common 2 upgraded, 0 newly installed, 18 to remove and 171 not upgraded. Need to get 2,982 kB of archives. After this operation, 73.7 MB disk space will be freed. Do you want to continue? [Y/n] y
openssl req -new -key ca.key -out ca.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:Shanghai Locality Name (eg, city) [Default City]:Shanghai Organization Name (eg, company) [Default Company Ltd]:Issuer Co., Ltd Organizational Unit Name (eg, section) []:Issuer Section Common Name (eg, your name or your server's hostname) []:localhost Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
生成CA证书ca.crt
1 2 3 4
openssl x509 -req -in ca.csr -signkey ca.key -out ca.crt Signature ok subject=C = CN, ST = Shanghai, L = Shanghai, O = "Issuer Co., Ltd", OU = Issuer Section, CN = localhost Getting Private key
生成服务器证书
生成服务器端私钥server.key
1 2 3 4 5
openssl genrsa -out server.key 2048 Generating RSA private key, 2048 bit long modulus (2 primes) .........+++++ ...............................................................................................+++++ e is 65537 (0x010001)
openssl req -new -key server.key -out server.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:Shanghai Locality Name (eg, city) [Default City]:Shanghai Organization Name (eg, company) [Default Company Ltd]:My Company Organizational Unit Name (eg, section) []:My Section Common Name (eg, your name or your server's hostname) []:localhost Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
openssl x509 -req -CA ca.crt -CAkey ca.key -CAcreateserial -in server.csr -out server.crt Signature ok subject=C = CN, ST = Shanghai, L = Shanghai, O = My Company, OU = My Section, CN = localhost Getting CA Private Key
checking for OS + Linux 5.0.0-31-generic x86_64 checking for C compiler ... not found
./configure: error: C compiler cc is not found
安装C编译器以解决
1
yum install -y gcc
找不到PCRE library
1 2 3 4
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
安装pcre-devel库
1
yum install -y pcre-devel
找不到OpenSSL library
1 2 3 4
./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl=<path> option.