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