Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2011-02-22
8
Medium Priority
?
621 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:Monis Monther
Monis Monther earned 1336 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
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 

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:
Monis Monther earned 1336 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 664 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

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
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 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.:
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

580 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