LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2012, 04:46 AM   #1
Fatboyslim
LQ Newbie
 
Registered: Apr 2012
Posts: 7

Rep: Reputation: Disabled
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

Last edited by Fatboyslim; 06-25-2012 at 04:48 AM.
 
Old 06-25-2012, 12:17 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
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.
 
2 members found this post helpful.
Old 06-25-2012, 12:21 PM   #3
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
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
 
1 members found this post helpful.
Old 06-25-2012, 07:46 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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)
 
1 members found this post helpful.
Old 07-02-2012, 06:13 AM   #5
Fatboyslim
LQ Newbie
 
Registered: Apr 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
@ 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
 
Old 07-02-2012, 06:42 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
... 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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cent OS server restarts automatically, Not sure why. linuxlover.chaitanya Linux - Newbie 5 05-09-2012 08:26 PM
[SOLVED] Howto install an Ubuntu server as a virtual server on a Cent OS 5.6 host. ThomasRonshof Linux - Virtualization and Cloud 20 06-10-2011 05:51 AM
Proxy Server Installation On cent os 5.3 arunkumarblr2010 Linux - Server 3 02-13-2010 03:13 AM
Need help from experts to secure my server cent os 5.3 jiltin Linux - Security 4 10-01-2009 11:34 AM
Mail Server setup on EC2 on Cent OS 5.2 kentor Linux - Software 0 07-02-2009 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration