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

How to find the php installation directory in linux

藏色散人
Release: 2023-03-04 06:14:01
Original
3313 people have browsed it

In Linux, you can find the PHP installation directory by executing the "ind/-name php" command. The source code installation path is "/usr/local/lib" and the path of the PHP configuration file is "/usr/ local/lib/php.ini".

How to find the php installation directory in linux

Recommendation: "PHP Video Tutorial"

I wanted to find the installation directory of PHP today, and I found it online. The default directory (as shown below) was not found. I used the Linux command "find / -name php" to roughly find the range. It is recommended for Linux novices who encounter the same situation as me.

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 you use source code to install

/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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template