this is obsolete doc -- see http://doc.nethence.com/ instead

Setting up redhat RHEL 3,4,5,6,7 

 

http://pbraun.nethence.com/unix/sysutils_linux/redhat.html 

http://pbraun.nethence.com/unix/sysutils_linux/redhat-networking.html 

http://pbraun.nethence.com/unix/sysutils_linux/redhat_rhel6.html 

http://pbraun.nethence.com/unix/sysutils_linux/redhat_rhel7.html 

http://pbraun.nethence.com/unix/sysutils_linux/systemd.html 

 

Post-installation 

Basically: 

- network setup & remote access 

- deliver ssh public keys in place 

- yum conf against local repository and install, 

  yum groupinstall core 

  yum groupinstall base 

  yum install curl elinks ksh lftp nfs-utils ntp mc screen wget 

& screen config 

also get latest [EPEL](https://fedoraproject.org/wiki/EPEL) 

- open-vm-tools if it's a VM 

- disable firewall 

- selinux permissive 

- lvm mount points... 

- enable ntp & hwclock --systohc 

 

Network setup 

NetworkManager style with either RHEL6 or 7, e.g., 

TYPE=Ethernet
BOOTPROTO=static
NAME=em1
DEVICE=em1
ONBOOT=yes
IPADDR=10.0.X.X
NETMASK=255.255.X.X
GATEWAY=X.X.X.X
DNS1="X.X.X.X"
DNS2="X.X.X.X"
DNS3="X.X.X.X"
DOMAIN="domain1 domain2 domain3"

 

Updating the system 

You can always use yum to get the latest minor version and patches, 

  yum update, 

and remove older kernel & headers (keep the current one and the new one of course), 

  uname -r 

  rpm -qa | grep ^kernel 

  rpm -e 

 

You can even enable auto-updates, 

on RHEL you need to subscribe to the optional channel first, 

yum repolist all
subscription-manager repos --list
subscription-manager repos --enable=rhel-7-server-optional-rpms
#subscription-manager repos --disable=rhel-7-server-optional-rpms
yum -y install yum-cron
vi /etc/yum/yum-cron.conf
vi /etc/yum/yum-cron-hourly.conf
systemctl start yum-cron
systemctl enable yum-cron

refs. 

How to install 'yum-cron' package from RHN ?: https://access.redhat.com/solutions/437693 

How to enable/disable a repository using Red Hat Subscription Manager?: https://access.redhat.com/solutions/265523 

Is yum-cron auto-update mechanism safe for production systems?: https://access.redhat.com/discussions/1238193 

http://www.certdepot.net/rhel7-configure-automatic-updates/ 

#eventually run it once manually (otherwise enabled by default /etc/cron.daily/0yum-daily.cron), 

#/usr/sbin/yum-cron

on CentOS, 

yum -y install yum-cron
cd /etc/sysconfig/
cp yum-cron yum-cron.dist
vi yum-cron

ref. http://linuxaria.com/pills/enabling-automatic-updates-in-centos-6-and-red-hat-6 

 

You may then check the very exact version of your system doing, 

cat /etc/redhat-release
rpm -qa | grep release

Ref. http://stackoverflow.com/questions/4140219/how-to-confirm-redhat-enterprise-linux-version 

 

Until RHEL6 

Ctrl-alt-suppr (sysV) 

Prevent ctrl-alt-suppr from restarting the box, 

  vi /etc/inittab 

comment that line, 

  #ca::ctrlaltdel:/sbin/shutdown -t3 -r now 

 

To change language's locale, 

  vi /etc/sysconfig/i18n 

 

To get everything through serial console, configure GRUB and inittab. 

Ref. http://www.faqs.org/docs/pocket_linux/x1252.html 

 

RHEL5 specific 

LVM2 fix 

On RHEL5, to avoid a little warning at boot time about CDRom not having volume labels, 

cd /etc/lvm/
cp lvm.conf lvm.conf.dist
sed '
/^[[:space:]]*$/d;
/^[[:space:]]*#/d;
' lvm.conf.dist > lvm.conf
vi lvm.conf

change, 

    filter = [ "r|/dev/cdrom|" ]

 

RHEL5 installation numbers 

They're supposed to simplify deployments in environments with different subscriptions. However, it's just a pain for non supported Redhats. Here are a few working install numbers as a workaround, 

Client, 

  0000000e0017fc01 

Server, 

  000000e90007fc00 

Server with Cluster, 

  00000065000bfc00 

Server with ClusterStorage, 

  000000ab000ffc00 

Server with HPC, 

  000000e30013fc00 

Server with Directory, 

  000000890017fc00 

Server with SMB, 

  00000052001bfc00 

Refs. 

http://linuxczar.net/projects/rhel-installation-numbers/ 

http://linuxczar.net/blog/2007/03/18/installation-number-followup/ 

http://linuxczar.net/blog/2007/03/17/red-hats-installation-numbers/ 

#broken http://linuxczar.net/moin/RHEL_Instaltion_Numbers 

#broken http://www.redhat.com/support/resources/faqs/installation_numbers/ 

 

RHEL4 specific 

RHN 

If using the real Redhat (not CentOS), register your system to RHN. For RHEL4, 

  rhn_register 

 

Huge memory 

RHEL4 had the hugemem kernel but it wasn't recommended to use it even though you had 64Go+ of RAM. Today RHEL5 is fine with default kernel, althouth HP says it runs with max 64Go in its OS compatibility table.