Installing Red Hat Enterprise Linux 5

snottysurfsideΔιακομιστές

9 Δεκ 2013 (πριν από 3 χρόνια και 11 μήνες)

107 εμφανίσεις

Installing Red Hat Enterprise Linux 5

This document is intended to help you install Red Hat Enterprise Linux 5 (RHEL5).
The steps taken in
this document are as generic as possible, which should apply to any system that you install RHEL5 on,
whether it is
a VMware virtual machine or a physical server.














Revision history


Revision no.

Revision by

Revision date

Changes

1.0

Erik Noort

Dec 11, 2007

Original document

1.1

Daan van
den Berg

Sep 15, 2009

Installation & configuration for HP SIM

2.0

Daan van
den Berg

Jan 14, 2010

Updated the original document & rewritten

2.1

Daan van
den Berg

Apr 6, 2010

Added kernel option for hardware clock
correction for VMware virtual machines &
rewritten sendmail configuration to be persistent
across upgrades.

2.2

Daan van
den Berg

Jun 24, 2010

Minor update, added section about environment.

2.3

Daan van
den Berg

Sep 2, 2010

Minor update.


2.4

Peter Kloet

Nov 29, 2010

Change snmp configuration


Index

Revision history

................................
................................
................................
................................
.......

1

1 General notes

................................
................................
................................
................................
.......

3

2 Installing the operating system

................................
................................
................................
............

4

2.1 Installation

................................
................................
................................
................................
.....

4

2.2 Initial configuration

................................
................................
................................
.......................

6

3 Configuration

................................
................................
................................
................................
........

7

3.1 Edit boot options

................................
................................
................................
...........................

7

3.2 Edit the default runlevel

................................
................................
................................
................

7

3.3 Create the
itmaint

user

................................
................................
................................
.................

7

3.4 Hosts file

................................
................................
................................
................................
........

7

3.5 Issue text

................................
................................
................................
................................
.......

8

3.6 DNS servers
................................
................................
................................
................................
....

8

3.7 Syslog dae
mon

................................
................................
................................
...............................

8

3.8 Mail aliases

................................
................................
................................
................................
....

8

3.9 Sendmail configuration

................................
................................
................................
.................

9

3.10 Telnet

................................
................................
................................
................................
...........

9

3.11 NTP

................................
................................
................................
................................
............

10

3.12 Red Hat Network

................................
................................
................................
.......................

10

3.13 Environment

................................
................................
................................
..............................

10

4 Network settings

................................
................................
................................
................................

11

4.1 Single NIC configuration

................................
................................
................................
..............

11

4.2 NIC bonding configuration

................................
................................
................................
..........

11

5 Installing Sysedge client

................................
................................
................................
.....................

12

6 Installing HP DataProtector client

................................
................................
................................
......

13

7 Configure SNMP

................................
................................
................................
................................
.

14




1 General notes

Please consider the following notes:



when partitioning the disk, the swap partition should always be 1GB more than the amount
of physical memory



when installing a physical server, make sure that the system
disk is RAID1



when installing a virtual server, make sure that the swap partition resides on a separate disk
file



some parts of this manual are optional installation steps; this will be indicated as such
throughout the document



throughout this document, th
e following properties are used for the machine that is
installed:

o

IP address: 10.9.0.2

o

network: 10.9.0.0

o

netmask: 255.255.255.0

o

default router: 10.9.0.1

o

hostname: machine01

o

domain: springer
-
sbm.com



note that the above values are not
the actual values that

have to be used when installing a
real machine!



2 Installing the operating system

This part of the manual describes the installation of RHEL5.

2.1 Installation



Boot the machine with the installation DVD in the drive
-

make sure that the system is

config
ured to boot from CD/DVD




At the boot screen of the installation DVD, do either of the following:

o

press ENTER to start a graphical installation wizard

o

type
linux text

and press ENTER to start a text
-
based installation wizard




Choose
Skip

to skip the tes
ting of the installation media




Choose
Next




Choose
English (English)

as the language for the installer and choose
Next




Choose
U.S. International

as the default keyboard layout and choose
Next




When asked to enter the installation number, choose
Skip
entering Installation Number

and
OK
. In the next screen, choose
Skip




Choose
Yes

when asked initialize the
sda

disk, erasing all data




Choose
Create custom layout

when asked how to partition the drive, choose
Next




Create a partitioning schema as follows:

Mount point

Filesystem

Size

/boot

ext
2

512MB

/

ext3

1024MB (1GB)

/home

ext3

4096MB (4GB)

/usr

ext3

6144MB (6GB)

/var

ext3

6144MB (6GB)

/tmp

ext2

8192MB (8GB)

/opt

ext3

space left

/data (
optional
)

ext3

space left

none

swap

1GB more than RAM


Note
: if there are any additional disks in the setup, include them in the partitioning scheme if
possible. Mount these file systems as required by the requester of the
server. Usually additional
disks have to be mounted on /u01 or /data1. These are not standar
d mount points in the
installer, but if you enter these as mount points, they will be created during the installation.



Choose
The GRUB boot loader will be installed on /dev/sda

and choose
Next




Choose
Europe/Amsterdam

as the default time zone, check the bo
x next to
System clock
uses UTC

and choose
Next




Enter the root password twice and choose
Next




Choose
Customize now

when asked to install additional software and choose
Next




In each of the software categories, choose the following options (and check /
unche
ck the
checkboxes where needed) and choose
Next

Category

Packages

Desktop environments



<none>

Applications



Editors



Text
-
based I
nternet: only
lynx

Development



<none>

Servers



FTP Server



Legacy Network Server: add the
packages
rsh
-
server

and
telnet
-
server



Printing Support



Server Configuration Tools

Base System



Administration Tools



Base



Java



System Tools: add the packages
net
-
snmp
-
utils

and
sysstat



X Window System

Languages



<none>




Choose
Next

when the installer tells you that it’s ready to install RHEL5 on your system




When the installation is finished, choose
Reboot



2.2 Initial configuration

As soon as the system is rebooted, the “first boot” screen appears. This will configure the server
i
nitially.



Choose
Forward

in the
Welcome

screen




Choose
Yes, I agree to the License Agreement

and choose
Forward




At the
Firewall

screen, choose
Disable
,
Forward
, and
Yes

when asked to




At the
SELinux

screen, choose
Disabled
,
Forward
, and
Yes




Choose
Forward
at the
Kdump

screen




Choose
Forward

at the
Date and Time

screen




At the
Set Up Software Updates

screen, choose
Forward




Choose
Forward

and
Continue

at the
Create User

screen




Forward

at the
Sound Card
screen




Finish

at the
Additional CDs
screen




Ch
oose
OK

when asked to reboot the system

3 Configuration

After the reboot, the login screen is displayed on the console. At the bottom of the screen, choose
Session

and select
Failsafe terminal
. Log in as the
root

user.

3.1 Edit boot options

In the
terminal that displays on the screen, type

# vi /boot/grub/grub.conf

In
vi
, remove all instances of
rhgb

from the kernel lines. Save and close the file with
:wq
.

If the machine to be installed is a VMware virtual machine, add the options
divider=10
clockso
urce=acpi_pm

to the kernel line.

3.2 Edit the default runlevel

Normally the machine starts with a graphical session (runlevel 5). Change this to runlevel 3 (console
session) by editing:

# vi /etc/inittab

Change
the line

id:5:initdefault:

to



id:3:initdefault:

Reboot the machine afterwards.

3.3 Create the
itmaint

user

After rebooting, log in as the
root

user again and create the
automation

group:

# groupadd
-
g 323 automation

and create the
itmaint

user:

# useradd
-
u 250
-
g 323
-
d /home/itmaint

-
c “
tbv maintenance
it” itmaint

Set the password and permissions for the home directory:

# passwd itmaint

# chmod 750 /home/itmaint

3.4 Hosts file

Edit the hosts file by typing
vi /etc/hosts

and add the following line to it:

10.9.0.2


machine01.springer
-
s
bm.com


machine01



3.5 Issue text

Copy the issue text
from
another

unix / linux machine with the command:

# scp /etc/issue machine01:/etc/issue

And edit it accordingly to match the new machine’s hostname and function.

After editing, copy the
file for use with telnet:

# cp /etc/issue /etc/issue.net

Also, edit the file
/etc/ssh/sshd_config

to match the following:

# no default banner path

Banner /etc/issue

and restart the ssh daemon with

# /etc/init.d/sshd restart

3.6 DNS

servers

Edit the file
/etc/resolv.conf

to match the following:


domain springer
-
sbm.com


nameserver 194.171.67.234


nameserver 194.171.67.135

3.7 Syslog daemon

Open the file
/etc/syslog.conf

for editing with

# vi /etc/syslog.conf

and add the line

*.
info;mail.none;authpriv.none;cron.none


@192.87.90.211

3.8 Mail aliases

Edit the file
/etc/aliases
and substitute the word
root

by
postmaster
after the entries for
daemon,
uucp

and
operator
.

Edit the following lines:

mailer
-
daemon:

postmaster

postmaster:


root

to:

mailer
-
daemon:

root

postmaster:


unixbeheer

and:

#root:


marc

to:

root:



postmaster

unixbeheer
:


unix_operations@springer.com

3.9

Sendmail configuration

Open the file
/etc/mail/sendmail.
mc

and add the following lines at the bottom of the file:

dnl # Added by Unix Mgmt


define(`SMART_HOST’,`smtp.springer
-
sbm.com’)dnl


MASQUERADE_AS(`springer
-
sbm.com’)dnl

Save and close the configuration file with
:wq
. Next, the configuration file has to be c
ompiled into a
working configuration by doing the following:

# m4 sendmail.mc > sendmail.cf.new

Check whether the newly created file has the following lines in it:

DSsmtp.springer
-
sbm.com

DMspringer
-
sbm.com

If everything is correct, back up the original configuration and
put the new one in place:

# cp sendmail.cf sendmail.cd.<date>

# mv sendmail.cf.new sendmail.cf

Restart the sendmail daemon to make the new configuration active:

# /etc/init.d/sendmail restart

Ensure that the ip address of the system is added to the allowed hosts list on both MTAs
(
senldogo0073

and
seusnesp0001
).

Send a test email to see whether this works.

3.10 Telnet

Enable the telnet service using the following commands:

# chkconfig telnet o
n

# service xinetd restart



3.11 NTP

Open the file
/etc/ntp.conf

and replace the lines containing:

server 0.rhel.pool.ntp.org

server 1.rhel.pool.ntp.org

server 2.rhel.pool.ntp.org


by

# Get Time From Preferred NTP Server

server ntp3.springer
-
sbm.com
prefer

# Get Time From Backup NTP Servers

server ntp1.springer
-
sbm.com

server ntp2.springer
-
sbm.com


Restart the service with
/etc/init.d/ntpd restart
.

3.12 Red Hat Network

To receive updates and/or extra software packages such as clustering, the system mu
st be registered
at Red Hat. Make sure that enough subscriptions are available at RHN and that the correct ports have
been opened on the firewall.

Register the new system with:

# rhn_register

C
hoose
Next
,
enter you
r username and password for RHN and choose
Next
.

Enter the system name and choose
Next

until you see a confirmation screen, at which you choose
OK

and
Finish
.

The system software can now be updated with the command

# yum update

Reboot the system afterwards.

3.13 Environment

Add the following lines at the bottom of the file
/etc/profile
:

export TERM=vt100

export EDITOR=vi

Save and close the file afterwards.



4 Network settings

In this part of the manual, there is a distinction between installing RHEL5 on a virtual machine or
a
physical machine. Physical machines usually have two or more network interfaces, in which case we
will use NIC bonding to create a failover possibility in case one of the NICs fails.

If the physical server has only one NIC,
or when installing a virtual m
achine,
follow directions under
Single NIC configuration
.

Otherwise, follow the directions for
NIC bonding

configuration
.

4.1 Single NIC configuration

When installing a server with only one NIC, the network interface that is used is probably
eth0
. Edit
the file
/etc/sysconfig/network
-
scripts/ifcfg
-
eth0
, so that it reflects the following:

DEVICE=eth0

ONBOOT=yes

USERCTL=no

BOOTPROTO=static

NETMASK=255.255.255.0

IPADDR=
10.9.0.2

PEERDNS=no


check_link_down() {


return 1;

}


and the file
/etc/sysconfig
/network
:

NETWORKING=yes

NETWORKING_IPV6=yes

HOSTNAME=
machine01

GATEWAY=10.9.0.1


Restart the networking service with the following command:

# /etc/init.d/network restart

4.2 NIC bonding

configuration

For servers that contain two or more NICs, we can
create a failover situation, in which two NICs act
as one. If one of the NICs fails, the other one takes over automatically.

First, edit the file
/etc/modprobe.conf

and add the following lines at the end:

alias bond0 bonding

options bond0 miimon=100 mode=1

Create a file
ifcfg
-
bond0

in
/etc/sysconfig/network
-
scripts
, containing the following:

DEVICE=bond0

BOOTPROTO=none

ONBOOT=yes

IPADDR=10.9.0.2

NETMASK=255.255.255.0


Update the file
ifcfg
-
eth
x

with the following (where
x

is 0 or 1; leave the
HWADDR

as
-
is):

DEVICE
=eth
x

BOOTPROTO=static

HWADDR=00:21:5A:EE:83:6C

ONBOOT=yes

MASTER=bond0

SLAVE=yes

ETHTOOL_OPTS="speed 1000 duplex full autoneg on"

Edit the file
/etc/sysconfig/network

as in the section
Single NIC configuration

Reboot the server afterwards.

5 Installing Sysedge client

For monitoring purposes, we make use of the Sysedge software. Before the system can be
monitored, a client must be installed on it.

The client software can be retrieved from
\
\
id362
\
Shares
\
ITDEPT
\
Tooling
\
CAInstallation
\
SysedgeInst43pl2
. The file itself is called
CASysedge_4_3_PL2_linux.tar
. Use an SFTP or FTP client to upload the archive with the software to
the server you are installing;

in this case we will upload the file to
/tmp
.

On the server, unpack the archive:

# cd /opt

# mkdir EMPSysedge && cd EMPSysedge

# mv /tmp/CASysedge_4_3_PL2_linux.tar ./

# tar xvf CASysedge_4_3_PL2_linux.tar

The archive is unpacked in the directory, after w
hich we can install the software with

# ./Install

The installer will ask some questions about the installation.
Give the following answers:



yes



root



no



yes



yes; MACHINE01



yes; <system location>

Example= NL.DO.GO00.SAP



yes; Unix Mgmt



yes



yes; wkap6392325



yes; wkap6392325sysedge



yes;
192.87.90.211
; wkap6392325
sysedge

Stop the sysedge service with

# /etc/init.d/sysedge stop

Edit the sysedge configuration file

to another snmp trap destination
:

# vi /etc/sysedge.cf

And add the line:

trap_community wkap6392325
sysedge

195.169.64.90

trap_community wkap6392325
sysedge 10.9.0.232


Save and exit the file with
:wq

and start the sysedge service:

# /etc/init.d/sysedge start

Send an email to the application managers for Sysedge to have them discover the newly installed
s
ystem.

6 Installing HP DataProtector client

For backup we make use of HP DataProtector, for which a client has to be installed as well.
To install
the client, do the following steps:

Mount the NFS share on which the installer is located and navigate to the

installation directory:

(Or from a local dvd image)

# mkdir /media/share

# mount
-
t nfs senldogo0043:/data1 /media/share

# cd
/media/share/DP611/hpux/LOCAL_INSTALL

Start the installation with:

# ./omnisetup.sh

Make sure that you ONLY install
the
disk age
nt
, answer
no

to all other questions!

After this, notify the backup operator to add the newly installed system to the daily backup routine.



7 Configure SNMP

Apart from monitoring with Sysedge, HP SIM is also used. Open the file
/etc/snmp/snmpd.conf

in vi

and add the following lines at the beginning of the file:

rwcommunity wkap6392325
sysedge

127.0.0.1

rocommunity wkap6392325

trapcommunity wkap6392325
sysedge

trapsink 10.9.0.232

trapsink 195.169.64.212

trapsink 195.169.64.90

syscontact Unix Mgmt

syslocation

NL.DO.GO00.SAP

Save and close the file. Next, edit the file
/etc/init.d/snmpd

and change the following line:

OPTIONS="
-
Lsd
-
Lf /dev/null
-
p /var/run/snmpd.pid
-
a"

to:

#OPTIONS="
-
Lsd
-
Lf /dev/null
-
p /var/run/snmpd.pid
-
a"

OPTIONS="
-
Lf /dev/null
-
p /var
/run/snmpd.pid
-
a"

Restart the snmp daemon with

# /etc/init.d/snmpd restart

and check in HP SIM whether the system has been discovered.