jdxyzlh 发表于 2018-11-13 07:52:56

Linux下查看nginx、mysql、php的安装路径和编译参数

  一:查看安装路径:
  
  1、nginx安装路径:
  ps-ef | grep nginx
  摁回车,将出现如下图片:
http://hi.csdn.net/attachment/201107/6/0_13099311747NbI.gif
  master process 后面的就是 nginx的目录。
  2、mysql安装路径:
  ps -ef|grep mysql 得出结果

[*]  root   17659   102011 ?      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
[*]  mysql    17719 1765902011 ?      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

页: [1]
查看完整版本: Linux下查看nginx、mysql、php的安装路径和编译参数