{"id":40,"date":"2010-08-27T15:33:44","date_gmt":"2010-08-27T15:33:44","guid":{"rendered":""},"modified":"2012-06-08T12:42:26","modified_gmt":"2012-06-08T04:42:26","slug":"nfs-on-centos","status":"publish","type":"post","link":"https:\/\/matnet.my\/blog\/2010\/08\/nfs-on-centos\/","title":{"rendered":"NFS on centos"},"content":{"rendered":"<p>It&#8217;s been a long time I&#8217;m not using NFS.<\/p>\n<p>Today i need to generate a backup for web and mysql, so preferable i save this backup to another HDD on the others place.<\/p>\n<p>Then NFS come out on my head. So here is the simple step to mount network drive for your CENTOS box using NFS<\/p>\n<p>Server IP : 172.31.0.1<br \/>\nClient IP : 172.31.0.2<\/p>\n<p>On the Server<br \/>\n1. Create backup folder<br \/>\n[quote]<br \/>\nmkdir \/backup<br \/>\n[\/quote]<\/p>\n<p>2. Edit \/etc\/exports<br \/>\n[quote]<br \/>\nvi \/etc\/exports<br \/>\n[\/quote]<br \/>\nadd this line<br \/>\n[quote]<br \/>\n\/home\/sharing 172.31.0.2\/255.255.255.255(rw,sync)<br \/>\n[\/quote]<\/p>\n<p>3. Edit \/etc\/hosts.allow<br \/>\n[quote]<br \/>\nvi \/etc\/hosts.allow<br \/>\n[\/quote]<br \/>\nadd this line<br \/>\n[quote]<br \/>\nportmap: 172.31.0.0\/255.255.255.0<br \/>\n[\/quote]<\/p>\n<p>4. Restart NFS and portmap<br \/>\n[quote]<br \/>\n\/etc\/init.d\/nfs restart<br \/>\n\/etc\/init.d\/portmap restart<br \/>\n[\/quote]<\/p>\n<p>On the Client<br \/>\n1. Start portmap<br \/>\n[quote]<br \/>\n\/etc\/init.d\/portmap start[quote]<br \/>\n[\/quote]<\/p>\n<p>2. Edit \/etc\/fstab and add this line<br \/>\n[quote]<br \/>\nvi \/etc\/fstab<br \/>\n172.31.0.1:\/backup \/mnt\/backup nfs rw,hard,intr 0 0<br \/>\n[\/quote]<\/p>\n<p>3. mount the nfs<br \/>\n[quote]<br \/>\nmount 172.31.0.1:\/backup \/mnt\/backup<br \/>\n[\/quote]<\/p>\n<p>If you r using CSF as firewall make sure add your server ip address on \/etc\/csf\/csf.allow.<\/p>\n<p>That&#8217;s all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a long time I&#8217;m not using NFS. Today i need to generate a backup for web and mysql, &hellip; <a href=\"https:\/\/matnet.my\/blog\/2010\/08\/nfs-on-centos\/\" class=\"more-link\">More <span class=\"screen-reader-text\">NFS on centos<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-bsd-nix","standard"],"_links":{"self":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":2,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":58,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions\/58"}],"wp:attachment":[{"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matnet.my\/blog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}