Manually configuring RHEL repositories and installing dependant packages
To perform this procedure, you must be logged in as the root user.
An IP address must be assigned to the PCIe NIC in this system for Internet connectivity. The Internet connectivity is required to connect to the Red Hat repositories to install and update the packages.
For more information about configuring Internet connectivity, see Configuring Internet connectivity on NPS toolkit host.
Your system must be registered with the Red Hat Customer Portal using the Red Hat Subscription-Manager. For more information about registering with the Red Hat Customer Portal, see Red Hat Subscription management.
-
Set your host name and update the
/etc/hosts
file. To set the host name, perform the following steps:- To set the host name, execute the following command:
hostname <host name>
- Clear any existing host names in the
/etc/hosts
file, and enter the host name as<host name>
. - Save and exit this file.
- To verify the host name, execute the following command:
hostnamectl
- To set the host name, execute the following command:
-
If you use proxy servers for the Internet connectivity, edit the
/etc/profile
file and add the required entries. To configure the/etc/profile
file, perform the following steps:- To edit the
/etc/profile
file, execute the following command:vi /etc/profile
- Add the following lines at the end of this file:
export http_proxy=<URL of proxy server and port number> export https_proxy=<URL of proxy server and port number> export no_proxy=<IP address of NPS host>,localhost, XXX.X.X.X,XX.XX.X.X/XX
- Save and exit the file.
- To edit the
-
If you use proxy servers for Internet connectivity, ensure that the following entries are available in the
/etc/rhsm/rhsm.conf
file:# an http proxy server to use proxy_hostname = <DNS name or IP address of the proxy server> # port for http proxy server proxy_port = <port number> # user name for authenticating to an http proxy, if needed proxy_user = <username> # password for basic http proxy auth, if needed proxy_password = <password>
-
To disable all the default repositories, execute the following command:
subscription-manager repos --disable=*
-
To enable only the required RHEL repositories, execute the following commands as a root user:
subscription-manager repos --enable=rhel-7-server-rpms \ --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms \ --enable=rhel-7-server-ansible-2.8-rpms --enable=rhel-7-server-ose-4.4-rpms
-
To refresh and update the repositories with the latest packages, execute the following commands:
yum repolist yum update -y
-
To install the dependency packages, execute the following commands:
yum install –y docker socat openvswitch python-cliff \ libvirt python-setuptools python-requests
- Optional:
If you use proxy servers for the Internet connectivity, perform the following steps in the
http-proxy.conf
file:- To navigate to the
system
directory, execute thecd /etc/systemd/system
command. - To create the
docker.service.d
directory, execute themkdir docker.service.d
command. - To navigate to the
docker.service.d
directory, execute thecd docker.service.d
command. - If proxy does not require username and password:
To edit the
http-proxy.conf
file, execute thevim http-proxy.conf
command.- Add the following entries in the
http-proxy.conf
file:[Service] Environment="HTTP_PROXY=<HTTP proxy URL and port number>" Environment="HTTPS_PROXY=<HTTPS proxy URL and port number>" Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>"
Save and exit the
http-proxy.conf
file.To edit the
https-proxy.conf
file, execute thevim https-proxy.conf
command.- Add the following entries in the
https-proxy.conf
file:[Service] Environment="HTTP_PROXY=<HTTP proxy URL and port number>" Environment="HTTPS_PROXY=<HTTPS proxy URL and port number>" Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>" NOTE:If mode of cluster installation is offline add registry FQDN to NO_PROXY Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>,<registry_fqdn>"
Save and exit the
https-proxy.conf
file.
- If proxy requires username and password:
To edit the
http-proxy.conf
file, execute thevim http-proxy.conf
command.Add the following entries in the
http-proxy.conf
file:[Service] Environment="HTTP_PROXY=http://{{ proxy_user }}:{{ proxy_password }}@<HTTP proxy URL and port number>" Environment="HTTPS_PROXY=http://{{ proxy_user }}:{{ proxy_password }}@<HTTPS proxy URL and port number>" Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>"
Save and exit the
http-proxy.conf
file.To edit the
https-proxy.conf
file, execute thevim https-proxy.conf
command.Add the following entries in the
https-proxy.conf
file:[Service] Environment="HTTP_PROXY=http://{{ proxy_user }}:{{ proxy_password }}@<HTTP proxy URL and port number>" Environment="HTTPS_PROXY=http://{{ proxy_user }}:{{ proxy_password }}@<HTTPS proxy URL and port number>" Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>" NOTE:If mode of cluster installation is offline add registry FQDN to NO_PROXY Environment="NO_PROXY=localhost,127.0.0.1,<nps_vm_ip>,<nps_vm_hostname>,<registry_fqdn>"
Save and exit the
https-proxy.conf
file.
- To navigate to the
-
To verify the status of Docker, execute the following command:
systemctl status docker
- Configure your NPS toolkit controller with your NTP server and synchronize the NPS toolkit controller with the NTP server. If required, update the time zone of your system.