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

其他的各类服务应用同理。

相关推荐
-
第18问:MySQL CPU 高了,怎么办?2025-02-24 10:27:18
-
mysql索引类型 normal, unique, full text
mysql索引类型 normal, unique, full text2025-02-24 10:05:05 -
uwsgi+django+nginx 搭建部分总结2025-02-24 10:03:33
-
使用Docker配置Nginx环境部署Nextcloud2025-02-24 10:02:03
-
Nginx安装和怎么使用2025-02-24 10:00:45