Manually configuring RHEL repositories and installing dependant packages
Ensure you are logged in as the root user.
Ensure an IP address is 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.
Ensure your system is 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 in FQDN format and update the
/etc/hosts
file. To set the host name, perform the following steps:- Run 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, run the following command:
hostnamectl
- Run 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, run 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 the 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>
-
Register to subscription manager using below command by passing your RHEL account credentials.
subscription-manager register --username <rhel_username> --password <rhel_password> --force
-
To enable the required Red Hat Enterprise Linux repositories, do the following:
- Run the following command:
subscription-manager list --available –all
- Search for subscription name as openstack, system type as Virtual and copy the pool ID.
- Provide the pool ID:
subscription-manager attach --pool=<pool_id>
- To enable only the required RHEL repositories, run the following commands:
sudo subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-openstack-13-rpms --enable=rhel-7-server-rhceph-3-tools-rpms
- Run the following command:
-
To refresh and update the repositories with the latest packages, run the following commands:
yum repolist yum update -y
-
To install the dependency packages, run the following commands:
yum install ansible –y yum install wget –y
-
Perform the following steps to configure yum and docker:
- Create
docker.service.d
directory under/etc/system/system
path using following commands:cd /etc/systemd/system mkdir docker.service.d
- If you are using proxy servers, run the following commands:
To set proxy for yum, edit
/etc/yum.conf
file:vi /etc/yum.conf
Add the following line as the last line of
yum.conf
fileproxy=http://<proxy_url>:<proxy_port>
- Create
http-proxy.conf
andhttps-proxy.conf
file insidedocker.service.d
directory and configure it using following commands:echo -e '[Service]\nEnvironment="HTTP_PROXY= http://<proxy_url>:<proxy_port>"' > /etc/systemd/system/docker.service.d/http-proxy.conf echo -e '[Service]\nEnvironment="HTTPS_PROXY= http://<proxy_url>:<proxy_port>"' > /etc/systemd/system/docker.service.d/https-proxy.conf
If proxy required auth then run following commands:echo -e '[Service]\nEnvironment="HTTP_PROXY=http://{{ proxy_user }}:{{ proxy_password }}@http://<proxy_url>:<proxy_port>"' > /etc/systemd/system/docker.service.d/http-proxy.conf echo -e '[Service]\nEnvironment="HTTPS_PROXY=http://<proxy_user>:<proxy_password >@http://<proxy_url>:<proxy_port>"' > /etc/systemd/system/docker.service.d/https-proxy.conf
- Add NO_PROXY in docker configuration using following commands:
echo -e 'Environment="NO_PROXY=localhost,127.0.0.1,<NPS_TOOLKIT_VM_IP>"' >> /etc/systemd/system/docker.service.d/http-proxy.conf echo -e 'Environment="NO_PROXY=localhost,127.0.0.1,<NPS_TOOLKIT_VM_IP>"' >> /etc/systemd/system/docker.service.d/https-proxy.conf
- Create
-
To enable and start the docker services, run the following commands:
systemctl daemon-reload systemctl start docker systemctl restart docker
-
To verify the status of Docker, run the following command:
systemctl status docker
-
After the required dependency packages are successfully installed, disable and remove the the Network Manager service using the following commands:
systemctl stop NetworkManager systemctl disable NetworkManager