Problems encountered when creating nfs on linux ., Nfs creation in linux

Source: Internet
Author: User

Problems encountered when creating nfs on linux ., Nfs creation in linux

When we deploy a program, the image server is a separate server with its own independent domain name. The application is deployed on another server. We use some attachment upload tools, such as ajaxfileupload, which cannot be accessed across domains when uploading attachments. The previous solution was to upload the file to the server where the application is located, and then use the ftp component of java to upload the file to the image server (of course, the ftp server is installed on the image server ). However, it was found that ftp upload was slow and unstable. I decided to change to NFS to solve this problem. Of course, whether this solution is good or not remains to be tested and will not be discussed here. I have never done this before. Here I will record the problems encountered.

Question 1: The operating system version.

Because NFS is not installed in my operating system, you must install it first. In different CentOS versions, for example, run the command: yum-y install nfs-utils portmap in CentOS 5.x. The operating system we use is CentOS6.5. The command we need to install here is: yum-y install nfs-utils rpcbind (you can check the information about the yum command, in short, the idea is similar to that of maven ).

Question 2: When modifying the/etc/exports file, pay attention to the format. For example, if a space is added between the client address and the permission that can be connected, it should be similar: /usr/local/test/192.168.1.226 (rw, no_root_squash, no_all_squash, sync), instead of:/usr/local/test/192.168.0.120 (rw, no_root_squash, no_all_squash, sync ), otherwise, the following error is reported when NFS is started: exportfs: No options for/usr/local/data/192.168.0.120: suggest 192.168.0.120 (sync) to avoid warning.
Exportfs: No host name given with/usr/local/data (rw, no_root_squash, no_all_squash, sync), suggest * (rw, no_root_squash, no_all_squash, sync) to avoid warning
/Tomcat/webfile 10.163.224.132 (rw, sync, no_root_squash)

Question 3: exportfs-r. This must be executed; otherwise, it will not take effect;

Problem 4: You must install NFS on the client. Otherwise, the server cannot be accessed.

Problem 5: If service nfs start has the following problems, you can ignore them:

Starting NFS services: [OK]
Starting NFS quotas: [OK]
Starting NFS mountd: rpc. mountd: svc_tli_create: cocould not open connection for udp6
Rpc. mountd: svc_tli_create: cocould not open connection for tcp6
Rpc. mountd: svc_tli_create: cocould not open connection for udp6
Rpc. mountd: svc_tli_create: cocould not open connection for tcp6
Rpc. mountd: svc_tli_create: cocould not open connection for udp6
Rpc. mountd: svc_tli_create: cocould not open connection for tcp6
[OK]
Starting NFS daemon: rpc. nfsd: address family inet6 not supported by protocol TCP
[OK]
Starting RPC idmapd: [OK]

The above is the whole process. In fact, there is no technical content, which is a little help for people who are not familiar with linux.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.