Home  >  Article  >  Backend Development  >  Linux View the directory where nginx, apache, php, php-fpm, mysql and configuration items are located

Linux View the directory where nginx, apache, php, php-fpm, mysql and configuration items are located

不言
不言Original
2018-04-13 16:33:172401browse

The content of this article is to view the directory where nginx, apache, php, php-fpm, mysql and configuration items are located in linux. Now I share it with you. Friends in need can refer to it

Many times it will Log in to an unfamiliar server;
When the environment needs to be adjusted;
There is really nothing to start with; all the equipment depends on it;
I am blind and looking for configuration items everywhere;
Fortunately, I There is a note for this;

You can summarize it first;
Most of the time, you use which to get the directory first;
and then get the configuration item location;

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


Bash

Copy

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


Bash

Copy

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


##Bash

Copy

The spelling is: /usr/local/apache2/conf/httpd.conf



##

ps -ef | grep 'nginx'


Bash

Copy

If not, execute it according to the nginx location in the picture above

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


Bash

Copy

nginx and configuration item directories are all there;

ps -ef | grep 'php-fpm'


Bash

Copy

The configuration file path can be seen at a glance;

The above is the detailed content of Linux View the directory where nginx, apache, php, php-fpm, mysql and configuration items are located. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn