You'll need a server to store the YUM repositories and allow clients to access them out. Technically there's no such thing as a "YUM Server", all you are doing
is hosting a bunch of files via the Apache web server.
My guides focus on using a CentOS Server and using Apache web server to share them via http. You can use CentOS 6.x or 7.x, I have steps below for either. Disk Space!
Make sure your YUM server has plenty of free disk space. A single repository can consume 10GB+. The base directory for my repositories is /data/www/yumrpms/. Internet Access
Your YUM server will require internet access to be able to download repositories. CentOS 6
- Establish an ssh session to your YUM server
- Type yum install -y httpd createrepo and press Enter
- Wait while the components are installed
- Type sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config and press Enter
- Type setenforce 0 and press Enter
- Type mkdir -p /data/www/yumrpms/ and press Enter
- Type chkconfig httpd on and press Enter
- Type sed 's/var\/www\/html/data\/www/' -i /etc/httpd/conf/httpd.conf and press Enter
- Type chown -R apache:apache /data/www and press Enter
- Type service httpd restart and press Enter
- Type iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT and press Enter
- Type service iptables save and press Enter
You should now be able to open a web page to your YUM server and you'll see the Apache welcome page. You'll also be able to browse to /yumrpms to see an empty directory listing.
CentOS 7
- Establish an ssh session to your YUM server
- Type yum install -y httpd createrepo and press Enter
- Wait while the components are installed
- Type sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config and press Enter
- Type setenforce 0 and press Enter
- Type mkdir -p /data/www/yumrpms/ and press Enter
- Type systemctl enable httpd and press Enter
- Type sed 's/var\/www\/html/data\/www/' -i /etc/httpd/conf/httpd.conf and press Enter
- Type chown -R apache:apache /data/www and press Enter
- Type service httpd restart and press Enter
- Type firewall-cmd --zone=public --add-port=80/tcp and press Enter
- Type firewall-cmd --zone=public --add-port=80/tcp --permanent and press Enter
You should now be able to open a web page to your YUM server and you'll see the Apache welcome page. You'll also be able to browse to /yumrpms to see an empty directory listing.
|