1. For production servers, you need to install CentOS4.4 minimal.
- Create partitions as follow:
/boot – 100
swap – 2x as the memory, if the memory is 2GB, then your swap should be 4096MB
/ – assign the rest for root
/data – if needs be
- Choose GRUB as boot loader.
- Disable SELINUX
- Enable httpd, sshd
- Choose minimal
2. Get connected to your network. Modify your network as needed. Network configuration scripts are found in
/etc/sysconfig/network-scripts/
You should see at least the ff, depending on how many ethernet interfaces you have:
ifcfg-eth0
ifcfg-lo
Edit ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:16:96:10:F3:2B
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.1.105
GATEWAY=192.168.1.1
3. Edit your hostname:
#vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rupert-linux
4. Edit your hosts:
# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 rupert-linux localhost.localdomain localhost
192.168.1.10 appserver
192.168.1.11 dbserver1
192.168.1.12 svnserver
Providing ip addreses on your hosts can make network access faster, depending on the routes.
5. Edit your path to reflect the ff:
#vi /etc/skel/.bash_profile
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin
export HTDOCS=/usr/local/apache2/htdocs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib
cp -Rf /etc/skel/.bash_profile /home/rupert/
cp -Rf /etc/skel/.bash_profile /home/tan/
cp -Rf /etc/skel/.bash_profile /root/
6. Copy the centos packages into your harddisk, so you don’t need the CD’s later on. Reboot.
7. Install the ff rpms:
#install gcc
echo "installing gcc"
rpm -ivh cpp-3.4.6-3.i386.rpm
rpm -ivh glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
rpm -ivh glibc-headers-2.3.4-2.25.i386.rpm
rpm -ivh glibc-devel-2.3.4-2.25.i386.rpm
rpm -ivh gcc-3.4.6-3.i386.rpm
echo “installing gcc++”
rpm -ivh compat-libstdc++-33-3.2.3-47.3
rpm -ivh compat-libstdc++-296-2.96-132.7.2
rpm -ivh libstdc++-3.4.6-3
rpm -ivh gcc-c++-3.4.6-3
#installing other utilies
rpm -ivh apr-0.9.4-24.5.c4.2.i386.rpm
rpm -ivh apr-util-0.9.4-21.i386.rpm
rpm -ivh neon-0.24.7-4.i386.rpm
rpm -ivh perl-URI-1.30-4.noarch.rpm
rpm -ivh umb-scheme-3.2-36.EL4.i386.rpm
rpm -ivh guile-1.6.4-14.i386.rpm
rpm -ivh swig-1.3.21-6.i386.rpm
rpm -ivh subversion-1.1.4-2.ent.i386.rpm
rpm -ivh perl-DBI-1.40-8.i386.rpm
rpm -ivh nmap-3.70-1.i386.rpm
rpm -ivh vim-common-6.3.046-0.40E.7.i386.rpm
rpm -ivh vim-enhanced-6.3.046-0.40E.7.i386.rpm
rpm -ivh binutils-2.15.92.0.2-21.i386.rpm
8. Disable unneeded services.
chkconfig bluetooth off
chkconfig cups off
chkconfig irda off
chkconfig isdn off
chkconfig netdump off
chkconfig netfs off
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig openibd off
chkconfig pand off
chkconfig pcmcia off
chkconfig portmap off
chkconfig rhnsd off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig sendmail off
chkconfig syslog off
chkconfig xfs off
chkconfig xinetd off
chkconfig ypbind off
chkconfig yum off