Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to ask what ssh command or any way I will know which disk partition is mysql and php is installed?

Thanks.

share|improve this question

3 Answers 3

Run the df command with the argument of whichever file is of interest to you.

share|improve this answer
    
Thanks Jeff. I don't know how to use df with specific file. But it lead me to df -la. this command gives this results /dev/sda3 49789976 9760960 37459020 21% / /dev/sda1 101086 12189 83678 13% /boot Am i right to say that mysql and php is in the sda3 partition? since it has the / directory. Correct me if 'im wrong –  Jan Mark Nov 19 '12 at 7:46
    
@JanMark df /path/to/file –  Jeff Ferland Nov 19 '12 at 7:58
    
Thanks Jeff. It perfectly answers my question. Its on sda3. Thanks for the help. –  Jan Mark Nov 19 '12 at 8:02
    
will you help me regarding extending a partition. It is a related question of mine. serverfault.com/questions/450014/extend-size-of-partition. Thanks. –  Jan Mark Nov 19 '12 at 8:03
# which mysql
/usr/local/bin/mysql
# which php
/usr/local/bin/php

List of all partitions can be obtained by mount with no parameters.

But I'm sure you've looking for configuration files. They can be found by:

# php -i 
. . . . . .
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => /usr/local/etc/php/extensions.ini
. . . . . .

and

#  mysql -e "select @@global.datadir, @@global.basedir;"
+------------------+------------------+
| @@global.datadir | @@global.basedir |
+------------------+------------------+
| /var/db/mysql/   | /usr/local/      |
+------------------+------------------+
share|improve this answer
    
Thanks Kondybas. My concern really was to determine which disk partition is to extend. I have this partitions /dev/sda1 99M 12M 82M 13% /boot /dev/sda3 48G 9.4G 36G 21% /. Which partitions does /usr/ reside? (My question maybe dumb. I'm new to this. Please help.) Thanks. –  Jan Mark Nov 19 '12 at 7:30
    
Your /usr is reside under / - on /dev/sda3. –  Kondybas Nov 19 '12 at 7:41
    
Thanks Kondybas. Now I know which partition to extend. Thanks for all the help. –  Jan Mark Nov 19 '12 at 7:48
    
will you help me regarding extending a partition. It is a related question of mine. serverfault.com/questions/450014/extend-size-of-partition. Thanks. –  Jan Mark Nov 19 '12 at 8:04

In Your case /usr seems to be on / When figuring out *NIX directories start from the left and work yourself to the right. http://en.wikipedia.org/wiki/Unix_directory_structure

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.