Thursday, March 17, 2016

Standard Post Linux Install Steps

After installing a new test server for home use. The following steps should be performed.

  1. Check Network
    Issue the command “ip addr” from a shell prompt to verify that a valid ip address is being set by your dhcp or you have set a valid ip manually.
    To restart your network service “systemctl restart network.service”
  2. Install Additional base network tools
    yum install net-tools -y
    Issue command “ifconfig” to verify tools and ip.
  3. Create a personal user account. During the minimal install you may have created a personal user account which will replace this step. If you did not you should always create a personal user account and sign into the system with this account.
    ssh in as the root user and run.
    useradd <username>
    Example: useradd jenkinss
    passwd <username>
    Enter a strong password.
  4. Set your user to have sudoers rights on the linux servers so that you can perform administrative commnads.
    Issue Command “visudo”
    ”Ctrl +G” “Ctrl +A” will bring you to the end of the screen and put you in insert mode.
    Add the following lines. Make sure your modify the <username> to your valid username.
    User_Alias ROOT_GROUP=<username> 
    Cmnd_Alias ROOT_SUDO=/usr/bin/sudo su - root
    Cmnd_Alias SU=/bin/su
    root    ALL=(ALL) ALL   
    ROOT_GROUP ALL=NOPASSWD:ROOT_SUDO,SU,ALL
  5. Login as your user
    ssh in to the server with your user account.
  6. Shutdown local firewall – “Home Test Systems”
    sudo su - root
    systemctl disable  firewalld.service
    systemctl stop  firewalld.service
  7. Disable selinux – “Home Test Systems”
    vi /etc/selinux/config
    Change enabled to disabled
    selinux=disabled
  8. Edit the hostname record to have server name included
    vi /etc/hostname
    ”Ctrl + I” to insert
    Change the name to your new server name.
  9. Install networking tools
    yum install pciutils -y
    To view network card info
    lspci | grep Ether
    ll /sys/class/net/*/device
    ethtool <device> to find the active card if multiple card exist
    To see current network card configuration
    cat /etc/sysconfig/network-scripts/ifcfg-<your device>
  10. Set the hosts record to find this server by it’s ip. (Not all tools require this but some tools will read this to find the hostname and may append localhost if it does not exist.)
    To see the server ip.
    ifconfig
    To see the server hostname
    hostname
    To edit the hosts record so the hostname resolves and is found by applications
    vi /etc/hosts
    <ip> <hostname>
  11. Patch OS
    yum update -y
  12. Restart the server
    reboot

No comments:

Post a Comment