Manually configuring RHEL repositories and installing dependant packages

Prerequisites
  • 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.

Procedure
  1. Set your host name and update the /etc/hosts file. To set the host name, perform the following steps:
    1. To set the host name, execute the following command:
      hostname <host name>
    2. Clear any existing host names in the /etc/hosts file, and enter the host name as <host name>.
    3. Save and exit this file.
    4. To verify the host name, execute the following command:
      hostnamectl
  2. 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:
    1. To edit the /etc/profile file, execute the following command:
      vi /etc/profile
    2. 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
    3. Save and exit the file.
  3. 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>
  4. To disable all the default repositories, execute the following command:
    subscription-manager repos --disable=*
  5. 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
  6. To refresh and update the repositories with the latest packages, execute the following commands:
    yum repolist
    yum update -y
  7. To install the dependency packages, execute the following commands:
    yum install –y docker socat openvswitch python-cliff \
    libvirt python-setuptools python-requests
  8. Optional: If you use proxy servers for the Internet connectivity, perform the following steps in the http-proxy.conf file:
    1. To navigate to the system directory, execute the cd /etc/systemd/system command.
    2. To create the docker.service.d directory, execute the mkdir docker.service.d command.
    3. To navigate to the docker.service.d directory, execute the cd docker.service.d command.
    4. If proxy does not require username and password:
      1. To edit the http-proxy.conf file, execute the vim http-proxy.conf command.

      2. 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>"
      3. Save and exit the http-proxy.conf file.

      4. To edit the https-proxy.conf file, execute the vim https-proxy.conf command.

      5. 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>"
      6. Save and exit the https-proxy.conf file.

    5. If proxy requires username and password:
      1. To edit the http-proxy.conf file, execute the vim http-proxy.conf command.

      2. 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>"
      3. Save and exit the http-proxy.conf file.

      4. To edit the https-proxy.conf file, execute the vim https-proxy.conf command.

      5. 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>"
      6. Save and exit the https-proxy.conf file.

  9. To verify the status of Docker, execute the following command:
    systemctl status docker
  10. 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.