LNMP架构
- 用户 --> php文件
- 请求到达nginx,nginx通过127.0.0.1:9000去调用php-fpm
- php-fpm --> 运行php程序
- php --> 操作mysql
LNMP的环境验收
cat >/usr/local/nginx/html/test_mysql.php <<EOF
<?php
\$link=mysql_connect("127.0.0.1","root","zabbixpwd");
if(!\$link){
echo "mysql_connect fail";
}else{
echo "mysql_connect success";
}
?>
EOF