CentOS LAMP日志查看方法如下:
journalctljournalctl -bjournalctl -ktail -f /var/log/httpd/access_log。less /var/log/mysqld.log。grep "404" /var/log/httpd/access_log。/var/log/messages/var/log/httpd/access_log/var/log/httpd/error_log/var/log/mysqld.log或/var/log/mysql/error.log/var/log/mysql/slow-query.log(需启用)/var/log/php-fpm/error.log/var/log/php_errors.log或/var/log/httpd/error_log注意:部分命令需sudo权限,日志路径可能因配置不同需调整,可通过php --ini、cat /etc/httpd/conf/httpd.conf等命令确认具体路径。