Home >Operation and Maintenance >Linux Operation and Maintenance >Linux checks whether the php environment is installed
Check method:
1. First, you can use find / -name php.ini to find out whether the system has a php configuration file
2 , Use netstat -ntpl to check whether port 9000 is running
3. If port 9000 exists, you can use lsof -i:9000 to check the file location
4. In addition, if the system has installed php , you can also use php -v to check the version number, provided that the environment variable is set
apache:
If you use an RPM package to install, the installation path should be in /etc/
apache configuration file in httpd directory:/etc/httpd/conf/httpd.conf
Apache module path:/usr/sbin/apachectl
web directory:/var /www/html
If you use source code installation, it is usually installed in the /usr/local/apache2 directory by default
(Recommended tutorial: linux tutorial)
php:
If you use RPM package to install, the installation path should be in the /etc/ directory
php configuration file:/etc/php.ini
If you use source code installation, it is generally installed in the /usr/local/lib directory by default
php configuration file: /usr/local/lib/php.ini
or /usr/local/php/etc/php.ini
mysql:
If you use the RPM package to install, the installation path should be in the /usr/share/mysql directory
mysqldump file location:/usr/bin/mysqldump
mysqli configuration file:
/etc/my.cnf or /usr/share/mysql/my.cnf
The mysql data directory is in the /var/lib/mysql directory
If you use source code installation, it is generally installed in the /usr/local/mysql directory by default
Related video tutorials Recommended: linux video tutorial
The above is the detailed content of Linux checks whether the php environment is installed. For more information, please follow other related articles on the PHP Chinese website!