不少时候会登陆一台陌生的服务器;
当须要调整环境的时候;
那真是起步啥都没有;装备全靠打;
两眼一抹黑处处找配置项;
还好我这记的有一份笔记;php
能够先总结下;
大都是先用 which 获取目录;
而后再获取配置项位置;mysql
which mysql /usr/bin/mysql /usr/bin/mysql --help | grep -A1 'Default options'
which php /usr/local/apache2/php/bin/php 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.confnginx
ps -ef | grep 'nginx'
若是没有 那就根据上图中的nginx位置执行sql
/www/server/nginx/sbin/nginx -t
nginx和配置项的目录全有了;apache
ps -ef | grep 'php-fpm'
配置项文件路径一眼就看到了;bash