Home  >  Article  >  Backend Development  >  How to find the php installation directory in linux

How to find the php installation directory in linux

藏色散人
藏色散人Original
2020-08-29 09:01:134432browse

In Linux, you can use the command "find / -name php" to find the PHP installation directory. The default directory for the PHP configuration file is "/usr/local/lib/php.ini".

How to find the php installation directory in linux

Recommended: "PHP Video Tutorial"

Find the installation path for php and other installation paths under Linux

Today I wanted to find the installation directory of PHP. I looked for the default directory mentioned on the Internet (as follows) and found that there was none. I used the Linux command "find / -name php" to roughly find the range. I recommend it if you meet me. Used by Linux novices in the same situation. The following is the default path:

apache:

1. Use RPM package to install

Installation path: /etc/httpd

apache configuration file:/etc /httpd/conf/httpd.conf

Apache module path:/usr/sbin/apachectl

web directory:/var/www/html

2. If using the source Code installation

/usr/local/apache2

php:

1.RPM package installation

Installation path:/etc/

php configuration file:/etc/php.ini

2. Source code installation

Installation path:/usr/local/lib

php configuration file: /usr /local/lib/php.ini

or /usr/local/php/etc/php.ini

mysql:

1.RPM package installation

Installation path:/usr/share/mysql

mysqldump file location:/usr/bin/mysqldump

mysqli configuration file: /etc/my.cnf or /usr/share/mysql /my.cnf

mysql data directory:/var/lib/mysql

Source code installation:/usr/local/mysql

The above is the detailed content of How to find the php installation directory in linux. 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