Solved

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

Posted on 2011-02-22
8
597 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
ID: 34949604
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
ID: 34949615
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
ID: 34950006
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Expert Comment

by:tsteens
ID: 34950054
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
 
LVL 14

Accepted Solution

by:
small_student earned 334 total points
ID: 34950083
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
ID: 34953644
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
ID: 35127202
something happened when I'm trying to assign points and it's now in close mode. ???
0
 

Author Closing Comment

by:Shakthi777
ID: 35127209
tnx !
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

825 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