Install / Update / Clean the OS

E-mail Print PDF


Step 1:
First of all we need to import some RPM Keys:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*


Step 2: Now we will remove all software groups, to get Centos to a minimum
Step 2.1:
Run grouplist to see what software groups that are installed:

yum -C grouplist


Step 2.2:
Remove all groups that are installed EXCEPT "Yum Utilities"

yum -C groupremove "GroupName"


Step 3:
Lets disable unneeded services:

chkconfig --level 123456 haldaemon off
chkconfig --level 123456 lvm2-monitor off
chkconfig --level 123456 messagebus off
chkconfig --level 123456 netfs off
chkconfig --level 123456 atd off
chkconfig --level 123456 psacct off
chkconfig --level 123456 rdisc off
chkconfig --level 123456 ip6tables off
chkconfig --level 123456 smartd off
chkconfig --level 123456 pcscd off
chkconfig --level 123456 readahead off
chkconfig --level 123456 readahead_early off
chkconfig --level 123456 rawdevices off
chkconfig --level 123456 anacron off


Step 3.1: Use this command to check what services that are setup to run

chkconfig --list | grep :on


Step 3.2: You should have these services running:

anacron, crond, iptables, irqbalance, kudzu, mcstrans, network, readahead_early, restorecond, sshd, syslog, sysstat, yum-updatesd


Step 4: Lets upgrade Centos to the newest, and install some tools:

yum -y upgrade
yum -y install wget bzip2 unzip zip fileutils gcc gcc-c++ ncurses-devel pam-devel libxml2-devel libxslt-devel m4 flex byacc wget which
yum -y install pcre pcre-devel binutils autoconf automake libtool zlib lsof man man-pages mlocate quota rsync sysstat vixie-cron bzip2-devel


Step 5: Add RPMForge Repos for usage later.

(32Bit) rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
(64Bit) rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm


Step 6: Remove and disable IPv6:

nano -w /etc/modprobe.d/disableipv6.conf
Add line: alias net-pf-10 off
Add line: alias ipv6 off
Save


nano -w /etc/sysconfig/network
Change NETWORKING_IPV6=yes to NETWORKING_IPV6=no


Step 6: Install and syncing NTP time service:

yum -y install ntp
chkconfig --levels 235 ntpd on
ntpdate 0.pool.ntp.org
/etc/init.d/ntpd start


Step 7.1:
Changing server hostname:

nano -w /etc/sysconfig/network


Step 7.2:
Find HOSTNAME= and change it to etc srv01.maxisecure.com or something else of your choice:

HOSTNAME=srv01.maxisecure.com


Step 7.3: Run this command to make sure that newly created files dont get readable by everybody

umask 077


Step 7.4: Now a reboot:

shutdown -r now

Tags See All Tags Add New Tag...

Please Enter New Tags Separated By Comma's
  Or Close

PCRE  autoconf  automake  binutils  centos  clean  libtool  ntp  update  upgrade  yum  zlib 
Powered By Joomla Tags

Last Updated ( Wednesday, 20 August 2008 12:18 )