{"id":1284,"date":"2017-11-03T08:34:51","date_gmt":"2017-11-02T23:34:51","guid":{"rendered":"http:\/\/blue-bear.jp\/kb\/?p=1284"},"modified":"2017-12-16T11:37:21","modified_gmt":"2017-12-16T02:37:21","slug":"aws-how-to-do-nfs-file-transfer-between-centos-and-ubuntubitnami","status":"publish","type":"post","link":"https:\/\/blue-bear.jp\/kb\/aws-how-to-do-nfs-file-transfer-between-centos-and-ubuntubitnami\/","title":{"rendered":"[aws] How to do NFS file transfer between CentOS and Ubuntu(Bitnami)"},"content":{"rendered":"<p>Since want to file transfer between CentOS and\u00a0Ubuntu(Bitnami) on AWS, setup NFS on each instance<\/p>\n<h2>CentOS : NFS Server<\/h2>\n<p>IP address : 172.31.0.5\/16<\/p>\n<p>AWS : Add rule to allow traffic from 172.31.0.0\/16 on security group<\/p>\n<h3>Setting NFS<\/h3>\n<p>Install NFS<\/p>\n<pre>sudo su -\r\nyum -y install portmap\r\nyum -y install nfs-utils\r\nyum -y install nfs-utils-lib\r\n<\/pre>\n<p>Setting shared folder<\/p>\n<pre>vi \/etc\/exports\r\n\/mnt\/share    172.31.0.0\/255.255.0.0(rw,sync,no_root_squash)\r\n<\/pre>\n<p>Deny access setting<\/p>\n<pre>vi \/etc\/hosts.deny\r\nportmap:ALL\r\nlockd:ALL\r\nmountd:ALL\r\nrquotad:ALL\r\nstatd:ALL\r\n<\/pre>\n<p>Allow access setting<\/p>\n<pre>vi \/etc\/hosts.allow\r\nportmap: 172.31.0.0\/255.255.0.0\r\nlockd: 172.31.0.0\/255.255.0.0\r\nrquotad: 172.31.0.0\/255.255.0.0\r\nmountd: 172.31.0.0\/255.255.0.0\r\nstatd: 172.31.0.0\/255.255.0.0\r\n<\/pre>\n<p>Run NFS and chkconfig for auto run<\/p>\n<pre>chkconfig nfs on\r\nchkconfig --list nfs\r\n\r\n\/etc\/init.d\/rpcbind start\r\n\/etc\/init.d\/nfs start\r\n\/etc\/init.d\/nfslock start\r\n<\/pre>\n<h2><\/h2>\n<h2>Ubuntu(Bitnami) : NFS Client<\/h2>\n<p>IP address : 172.31.1.5\/16<\/p>\n<p>AWS :\u00a0Add rule to allow traffic from 172.31.0.0\/16 on security group<\/p>\n<h3>Setting NFS<\/h3>\n<p>Install NFS<\/p>\n<pre>sudo apt-get install nfs-common\r\n<\/pre>\n<p>Note : if &#8220;E: Package nfs-common has no installation candidate&#8221; error would be happened, Update apt-get, then Install should be enabled.<\/p>\n<pre>apt-get update\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Setting share folder access<\/p>\n<pre>sudo vi \/etc\/fstab\r\n172.31.0.5:\/mnt\/share \/home nfs defaults,soft,intr,clientaddr=172.31.1.5\r\n<\/pre>\n<p>Mount folder<\/p>\n<pre>sudo service rpcbind start\r\nsudo mount -a\r\n<\/pre>\n<p>if mount fail, check AWS security policy or access setting on NFS server<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since want to file t<\/p>\n","protected":false},"author":1,"featured_media":45,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1284"}],"collection":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/comments?post=1284"}],"version-history":[{"count":2,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1284\/revisions"}],"predecessor-version":[{"id":1326,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1284\/revisions\/1326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media\/45"}],"wp:attachment":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media?parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/categories?post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/tags?post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}