Linux下查看nginx、mysql、php的安裝路徑和編譯參數


一:查看安裝路徑:

 

 1、nginx安裝路徑:

ps  -ef | grep nginx  

摁回車,將出現如下圖片:

master process 后面的就是 nginx的目錄。

 

2、mysql安裝路徑: 

 

ps -ef|grep mysql 得出結果

  1. root     17659     1  0  2011 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid   

  2. mysql    17719 17659  0  2011 ?        03:14:57 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock  

usr/bin/mysql 是指:mysql的運行路徑 
var/lib/mysql 是指:mysql數據庫文件的存放路徑 
usr/lib/mysql 是指:mysql的安裝路徑

 

3、php安裝路徑:

 

#whereis php

#which php

#php -v   查看版本號

差異自己去體會



 

二:查看編譯參數:

1、nginx編譯參數: 

your_nginx_dir/sbin/nginx -v 

2、apache編譯參數: 
cat your_apache_dir/build/config.nice 

3、php編譯參數: 
your_php_dir/bin/php -i |grep configure 

4、mysql編譯參數: 
cat your_mysql_dir/bin/mysqlbug |grep configure 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM