cd /usr/local/nginx/html/tp5shop/public/
vim index.php
echo '首页显示内容';
负载均衡配置文件
upstream shop {
#web1 server01
server 192.168.179.15;
#web2 server02
server 192.168.90.15;
}
修改数据库的连接
cd /usr/local/nginx/html/tp5shop/application
vim database.php
LMNP启动命令
systemctl start haproxy.service 启动集群
systemctl start keepaalived 启动高可用
setenforce 0 关闭防火墙
service nginx.service start; 启动nginx服务
systemctl start nginx.service
service mysqld restart 开启mysql
service php-fpm start 开启php