{"id":67598,"date":"2021-07-25T21:30:09","date_gmt":"2021-07-26T01:30:09","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/autofs-and-mounting-in-linux-redhat-centos-devops-rhcsa\/"},"modified":"2021-07-25T21:30:09","modified_gmt":"2021-07-26T01:30:09","slug":"autofs-and-mounting-in-linux-redhat-centos-devops-rhcsa","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=67598","title":{"rendered":"AutoFS and Mounting in Linux\/Redhat\/CentOS #DevOps #RHCSA"},"content":{"rendered":"<p><strong>AutoFS and Mounting in Linux\/Redhat\/CentOS<\/strong><\/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 From: http:\/\/sitestree.com\/?p=12070<br \/> Categories:DevOps, RHCSA<br \/>Tags:<br \/> Post Data:2017-12-26 15:27:27<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/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=67598\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-67598","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":14040,"url":"http:\/\/bangla.sitestree.com\/?p=14040","url_meta":{"origin":67598,"position":0},"title":"AutoFS and Mounting in Linux\/Redhat\/CentOS","author":"Sayed","date":"December 26, 2017","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;\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":67598,"position":1},"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":14029,"url":"http:\/\/bangla.sitestree.com\/?p=14029","url_meta":{"origin":67598,"position":2},"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":21833,"url":"http:\/\/bangla.sitestree.com\/?p=21833","url_meta":{"origin":67598,"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":14013,"url":"http:\/\/bangla.sitestree.com\/?p=14013","url_meta":{"origin":67598,"position":4},"title":"Centos\/Redhat \u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f yum \u0987\u09a8\u09cd\u09b8\u099f\u09b2\u09be\u09b0 \u09b8\u09be\u09b0\u09cd\u09ad\u09be\u09b0 \u0995\u09bf\u09ad\u09be\u09ac\u09c7 \u0995\u09a8\u09ab\u09bf\u0997\u09be\u09b0 \u0995\u09b0\u09ac\u09c7\u09a8","author":"Sayed","date":"December 7, 2017","format":false,"excerpt":"Centos\/Redhat \u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f yum \u0987\u09a8\u09cd\u09b8\u099f\u09b2\u09be\u09b0 \u09b8\u09be\u09b0\u09cd\u09ad\u09be\u09b0 \u0995\u09bf\u09ad\u09be\u09ac\u09c7 \u0995\u09a8\u09ab\u09bf\u0997\u09be\u09b0 \u0995\u09b0\u09ac\u09c7\u09a8 Mount Installer ISO mkdir \/mnt\/dvd1 mount \/dev\/sr0 \/mnt\/dvd1 Check if FTP server is installed systemctl status vsftpd systemctl start vsftpd Install ftp Server. Using rpm as yum is not available yet [default yum needs the internet, kindof] cd \/mnt\/dvd1\/Packages\/ rpm -ivh\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":20401,"url":"http:\/\/bangla.sitestree.com\/?p=20401","url_meta":{"origin":67598,"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":"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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/67598","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\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=67598"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/67598\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67598"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}