RHEL 7/Centos 7 Installation

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

This installation procedure has been tested on bare metal (ThinkPad laptops) and on VirtualBox VMs. The sections that refer to non-virtualized installation are prefixed with Bare Metal and indented. The sections that refer to virtualized installation are prefixed with VirtualBox and indented.

DVD

Download the RHEL 7.2 Binary ISO DVD from https://access.redhat.com.

Procedure

Boot with the Image DVD

Install Red Hat Enterprise Linux 7.2
...
Starting installer, one moment.

Welcome to Red Hat Enterprise Linux 7.2

What language would you like to use during the installation process? English -> English (United States) -> Continue

Installation Summary

First go to "Network & Host Name" to set external access.

Network & Host Name

Turn wireless off.

Virtual Box

The NAT adapter is eth1. Turn it "ON".
This is the VirtualBox NAT network interface, so it should get an IP address from its DHCP server and allow external connection. It should say "Connected", get a valid IP address (example IP address 10.0.3.15, default route 10.0.3.2, DNS: a valid DNS or your local router). Then go to eth0 and turn it ON.

Bare Metal

Turn ethernet (enp0s25) ON.

Configure.

General

Automatically connect to this network when it is available.

All users may connect to this network.

Ethernet

Device: eth0/enp0s25

MTU: automatic

IPv4 Settings

Method: Manual

Addresses: Add

Virtual Box

Address 172.20.2.11, Netmask 255.255.0.0, Gateway: leave empty

Bare Metal

Address 192.168.1.8, Netmask 255.255.255.0, Gateway: 192.168.1.1, DNS servers: 192.168.1.1

Make sure you Save.

Host Name

DO NOT FORGET

Go to "Host name".

Virtual Box

Specify the local host name: openshift-master1. If you are planning to use a local DNS server, specify openshift-master1.openshift.local

Bare Metal

now510.local

Done.

Date & Time

Time Zone.

Network Time: ON

Done.

Keyboard

English(US)

Installation Source

Virtual Box

Auto-detected installation media

Bare Metal

Local media

Software Selection

Minimal Install

Installation Destination

Virtual Box

Select the VBOX disk, automatically configure partitioning.

Bare Metal

If the disk was previously partitioned and want to delete the previous partitions: Partitioning -> Automatically configure partitioning, check "I would like to make additional space available" -> Delete All -> Reclaim Space.

Done.

The top level menu should show Automatic partitioning selected.

Kdump

Disable.

Begin Installation

Begin Installation

User Settings

Root password.

Create users as necessary, depending on the purpose of the box (openshift, wiki, etc)

If you create a service user, go to Advanced and add it to its own group.

Capture credentials in the standard location (Contacts for the host in question).

Reboot

Will eject the DVD by itself.

After reboot, the host should be available for ssh.

Post-Install Tasks

Register with the Subscription Manager

If this is a supported RHEL system, register it with the subscription manager, this will give access to official repositories for update. Instructions are available here: RHEL Subscription Manager#Register_a_Linux_System

Update All Installed Packages

yum update

Install Packages I Need

yum install wget unzip

policycoreutils-python is needed for semanage. See selinux#Configuration

yum install policycoreutils-python

Configuration

Disable the Network Manager

Turn off firewalld and configure the iptables service

Usually a new system comes with firewalld enabled. Turn it off: firewalld#Disable.

Install the iptables service:

Add IPv4 firewall rules:

  1. iptables Command Line Tool Examples#Allow_SSH_Only_From_the_Internal_Network_on_a_Non-Standard_Port (note this procedure implies reconfiguring the sshd server at the same time, otherwise we may lose remote access).
  2. iptables Command Line Tool Examples#Allow_a_Web_Server_on_a_Specific_Interface

If IPv6 is not explicitly configured and used, best if you block IPv6 access in firewall:

For a discussion on iptables service and firewalld, see iptables Concepts.

Configure DNS

bind Operations#Set_Up_DNS_on_a_Newly_Installed_Linux_System

Security Hardening

Linux 7 Security Hardening

Reboot

Reboot one more time, to make sure the system starts after patching and configuration:

init 0

Bare Metal

Start the system from the power button.

VirtualBox

Start the system from the VirtualBox console.

Next Steps

VirtualBox

Continue VirtualBox Installation. If installing in VirtualBox, go back to the VirtualBox installation procedure https://home.feodorov.com:9443/wiki/Wiki.jsp?page=VirtualBoxVMCreation#GuestAdditions

Troubleshooting

VirtualBox - Failure to Boot with the Default Kernel

Did not know what I did, but I set storage as follows:

Controller IDE -> Empty -> IDE Primary Slave, No Live CD/DVD.

Controller SATA -> Port Count: 2

*.vdi -> Hard Disk SATA Port 0, No Solid-state Drive.

A Network Adapter Does Not Start

Linux 7 Network Configuration#Network_Adapter_Does_Not_Start_After_Installation