LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cent OS 5.8 server help (https://www.linuxquestions.org/questions/linux-newbie-8/cent-os-5-8-server-help-4175413237/)

Fatboyslim 06-25-2012 04:46 AM

Cent OS 5.8 server help
 
Hi Guys and Gals

Im a N00b , started learning linux about 6 months ago , have inherited 2 CentOS 5.8 servers , 1 Firewall and 1 Squid proxy running VSFTPD

I need to now confirm the health of the boxes , see what services are running, what they do and how to save any config files etc so that i can recover if the hardware dies

I need advise on where to start ,I am planning on deploying new hardware with fresh installs but i first need to understand the beast before i can migrate services etc,

breakdown (from what i know sofar)

server A CentOS 5.8 Final is our external facing Firewall running IPtables
server B Cent)S 5.8 Final is our Squid Proxy, VFTPD , internal Facing Firewall using IPTables

any guidance will be greatly appreciated
This is a golden Op for me to Learn hands on Linux Admin and hopefully run with the big dogs one day LOL

Kustom42 06-25-2012 12:17 PM

A can-of-worms, opening you are...

Start taking a look at your running services as well as what is chkconfig'ed to startup.

Code:

/sbin/service --status-all
/sbin/chkconfig --list

Take a look at your network configs and open ports:

Code:

/sbin/iptables -L
/sbin/ifconfig -a
cat /etc/sysconfig/network
cat /etc/sysconfig/network-scripts/ifcfg-*
/sbin/route -n
/bin/netstat -an | /bin/grep tcp | /bin/grep LISTEN

Take a look at users/groups/sudo'ers:

Code:

cat /etc/passwd /etc/group /etc/sudoers
Get some general system info, including storage:

Code:

/bin/uname -a
/bin/df -h
/bin/mount | column -t
cat /etc/hosts
/bin/cat /etc/resolv.conf
/bin/cat /boot/grub/grub.conf
/bin/cat /etc/fstab

Some other things to catalogue would be all running processes and their command line arguements:

Code:

ps auxww
All installed packages and doing a file dump to see config files:

Code:

for rpm in $(rpm -qa); do echo -e "\033[1m $rpm \033[0m" >> /tmp/rpmlist.txt && rpm -q -c $rpm >> /tmp/rpmlist.txt; done
#the numbers and jargon after the echo -e makes the text appear bold to highlight the package name in your output file.

You will want to put most of these in a bash script and redirect them to a file as the output will be alot of rubbish that you need to dig through.

Let us know if you have any questions.

Kustom42 06-25-2012 12:21 PM

MOST IMPORTANT DONT DECOM THE EXISTING BOXES UNTIL YOU HAVE GIVEN IT ATLEAST TWO WEEKS AFTER CUT-OVER TO YOUR NEW ONES!

This is called the "scream test", make sure nobody screams for two weeks that somethings broke. Also something to mention here is that you should take a look at setting up a puppet/kickstart box for future server commissions.

In your spare time try standing up a sandbox VM to play with and follow this tutorial:

http://docs.puppetlabs.com/learning/

Puppet/Similar config tools are used by 99% of companies to push configurations out to servers once they are provisioned. This ensures that any new server is correctly configured and any existing ones will be put back into proper configuration if something changes.

---------- Post added 06-25-12 at 10:22 AM ----------

And CentOS kickstart:

http://www.centos.org/docs/5/html/5....t2-howuse.html

chrism01 06-25-2012 07:46 PM

Here's the 5.x Admin guide http://www.linuxtopia.org/online_boo...ion/index.html (as you may know, Centos is a free rebuild of RHEL)

Fatboyslim 07-02-2012 06:13 AM

@ Kustom42

thanks bud that is some awesome stuff right there , will be going through everything with a fine tooth comb before i decom anything


@ Chris

Thanks for the guide man will be using it extensively i suspect

Sorry for the late reply was out of town , but i will definately go do my home work before i make any further posts

many thanks

chrism01 07-02-2012 06:42 PM

... and of course backup, backup, backup ...
There are various (lots of) backup options available, but for a complete system backup look eg at Clonezilla http://clonezilla.org/ (requires system shut-down I believe) and Mondo http://www.mondorescue.org/ which doesn't, although it can't backup an open RDBMS; you basically need to quiesce the system as much as possible.


All times are GMT -5. The time now is 09:13 PM.