4.2. Configuring a Local Repository for Offline Red Hat Virtualization Manager Installation
- Install Red Hat Enterprise Linux 7 Server on a system that has access to the Content Delivery Network. This system downloads all the required packages, and distributes them to your offline system(s).
ImportantEnsure that the system used in this procedure has a large amount of free disk space available. This procedure downloads a large number of packages, and requires up to 50GB of free disk space.
- Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:
# subscription-manager register
- Subscribe the system to all required entitlements:
- Find the
Red Hat Enterprise Linux Serverand
Red Hat Virtualizationsubscription pools and note down the pool IDs.
# subscription-manager list --available
- Use the pool IDs located in the previous step to attach the entitlements to the system:
# subscription-manager attach --pool=pool_id
- Disable all existing repositories:
# subscription-manager repos --disable=*
- Enable the required repositories:
# subscription-manager repos --enable=rhel-7-server-rpms # subscription-manager repos --enable=rhel-7-server-supplementary-rpms # subscription-manager repos --enable=rhel-7-server-rhv-4.0-rpms # subscription-manager repos --enable=jb-eap-7.0-for-rhel-7-server-rpms
- Ensure that all packages currently installed are up to date:
# yum update
NoteReboot the machine if any kernel related packages have been updated.
- Servers that are not connected to the Internet can access software repositories on other systems using File Transfer Protocol (FTP). To create the FTP repository, install and configure vsftpd:
- Install the vsftpd package:
# yum install vsftpd
- Start the
vsftpdservice, and ensure the service starts on boot:
# systemctl start vsftpd.service # systemctl enable vsftpd.service
- Create a sub-directory inside the
/var/ftp/pub/directory. This is where the downloaded packages will be made available:
# mkdir /var/ftp/pub/rhevrepo
- Download packages from all configured software repositories to the
rhevrepodirectory. This includes repositories for all Content Delivery Network subscription pools the system is subscribed to, and any locally configured repositories:
# reposync -l -p /var/ftp/pub/rhevrepoThis command downloads a large number of packages, and takes a long time to complete. The
-loption enables yum plug-in support.
- Install the createrepo package:
# yum install createrepo
- Create repository metadata for each of the sub-directories where packages were downloaded under
# for DIR in `find /var/ftp/pub/rhevrepo -maxdepth 1 -mindepth 1 -type d`; do createrepo $DIR; done;
- Create a repository file, and copy it to the
/etc/yum.repos.d/directory on the offline machine on which you will install the Manager.The configuration file can be created manually or with a script. Run the script below on the system hosting the repository, replacing ADDRESS in the
baseurlwith the IP address or fully qualified domain name of the system hosting the repository:
#!/bin/sh REPOFILE="/etc/yum.repos.d/rhev.repo" echo -e " " > $REPOFILE for DIR in `find /var/ftp/pub/rhevrepo -maxdepth 1 -mindepth 1 -type d`; do echo -e "[`basename $DIR`]" >> $REPOFILE echo -e "name=`basename $DIR`" >> $REPOFILE echo -e "baseurl=ftp://ADDRESS/pub/rhevrepo/`basename $DIR`" >> $REPOFILE echo -e "enabled=1" >> $REPOFILE echo -e "gpgcheck=0" >> $REPOFILE echo -e "\n" >> $REPOFILE done;
- Install the Manager packages on the offline system. See Section 3.2, “Installing the Red Hat Virtualization Manager Packages” for instructions. Packages are installed from the local repository, instead of from the Content Delivery Network.
- Configure the Manager. See Section 3.3, “Configuring the Red Hat Virtualization Manager” for initial configuration instructions.
- Continue with host, storage, and virtual machine configuration.