{"id":3484,"date":"2012-07-04T22:02:59","date_gmt":"2012-07-04T14:02:59","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=3484"},"modified":"2023-04-28T09:49:14","modified_gmt":"2023-04-28T09:49:14","slug":"how-to-configure-linux-nfs-server-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-configure-linux-nfs-server-on-centos-6-2\/","title":{"rendered":"How to Configure Linux NFS Server on CentOS 6.2"},"content":{"rendered":"<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2012\/07\/nfs-server-150x150.jpg\" alt=\"nfs\" title=\"nfs\" width=\"150\" height=\"150\" class=\"alignleft size-thumbnail wp-image-3497 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2012\/07\/nfs-server-150x150.jpg 150w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2012\/07\/nfs-server-100x100.jpg 100w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2012\/07\/nfs-server.jpg 225w\" data-sizes=\"(max-width: 150px) 100vw, 150px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150\/150;\" \/>In this example, i will configure a nfs server on CentOS 6.2. Network File System or NFS, is a server-client protocol for sharing files between computers on network. NFS server will enables it&#8217;s client to mount a file system on a remote server as if it were local to your own system. It&#8217;s also then can directly access any of the files on that remote file system. Follow the following steps to install NFS :<\/p>\n<p><strong>Prerequisites :<\/strong><br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-setup-local-yum-repository-from-cd-romdvd-rom-image-on-centos-6-2\/\" rel=\"nofollow\">How to Setup Local Yum Repository from CD-ROM\/DVD-ROM image on CentOS 6.2<\/a><\/p>\n<p>1. Install using yum command :<\/p>\n<pre>\n[root@centos62 ~]# yum install nfs-utils -y\nLoaded plugins: fastestmirror, priorities\nLoading mirror speeds from cached hostfile\n * base: mirror1.ku.ac.th\n * epel: mirrors.ispros.com.bd\n * extras: mirror1.ku.ac.th\n * updates: mirror1.ku.ac.th\nSetting up Install Process\nResolving Dependencies\n--> Running transaction check\n---> Package nfs-utils.i686 1:1.2.3-15.el6_2.1 will be installed\n--> Processing Dependency: nfs-utils-lib >= 1.1.0-3 for package: 1:nfs-utils-1.2.3-15.el6_2.1.i686\n--> Processing Dependency: libnfsidmap.so.0 for package: 1:nfs-utils-1.2.3-15.el6_2.1.i686\n--> Running transaction check\n---> Package nfs-utils-lib.i686 0:1.1.5-4.el6 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n====================================================================================================\n Package                  Arch            Version                          Repository          Size\n====================================================================================================\nInstalling:\n nfs-utils                i686            1:1.2.3-15.el6_2.1               updates            307 k\nInstalling for dependencies:\n nfs-utils-lib            i686            1.1.5-4.el6                      base                66 k\n\nTransaction Summary\n====================================================================================================\nInstall       2 Package(s)\n\nTotal download size: 372 k\nInstalled size: 922 k\nDownloading Packages:\n(1\/2): nfs-utils-1.2.3-15.el6_2.1.i686.rpm                                   | 307 kB     00:02\n(2\/2): nfs-utils-lib-1.1.5-4.el6.i686.rpm                                    |  66 kB     00:00\n----------------------------------------------------------------------------------------------------\nTotal                                                               103 kB\/s | 372 kB     00:03\nRunning rpm_check_debug\nRunning Transaction Test\nTransaction Test Succeeded\nRunning Transaction\n  Installing : nfs-utils-lib-1.1.5-4.el6.i686                                                   1\/2\n  Installing : 1:nfs-utils-1.2.3-15.el6_2.1.i686                                                2\/2\n\nInstalled:\n  nfs-utils.i686 1:1.2.3-15.el6_2.1\n\nDependency Installed:\n  nfs-utils-lib.i686 0:1.1.5-4.el6\n\nComplete!\n<\/pre>\n<p>2. Uncomment Line 5 and change to your domain name :<\/p>\n<pre>\n[root@centos62 ~]# vi \/etc\/idmapd.conf\n<\/pre>\n<pre>\n#Domain = local.domain.edu\n<\/pre>\n<p>Change to your domain. E.g ehowstuff.local :<\/p>\n<pre>\nDomain = ehowstuff.local\n<\/pre>\n<p>Save file with :wq and exit.<\/p>\n<p>3. Create a <strong>\/sharedfolder<\/strong> directory and grant full permission to it.<\/p>\n<pre>\n[root@centos62 ~]# mkdir \/sharedfolder\n[root@centos62 ~]# chmod 777 \/sharedfolder\n<\/pre>\n<p>4. Open and configure \/etc\/exports file as below :<\/p>\n<pre>\n[root@centos62 ~]# vi \/etc\/exports\n<\/pre>\n<p>Share <strong>\/sharedfolder<\/strong> for the network of <strong>192.168.1.0\/24<\/strong> with <strong>read and write<\/strong> access <\/p>\n<pre>\n# write like below *note\n\n\/sharedfolder 192.168.1.0\/24(rw,sync)\n\n#Notes\n#\/sharedfolder --> shared directory\n#192.168.1.0\/24 --> range of networks NFS permits accesses\n#rw --> writable\n#sync --> synchronize\n#no_root_squash --> enable root privilege\n#no_all_squash --> enable users' authority\n<\/pre>\n<p>save file with :wq and exit.<\/p>\n<p>5. Restart the nfs services :<\/p>\n<pre>\n[root@centos62 ~]# \/etc\/rc.d\/init.d\/rpcbind start\nStarting rpcbind:                                          [  OK  ]\n<\/pre>\n<pre>\n[root@centos62 ~]# \/etc\/rc.d\/init.d\/nfslock start\nStarting NFS statd:                                        [  OK  ]\n<\/pre>\n<pre>\n[root@centos62 ~]# \/etc\/rc.d\/init.d\/nfs start\nStarting NFS services:                                     [  OK  ]\nStarting NFS mountd:                                       [  OK  ]\nStarting RPC idmapd:                                       [  OK  ]\nStarting NFS daemon:                                       [  OK  ]\n<\/pre>\n<p>6. Make nfs services start at boot :<\/p>\n<pre>\n[root@centos62 ~]# chkconfig rpcbind on\n[root@centos62 ~]# chkconfig nfslock on\n[root@centos62 ~]# chkconfig nfs on\n<\/pre>\n<p>7. <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-configure-nfs-client-on-linux\/\" rel=\"nofollow\">How to Configure NFS Client on Linux<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example, i will configure a nfs server on CentOS 6.2. Network File System or NFS, is a server-client protocol for sharing files between computers on network. NFS server&#8230;<\/p>\n","protected":false},"author":6,"featured_media":3497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1013],"tags":[1244,1253,1536,1604],"class_list":["post-3484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-nfs-server","tag-centos","tag-centos-6-2","tag-linux","tag-nfs-server"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=3484"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3484\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/3497"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=3484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=3484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=3484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}