Solved

Tracing down all the service info on a LINUX system ???

Posted on 2011-02-22
8
595 Views
Last Modified: 2012-06-21
Hello Experts,

I got this production server to manage and I'm planing to deploy a new identical server and discontinue with the existing one.

But I'm confused to understand and trace current service versions and all inside this BOX. This is highly customized server. Can you help me with commands to identify below services versions and further more details ?

Apache
PHP
MySQL
Ruby on Rails (Rakefile.rb file are running)
etc..

Thanks a lot for time !
 
##############Login Banner#############################
ARNING! The remote SSH server rejected X11 forwarding request.
Last login: Thu Jan 27 10:07:58 2011 from 1xx.x.6.18
Linux 16438-39591 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
#########################################################

Open in new window

0
Comment
Question by:Shakthi777
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Expert Comment

by:tsteens
Comment Utility
Apache: httpd -V
PHP: php --version
MySQL: mysql --version

I'm not sure about Ruby, but the man pages will probably help you. Usually there are either a -V or --version switch to tell you versions.

There might be a lot of dependencies as well. You could use ldd to somehow track those, but that is no guarantee that you will catch them all. Many of the popular Linux distros uses package managers to handle dependencies. What kind of system are you? What kind of information to you need, if any, apart from what you get from my suggestions above?
0
 
LVL 14

Assisted Solution

by:small_student
small_student earned 334 total points
Comment Utility
Is this RHEL/CentOS/Fedora or Ubuntu/Debian or something else

From your post I  can see its debian

To find disk size and paritions

fdisk -l

and

df -h

To find Memory info

free

For Versions

php -v  (This  will give you php version)
mysql -V (This is an upper case V and will give you mysql version)
apache2 -v (This will give you apache version)

Dont forget to check kernel and architecture

uname -a

Record all this information. Good Luck
0
 

Author Comment

by:Shakthi777
Comment Utility
thanks  alot !

user1@16438-39591:~$ apache2 -v
-sh: apache2: command not found

when we deploying a identical second server, what are the other information we need ? except application data and the DBs ?
0
 

Expert Comment

by:tsteens
Comment Utility
If you do not have apache2 available. Use httpd -V as I said earlier. Be sure to use capital V. What kind of system are you on?
Deploying an identical server could be very hard because that would include making sure everything is in the exact same version. However from what you hav given so far this seems to be a web server. As long as you get the versions for php, mysql, apache and any other package you use (frameworks, ruby) right you shouldn't have any problems if you use a package manager such as yum or aptitude. Make sure to copy all configuration files though. They should be in your /etc directory.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 14

Accepted Solution

by:
small_student earned 334 total points
Comment Utility
For apache try

httpd -v

I would check for all system packages that are installed. Under debian you can check this info from dpkg command. Sorry but I am not very experienced with dpkg. But I know you can do something called dselect and you can get a full list of everytihng installed and export this list to the new server and have  them all installed from the debian repos by using apt-get.

I would check

1- Kernel and Arch
2- Disk size and partitioning
3- Memory and CPU info
4- Packages installed and their versions
5- User accounts
6- Data size
7- FIrewall rules if any apply
8- Ask the last system admin that was working on this server for any specific info or unusual things he had working that might not appear from simple tests on the server
9- Check what scripts are running if any (You have to check logs, search the system or ask as they dont have a specific place)
10- Check the cron system for any system crons.
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 166 total points
Comment Utility
for debian, you can also get a listing of what all packages are installed on the system with

dpkg -l

you can pipe it into a file for reference for when you set up the new system.
0
 

Author Comment

by:Shakthi777
Comment Utility
something happened when I'm trying to assign points and it's now in close mode. ???
0
 

Author Closing Comment

by:Shakthi777
Comment Utility
tnx !
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Ruby, Call or invoke a API DLL library is easily via Win32API class, win32-api gem or other gems. For general DLL API call, there are quite a few references, some good tips list below: http://www.rubytips.org/2008/05/13/accessing-windows-api-fro…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now