{"id":14040,"date":"2017-12-26T15:25:51","date_gmt":"2017-12-26T20:25:51","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/?p=14040"},"modified":"2017-12-26T15:25:51","modified_gmt":"2017-12-26T20:25:51","slug":"autofs-mounting-linux-redhat-centos","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=14040","title":{"rendered":"AutoFS and Mounting in Linux\/Redhat\/CentOS"},"content":{"rendered":"<p>AutoFS and Mounting in Linux\/Redhat\/CentOS<\/p>\n<p>echo &#8220;AutoFS &#8211; Automatic FS system Mounting &#8211; Dec 26th, 2017 by Sayed&#8221;<\/p>\n<p>check if Autofs installed or not<br \/>\nyum list installed | grep autofs<\/p>\n<p>I just installed; hence it is there<br \/>\nyou can install with yum -y install autofs<\/p>\n<p>944 yum -y install autofs<\/p>\n<p>then you can enable autofs<br \/>\n946 systemctl status autofs<br \/>\n947 systemctl start autofs<br \/>\n948 systemctl enable autofs<\/p>\n<p>enable &#8211; will start this service at reboot\/system start<\/p>\n<p>AutoFS in general does not use \/etc\/fstab<br \/>\nAutoFS uses \/etc\/mtab file<br \/>\nAlso, AutoFS has some files under \/etc and starting with auto. You can also define which file will contain the mounting mapping. the file that will act like \/etc\/fstab for autofs<\/p>\n<p>AutoFS has direct mapping and indirect mapping<br \/>\nlet&#8217;s see some files under \/etc for autofs<\/p>\n<p>955 ls \/etc\/auto*<\/p>\n<p><strong>The files<\/strong><\/p>\n<p>\/etc\/auto.direct \/etc\/autofs.conf \/etc\/autofs_ldap_auth.conf \/etc\/auto.master \/etc\/auto.misc \/etc\/auto.net \/etc\/auto.smb \/etc\/auto.master.d:<\/p>\n<p>I saw to use \/etc\/auto.master for configuring which file will do the mapping for direct mounting.<br \/>\nI saw to use \/etc\/auto.misc for configuring which file will do the mapping for indirect mounting for AutoFS.<\/p>\n<p>One more config file is under: \/etc\/sysconfig\/autofs<\/p>\n<p>961 cat \/etc\/sysconfig\/autofs<\/p>\n<p>the content<br \/>\n#<br \/>\n# Init system options<br \/>\n#<br \/>\n# If the kernel supports using the autofs miscellanous device<br \/>\n# and you wish to use it you must set this configuration option<br \/>\n# to &#8220;yes&#8221; otherwise it will not be used.<br \/>\n#<br \/>\nUSE_MISC_DEVICE=&#8221;yes&#8221;<br \/>\n#<br \/>\n# Use OPTIONS to add automount(8) command line options that<br \/>\n# will be used when the daemon is started.<br \/>\n#<br \/>\n#OPTIONS=&#8221;&#8221;<br \/>\n#<\/p>\n<p>For mounting NFS i.e. remote\/network file-systems\/folders &#8211; we can use the regular mounting i.e. \/etc\/fstab and mount command. However, that is kinda manual. We can mount NFS using AutoFS that will be automatic mount<\/p>\n<p>We use AutoFS for LDAP clients to auto mount Users&#8217; home directories. We just configure, then the mounting happens automatically. You remember that getent passwd user-name mounted the remote users&#8217; home directory into local system. we used \/etc\/auto.master to tell that auto.guests will have the mounting configurations. then on \/etc\/auto.guests file &#8211; we configured that users&#8217; home directories will be mounted on \/home\/guests. you can check our notes on LDAP client configuration<\/p>\n<p>979 cat \/etc\/auto.master<br \/>\n980 vim \/etc\/auto.master<\/p>\n<p>we added the following line on \/etc\/auto.master<br \/>\n\/etc\/auto.guests \/etc\/auto.direct<\/p>\n<p>it just tells that AutoFS will consult \/etc\/auto.guests file for direct mapping<\/p>\n<p>&nbsp;<\/p>\n<p>984 vim \/etc\/auto.guests<br \/>\nwe added the following line on \/etc\/auto.guests<br \/>\n\/home\/guests 192.168.1.15:\/nfsrh<\/p>\n<p>it just tells remote \/nfsrh will be automatically mounted to \/home\/guests<br \/>\nyou can try to restart autofs<\/p>\n<p>989 systemctl restart autofs<\/p>\n<p>&nbsp;<\/p>\n<p>Indirect Map<br \/>\nindirectly mounted points are only visible when accessed<br \/>\nautomatically mounts shares under one common parent directory<br \/>\neach indirect map put only one entry in the mtab file<br \/>\nlocal and indirect maps cannot exist in the same parent directory<br \/>\nfor indirect mapping &#8211; you use \/etc\/auto.misc file<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AutoFS and Mounting in Linux\/Redhat\/CentOS echo &#8220;AutoFS &#8211; Automatic FS system Mounting &#8211; Dec 26th, 2017 by Sayed&#8221; check if Autofs installed or not yum list installed | grep autofs I just installed; hence it is there you can install with yum -y install autofs 944 yum -y install autofs then you can enable autofs &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=14040\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1231],"tags":[],"class_list":["post-14040","post","type-post","status-publish","format-standard","hentry","category-----linux-and-unix","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":67598,"url":"http:\/\/bangla.sitestree.com\/?p=67598","url_meta":{"origin":14040,"position":0},"title":"AutoFS and Mounting in Linux\/Redhat\/CentOS #DevOps #RHCSA","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"AutoFS and Mounting in Linux\/Redhat\/CentOS echo \"AutoFS - Automatic FS system Mounting - Dec 26th, 2017 by Sayed\" check if Autofs installed or not yum list installed | grep autofs I just installed; hence it is there you can install with yum -y install autofs 944 yum -y install autofs\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14029,"url":"http:\/\/bangla.sitestree.com\/?p=14029","url_meta":{"origin":14040,"position":1},"title":"TCP Wrappers in Linux\/CentOS\/Redhat\/Fedora","author":"Sayed","date":"December 24, 2017","format":false,"excerpt":"TCP Wrappers in Linux\/CentOS\/Redhat\/Fedora yum info tcp_wrappers yum install tcp_wrappers-devel.x86_64 506 reboot 507 ifdown ens33 508 ifup ens33 509 yum install tcp_wrappers-devel.x86_64 510 yum -y install tcp_wrappers-devel.x86_64 511 ls \/var\/ftp\/pub\/Packages\/ 512 ls \/etc\/yum.repos.d\/local.repo 513 vim \/etc\/yum.repos.d\/local.repo 514 systemctl status vsftpd 515 systemctl start vsftpd 516 systemctl enable vsftpd 517 yum\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67586,"url":"http:\/\/bangla.sitestree.com\/?p=67586","url_meta":{"origin":14040,"position":2},"title":"Create your own yum repo in Centos\/Redhat #DevOps #RHCSA","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"Yum is a software installation manager for Redhat Linux and Related. yum is a better tool than rpm. Here, we will take the rpm packages as come with Redhat\/Centos and then we will host those packages on our own Repo Server for yum. i.e. yum will use this Repo to\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21833,"url":"http:\/\/bangla.sitestree.com\/?p=21833","url_meta":{"origin":14040,"position":3},"title":"TCP Wrappers in Linux\/CentOS\/Redhat\/Fedora #Unix\/Linux #GNU\/Linux #Linux #GNU\/Linux #GNU\/Linux #Linux #GNU\/Linux #DevOps #Everything Linux #RHCSA","author":"Author-Check- Article-or-Video","date":"March 7, 2021","format":false,"excerpt":"yum info tcp_wrappers yum install tcp_wrappers-devel.x86_64 506 reboot 507 ifdown ens33 508 ifup ens33 509 yum install tcp_wrappers-devel.x86_64 510 yum -y install tcp_wrappers-devel.x86_64 511 ls \/var\/ftp\/pub\/Packages\/ 512 ls \/etc\/yum.repos.d\/local.repo 513 vim \/etc\/yum.repos.d\/local.repo 514 systemctl status vsftpd 515 systemctl start vsftpd 516 systemctl enable vsftpd 517 yum -y install tcp_wrappers-devel.x86_64 518\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20401,"url":"http:\/\/bangla.sitestree.com\/?p=20401","url_meta":{"origin":14040,"position":4},"title":"Learn some Centos\/Redhat Linux: RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS","author":"Author-Check- Article-or-Video","date":"February 20, 2021","format":false,"excerpt":"RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS Check if mariaDB is installed or not 130 yum list installed | grep ^mariadb mariaDB originated from MySQL - after MySQL Got Bought by Oracle 133 yum list installed | grep ^mariadb I see - installed though not completely Output: mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda There are\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20403,"url":"http:\/\/bangla.sitestree.com\/?p=20403","url_meta":{"origin":14040,"position":5},"title":"Learn some Centos\/Redhat Linux: RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS","author":"Author-Check- Article-or-Video","date":"February 20, 2021","format":false,"excerpt":"The author is: the_authornRHCE: MariaDB Administration on Redhat\/Fedora\/CentOS Check if mariaDB is installed or not 130 yum list installed | grep ^mariadb mariaDB originated from MySQL - after MySQL Got Bought by Oracle 133 yum list installed | grep ^mariadb I see - installed though not completely Output: mariadb-libs.x86_64 1:5.5.52-1.el7\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14040"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14040\/revisions"}],"predecessor-version":[{"id":14041,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14040\/revisions\/14041"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14040"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}