RHEL/CentOS Local Repository Mirror: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
 
Line 8: Line 8:
# CentOS requires roughly 10GiB for base, 5GiB for updates, and 1GiB for extras, ensure there is enough space is /var/www/html.
# CentOS requires roughly 10GiB for base, 5GiB for updates, and 1GiB for extras, ensure there is enough space is /var/www/html.
# The following packages will need to be installed, yum-utils and createrepo.
# The following packages will need to be installed, yum-utils and createrepo.
#: <tt>'''yum install yum-utils createrepo'''</tt>
#: <tt>'''# yum install yum-utils createrepo'''</tt>
# Create a repos directory in /var/www/html.
# Create a repos directory in /var/www/html.
#: <tt>'''mkdir -p /var/www/html/repos/centos/6'''</tt>
#: <tt>'''# mkdir -p /var/www/html/repos/centos/6'''</tt>
# Synchronize the base, extras, and updates repository.
# Synchronize the base, extras, and updates repository.
#: <tt>'''reposync -r base -p /var/www/html/repos/centos/6/'''</tt>
#: <tt>'''# reposync -r base -p /var/www/html/repos/centos/6/'''</tt>
#: <tt>'''reposync -r updates -p /var/www/html/repos/centos/6/'''</tt>
#: <tt>'''# reposync -r updates -p /var/www/html/repos/centos/6/'''</tt>
#: <tt>'''reposync -r extras -p /var/www/html/repos/centos/6/'''</tt>
#: <tt>'''# reposync -r extras -p /var/www/html/repos/centos/6/'''</tt>
# Create the repository xml files for each of the repos synchronized.
# Create the repository xml files for each of the repos synchronized.
#: <tt>'''createrepo /var/www/html/repos/centos/6/base/'''</tt>
#: <tt>'''# createrepo /var/www/html/repos/centos/6/base/'''</tt>
#: <tt>'''createrepo /var/www/html/repos/centos/6/updates/'''</tt>
#: <tt>'''# createrepo /var/www/html/repos/centos/6/updates/'''</tt>
#: <tt>'''createrepo /var/www/html/repos/centos/6/extras/'''</tt>
#: <tt>'''# createrepo /var/www/html/repos/centos/6/extras/'''</tt>


=== Client ===
=== Client ===

Latest revision as of 01:46, 3 November 2021

Red Hat Enterprise Linux

Server

Client

CentOS

Server

  1. This exercise will work with CentOS 6/7.
  2. CentOS requires roughly 10GiB for base, 5GiB for updates, and 1GiB for extras, ensure there is enough space is /var/www/html.
  3. The following packages will need to be installed, yum-utils and createrepo.
    # yum install yum-utils createrepo
  4. Create a repos directory in /var/www/html.
    # mkdir -p /var/www/html/repos/centos/6
  5. Synchronize the base, extras, and updates repository.
    # reposync -r base -p /var/www/html/repos/centos/6/
    # reposync -r updates -p /var/www/html/repos/centos/6/
    # reposync -r extras -p /var/www/html/repos/centos/6/
  6. Create the repository xml files for each of the repos synchronized.
    # createrepo /var/www/html/repos/centos/6/base/
    # createrepo /var/www/html/repos/centos/6/updates/
    # createrepo /var/www/html/repos/centos/6/extras/

Client

Further Reading

  1. []