Nginx+Tomcat负载均衡群集(实战!!!)
实验拓扑图 实验环境部署 服务器角色 IP地址 操作系统 Nginx服务器 192.168.142.131 centos 7 tomcat 01服务器 192.168.142.134 centos 7 tomcat 02服务器 192.168.142.130 centos 7 实验步骤 第一步:配置Nginx服务器 #安装环境 [root@nginx ~]#yum install gcc gcc-c++ pcre-devel zlib-devel #添加Nginx管理用户 [root@nginx ~]# useradd -M -s /sbin/nologin nginx #远程共享源码包 [root@nginx ~]# smbclient -L //192.168.142.1 [root@nginx ~]# mount.cifs //192.168.142.1/tomcat /mnt #解压源码包 [root@nginx ~]# cd /mnt [root@nginx ~]# tar zxvf nginx-1.12.0.tar.gz -C /opt [root@nginx mnt]# cd /opt/nginx-1.12.0/ #进行configure配置 [root@nginx nginx-1.12.0]# ./configure --prefix=/usr/local