linux查看nginx、apache、php、php-fpm、mysql及配置项所在目录

很多时候会登录一台陌生的服务器;
当需要调整环境的时候;
那真是起步啥都没有;装备全靠打;
两眼一抹黑到处找配置项;
还好我这记的有一份笔记;

可以先总结下;
大都是先用 which 获取目录;
然后再获取配置项位置;

which  mysql
/usr/bin/mysql
/usr/bin/mysql --help | grep -A1 'Default options'

which php
/usr/local/apache2/php/bin/php
/usr/local/apache2/php/bin/php -i | grep "Loaded Configuration File"

ps -ef | grep 'http'
/usr/local/apache2/bin/httpd -V | grep 'SERVER_CONFIG_FILE'

拼起来就是: /usr/local/apache2/conf/httpd.conf

ps -ef | grep 'nginx'

如果没有 那就根据上图中的nginx位置执行

/www/server/nginx/sbin/nginx -t

nginx和配置项的目录全有了;

ps -ef | grep 'php-fpm'

配置项文件路径一眼就看到了;

转载地址:白俊遥博客

猜你喜欢

转载自blog.csdn.net/qq_38375394/article/details/81181558