{"id":67586,"date":"2021-07-25T21:30:07","date_gmt":"2021-07-26T01:30:07","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/create-your-own-yum-repo-in-centos-redhat-devops-rhcsa\/"},"modified":"2021-07-25T21:30:07","modified_gmt":"2021-07-26T01:30:07","slug":"create-your-own-yum-repo-in-centos-redhat-devops-rhcsa","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=67586","title":{"rendered":"Create your own yum repo in Centos\/Redhat #DevOps #RHCSA"},"content":{"rendered":"<p>Yum is a software installation manager for Redhat Linux and Related.<\/p>\n<p>yum is a better tool than rpm.<\/p>\n<p>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 find installers rather than going to the Internet.<\/p>\n<p><strong>Installing Yum Manager<\/strong><\/p>\n<p>First we have to install and configure ftp.<\/p>\n<p>[if vsftpd is not already installed, use rpm -ivh vsftpd, you need to mount installer dvd and run rpm under Packages folder &#8211; or similar]<\/p>\n<p><strong>Check the status of vsftpd<\/strong><br \/>\nsystemctl status vsftpd<br \/>\nsystemctl start vsftpd<br \/>\nsystemctl enable vsftpd<br \/>\ncd \/var\/ftp\/pub\/<br \/>\npwd<br \/>\nls -la<br \/>\ndf -h (see disks and default mounts)<br \/>\nmount \/dev\/sr0 \/mnt\/iso-installer<br \/>\n(mount DVD where the iso of the installer is kept. I was using VMWare Workstation Pro)<\/p>\n<p><strong>Copy installer rpms from .iso to our ftp server<\/strong><br \/>\ncd \/mnt\/iso-installer\/<br \/>\nls -la<br \/>\ncd Packages\/<br \/>\ncp -v * \/var\/ftp\/pub\/<br \/>\npwd<br \/>\nls -la<\/p>\n<p><strong>Create the Repo database<\/strong><br \/>\nWe have to create a database based on all these rpm files. This repo database will be queried by yum to find packages and dependencies to install.<\/p>\n<p>rpm -ivh createrepo-0.9.9-26.el7.noarch.rpm (create repo is not installed by default)<\/p>\n<p>createrepo .<\/p>\n<p>Now configure local PC [workstation with our Yum Repo\/server under ftp]. We need a file local.repo to point to our yum repo server<\/p>\n<p>ls \/etc\/yum.repos.d\/<br \/>\ncd \/etc\/yum.repos.d\/<br \/>\npwd<br \/>\nls -la<\/p>\n<p>[move existing repo files to old directory]<br \/>\nmkdir old<br \/>\nmv *.repo old\/<\/p>\n<p>ls -la<br \/>\ntouch local.repo<\/p>\n<p>&nbsp;<\/p>\n<p><strong>[need to configure local.repo]<\/strong><br \/>\nTry to check any of the existing .repo file and create based on that. A basic config might look like this<\/p>\n<p>[local]<br \/>\nname=local.repo<br \/>\nbaseurl=ftp:\/\/localhost\/pub<\/p>\n<p><strong>If you want to put hostname for your ftp server<\/strong><\/p>\n<p>vim \/etc\/hosts<br \/>\nsystemctl start vsftpd<br \/>\nsystemctl restart vsftpd<br \/>\nping localhost<br \/>\nping yumserver<br \/>\nvi \/etc\/yum.repos.d\/local.repo<br \/>\nhostnamectl set-hostname yumserver<br \/>\ncat \/etc\/hosts<br \/>\nhostnamectl set-hostname yumserver<\/p>\n<p><strong>You might need to run, if you see yum does not work<\/strong><br \/>\nyum clean<br \/>\nyum clean cache<\/p>\n<p>cd \/etc\/yum.repos.d\/<br \/>\ncat old\/CentOS-Base.repo<br \/>\nvim local.repo<\/p>\n<p><strong>Let FTP work through Firewall<\/strong><br \/>\nfirewall-cmd &#8211;add-service=vsftpd &#8211;perm<br \/>\nfirewall-cmd &#8211;add-service=ftp &#8211;perm<br \/>\nsystemctl reload firewalld<br \/>\nsystemctl start firewalld<br \/>\nsystemctl enable firewalld<br \/>\nvi \/etc\/yum.repos.d\/local.repo<\/p>\n<p><strong>Check if your yum server is working or not<\/strong><\/p>\n<p>yum repolist<br \/>\nyum install tree<\/p>\n<p>yum repolist enabled<br \/>\nyum repolist all From: http:\/\/sitestree.com\/?p=11797<br \/> Categories:DevOps, RHCSA<br \/>Tags:<br \/> Post Data:2017-12-04 23:02:34<\/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>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 find installers rather than going &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=67586\">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-67586","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":14013,"url":"http:\/\/bangla.sitestree.com\/?p=14013","url_meta":{"origin":67586,"position":0},"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":14029,"url":"http:\/\/bangla.sitestree.com\/?p=14029","url_meta":{"origin":67586,"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":21833,"url":"http:\/\/bangla.sitestree.com\/?p=21833","url_meta":{"origin":67586,"position":2},"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":14040,"url":"http:\/\/bangla.sitestree.com\/?p=14040","url_meta":{"origin":67586,"position":3},"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":25055,"url":"http:\/\/bangla.sitestree.com\/?p=25055","url_meta":{"origin":67586,"position":4},"title":"Learn and practice some CentOS Linux : Redhat Linux #Root","author":"Author-Check- Article-or-Video","date":"April 15, 2021","format":false,"excerpt":"This is mostly about Centos Linux. However, this also shows commands related to how to install Magento 2 on LEMP (E for Nginx Web-server). Some PHP related stuff are there as well. Let's Encrypt included. LEMP + CentOS + Magento 2 : VM Image or one click install: I did\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":67586,"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\/67586","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=67586"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/67586\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67586"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}