Linux Simple configuration

Source: Internet
Author: User


1. Judging Apache
To find the httpd path:

PS grep httpd

Results: /usr/local/apache/bin/httpd

grep "Server_config_file"

Result: The configuration file path loaded at compile time can be found httpd.conf
The-v parameter can see the parameters that are configured at compile time

2. Judging Nginx
First execute the command to find the Nginx path.

PS grep Nginx

Results:/usr/local/nginx/sbin/nginx

/usr/local/nginx/sbin/nginx-v

By default in the installation directory conf/nginx.conf
3. Judging MySQL
First execute the command to find the MySQL path

PS grep mysqld

If the mysqld path is
/usr/bin/mysql

Then execute the following command

grep 1 ' Default options ' or /usr/bin/mysql–print-defaults

4, determine the PHP load profile path
(1), can be viewed through PHP function phpinfo, write a file, and then use the URL to access, find "Loaded configuration file" corresponding to the value of the PHP loaded configuration files
(2), if it is a nginx+php configuration, you can also find the PHP execution path

PS grep PHP

For example, the path is/USR/LOCAL/NGINX/SBIN/PHP-FPM
Then execute the following command

grep "Loaded Configuration File"

You can see the PHP loaded configuration file
(3), if it is a apache+mod_php configuration, you can also view the loaded php.ini path in the Apache configuration file. such as Phpinidir "/usr/local/apache/conf/php.ini"

Of course, there is a simple way to search through find.
Such as

 Find/-name nginx.confFind /-name php.iniFind /-name My.cnf Find /-name httpd.conf

Linux Simple configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.