Home
|
UNIX
|
Practical
How to configure Redhat systems
Where to get
For a free of charge but as stable version of Redhat, get CentOS
for example,
Network configuration
In brief,
system-network-config-tui
vi /etc/sysconfig/network
vi /etc/hosts
You may force network interfaces' settings,
vi /etc/sysconfig/network-scripts/ifcfg-eth*
# :wn inside vi then, when editing several files
Note you may comment the HWADDR line to replace the network cards easily
Check network interfaces negociation & link,
ethtool eth0 | grep Link
To force network interface's bandwidth,
ethtool -s eth0 speed 1000 duplex full autoneg off
And apply it permanently,
vi /etc/sysconfig/network-scripts/ifcfg-eth0
for example,
ETHTOOL_OPTS="speed 1000 duplex full autoneg off"
As for static routes,
vi /etc/sysconfig/static-routes
or
vi /etc/sysconfig/network-scripts/route-ethX
e.g.,
GATEWAY0=10.10.0.1
NETMASK0=255.0.0.0
ADDRESS0=10.0.0.0
GATEWAY1=10.2.0.1
NETMASK1=255.255.0.0
ADDRESS1=192.168.0.0
Apply changes,
service network restart
Also check
system-config-securitylevel-tui
chkconfig --list | grep tables
RPMs and YUM
To easyly deal with dependencies on an isolated network, use your own (nfs,ftp,http) repository or simply your installation DVD (no updates),
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
And configure yum,
cd /etc
mv yum.repos.d yum.repos.d.dist
mkdir yum.repos.d
cat > yum.repos.d/centos.repo << EOF
[centos51]
name=centos51
baseurl=file:///mnt/cdrom
gpgcheck=1
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-CentOS-5
EOF
yum clean all
Then install some package,
yum install screen
Note you can install whole groups of packages in example,
yum groupinstall base-x
To check for available yum groups,
cd /mnt/cdrom/repodata && grep '<id>' comps.xml
To search for available packages,
yum search XXX | grep base
Note "base" being the repo name. Check /etc/yum.d/*
Create a remote repository
To create a repository from the installation CD by HTTP,
rmdir /var/www/html
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
ln -s /mnt/cdrom /var/www/html
service httpd start
or by NFS,
vi /etc/exports
in example,
/mnt/cdrom *(ro,no_root_squash)
then,
service nfs start
To create an own repository,
yum install createrepo
createrepo <repodir>
Base packages
RPM repositories
Log rotation
Daily mail reports
Miscelaneous
Change users defaults,
mv /etc/skel /etc/skel.dist
mkdir /etc/skel
vi /etc/default/useradd
To change language's locale,
vi /etc/sysconfig/i18n
Prevent ctrl-alt-suppr from restarting the box,
vi /etc/inittab
Possibly add those packages,
screen
rpm-build (rpm-devel depedency)
gallery2-imagemagick
Major Redhat release upgrade
From e.g. RHEL4.4 to RHEL5,
Configure the new GPG key,
rpm --import RPM-GPG-KEY-CentOS-5
Install the release RPMs,
rpm -Uvh centos-release-5-0.0.el5.centos.2.i386.rpm centos-release-notes-5.0.0-2.i386.rpm
Install the new kernel,
rpm -Uvh --nodeps SysVinit-2.86-14.i386.rpm initscripts-8.45.14.EL-1.el5.centos.1.i386.rpm kernel-2.6.18-8.el5.i686.rpm
Configure /etc/yum.repos.d/* and upgrade,
yum clean all
yum upgrade
Minor Redhat release upgrade
From e.g. 5.1 to 5.2 just configure /etc/yum.repos.d/* and upgrade,
yum cleanall
yum upgrade
Note if you have SAN and are using third-parity tool which changed initrd, you might want to avoid touching the kernel,
yum --exclude=kernel update
Kickstart automated installation
From the the install CD, append this as kernel parameter :
or try just,
ks
RHEL 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
HP Hardware tweeks
DL140G3 : disable 8042 Emulation Support
RHEL4 on Proliants,
(on AMD64/EM64T) BIOS > Advanced options > Enable Linux x86_64 HPET
(x86 and AMD64) With the Redhat install CD and afterwards inside grub.conf, use the "pci=nommconf" kernel parameter
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.
Critics
- how to fix it afterwards if a fake/temporary install number has been given during installation ?
- the useless "complete log install.log" warning during install
- initrd shouldn't exist. At least the disk drivers should be included into the bare kernel.
References