- 06 Jun 2022
- 5 Minutes to read
- Print
- DarkLight
- PDF
RIG CentOS Linux Installation
- Updated on 06 Jun 2022
- 5 Minutes to read
- Print
- DarkLight
- PDF
Overview
This document describes how to load CentOS as the operating system for a Nectar RIG.
- CentOS Download and Install
- Server Configuration
Audience
This guide assumes the following:
- You are proficient with UCMP and have had UCMP Operator training.
- You are familiar with the Linux Operating System and the vi text editor.
Supported Software Versions
CentOS Download and Install
This chapter explains how to download and install CentOS. The sections in this chapter include:
- Download CentOS
- Install CentOS
Download CentOS
The instructions in Install CentOS, states to download DVD-1. However, if a GUI front-end is required, then download DVD-2.
To begin:
- Download the operating system from: http://www.centos.org.
- Once the .iso file has downloaded, then burn it to a DVD.
Install CentOS
To install CentOS:
- Mount the DVD in the server.
- When prompted, select Install or upgrade an existing system, which will perform a clean install.
Figure 2-1Install or Upgrade an Existing System
Note
There is no need to test the media. This is an old requirement from the days of floppy disks.
- Select the correct language for the server and keyboard.
- Select Yes, discard any data to perform a clean install.
Figure 2-2Yes, Discard Any Data
- Assign a host name. In our example we will use rig.mycompany.com.
- Select your time zone.
- Enter a password for the root user. Use your corporate best practices for passwords.
- This should be a secure password of at least eight characters, a combination of upper and lower case letters, including numbers and symbols.
- Avoid using dictionary words.
- When prompted, click the radio button for Use All Space.
Figure 2-3Use All Space
- When prompted, write the changes to disk.
- When prompted, select Minimal as the installation type.
Figure 2-4Select Minimal
- Reboot and move to the next section.
Server Configuration
This chapter explains how to download and install CentOS. The sections in this chapter include:
Network Interface
OS Updates
Firewall
SNMP
NTP
clientops Login
clientops Privileges
Disable SSH Root Access
Linux Updates
Conclusion
Network Interface
Note
The command line prompt shown below is #. The commands you enter will be bold.
- Log into the Linux server as root using the password created during the installation process.
- Edit the interface configuration file. This example configures Ethernet 0 (eth0). If your primary network interface is not eth0, replace eth0 with your primary network interface.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
- The Hardware Address should have automatically populated.
- Change ONBOOT to yes to activate the card when the server is booted.
- Change BOOTPROTO from dhcp to static.
DEVICE=eth0 HWADDR=08:00:27:46:C9:2E
TYPE=Ethernet ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.10 NETMASK=255.255.255.0
- Edit the network configuration file.
# vi /etc/sysconfig/network
- Add the GATEWAY line, which should point to your default gateway. In our example we are using 192.168.1.1 as the default gateway. The file should look like the example below when completed.
NETWORKING=yes
HOSTNAME=rig.mycompany.com GATEWAY=192.168.1.1
- We will now configure the DNS servers.
# vi /etc/resolv.conf
- Set the search field to your local domain name and add a nameserver entry for each DNS server. The file should look like the example below when complete.
search mycompany.com nameserver 192.168.1.254
nameserver 8.8.8.8
nameserver 202.54.2.5
- Restart the network service to apply the changes.
# service network restart
- To verify the settings have been applied correctly, issue the following commands and confirm the results.
- ip addr will display the interface configuration and should reflect your earlier changes.
- The ip route command will verify your default gateway address.
- The 192.168.1.1 ping will verify that you can reach your default gateway.
- The google.com ping will verify that DNS is working.
# ip addr eth0
# ip route or ip r # ping 192.168.1.1
# ping google.com
OS Updates
Perform system updates to ensure the latest updates are on the system.
# yum update
Firewall
The built in iptables firewall must either be configured or disabled. Configuring it is beyond the scope of this document. See the Protocols and Ports Guide for a list of ports used by the RIG.
For our purposes here, the firewall will be disabled.
- The chkconfig command will prevent the firewall from being loaded on subsequent boots.
- The service command shuts the firewall down immediately.
# chkconfig --del iptables # service iptables stop
- Disabling SELinux (Security Enhanced Linux) is also important to ensure the proper functioning
of Nectar’s software. To do this, edit the SELinux config file. Change SELinux from enforcing to disabled.
# vi /etc/selinux/config
- For the changes to be applied, the server must be rebooted. This reboot can be performed any time before the Nectar UCMP software is installed.
SNMP
This section explains how to install and configure the SNMP Daemon.
- Run the following command:
# yum install net-snmp
- By default, the SNMP community read-only string is set to public. We recommend changing this, and to do so, edit the configuration file:
# vi /etc/snmp/snmpd.conf
- Edit the line below in the configuration file and change public to the new community string.
- Nectar CMP has default RIG monitoring (the LocalRIG Agent in Nectar CMP) that expects the community string l0calm0n. If there is no corporate standard, this is recommended.
- If corporate standards dictate a different community string, please update the LocalRIG Agent when deploying the Nectar software:
com2sec notConfigUser default public
- Configure SNMP to start when the server starts and start the service immediately.
# chkconfig snmpd on # service snmpd start
NTP
We will install the NTP Daemon (Time Server) for the RIG as a synchronized clock.
# yum install ntp
clientops Login
It is a best practice not to use the root user on a Linux server unless absolutely necessary. We will create a clientops user for use by the Managed Services Partner.
The following steps are performed while logged in as root unless otherwise stated.
- Create a new user (you may want to create more than one user).
# useradd clientops
- Set the password for the new user; be sure to use this exact password.
# passwd clientops
Changing password for user nectar-user. New password: clientops12
Retype new password: clientops12
passwd: all authentication tokens updated successfully.
clientops Privileges
By default, this login will have limited privileges and cannot make any changes. We will now configure sudo in order to grant root access when this user invokes the sudo command. As a Linux best practice, when the user needs to make changes, the sudo command will prompt again for the clientops password.
- Before editing the vi /etc/sudoers file, add the clientops user account to the sudoers
group via the following command:
usermod -aG wheel clientops
- Allow the new user to get temporary root privileges, which will be logged, by editing the sudoers file:
# vi /etc/sudoers
- Find the line below and remove the comment mark # in red.
# %wheel ALL=(ALL) ALL
Disable SSH Root Access
Security best practice dictates that we disable direct root access via SSH. The su command will be used to gain root access after logging into the server.
- Edit the sshd_config file as follows:
# vi /etc/ssh/sshd_config
- Remove the comment mark #, and change the setting from yes to no for the line below.
# PermitRootLogin yes
- After editing the PermitRootLogin line in the sshd_config file, you must restart the sshd service in order for it to take effect, use the following command:
service sshd restart
- From this point forward, the new user, clientops, should be used to log in to the server. If root functionality is needed, the sudo command should be used. (A password prompt will appear after the first use; this is the clientops user password, not the root password.) The following is an example of a command with sudo.
# sudo ls -la /root
- This will prompt again for a password. Use the clientops password to gain root access.
Linux Updates
Going forward one may perform updates as part of the standard server maintenance windows as follows:
# yum update
Conclusion
The RIG should now be prepared with CentOS and ready for deployment of Nectar software.