1、Nginx Attribute specification
1.1 down attribute
explain : If the server goes down , Or the server doesn't want to continue serving users , You can use shutdown Attribute to identify
nginx Access rules : If nginx The server being accessed is not responding properly , Is waiting for Overtime after , Access to the new server
# To configure tomcat Server cluster 1. Default Polling strategy 2. Weight strategy 3.ip_hash Strategy
upstream jtWindows {
#ip_hash;
server 127.0.0.1:8081 down;
server 127.0.0.1:8082;
server 127.0.0.1:8083;
}
1.2 backup attribute
explain :backup Stand by machine . Under normal circumstances , The server will not serve users . But when the server goes down , Or when the server is busy , To access the server
# To configure tomcat Server cluster 1. Default Polling strategy 2. Weight strategy 3.ip_hash Strategy
upstream jtWindows {
#ip_hash;
server 127.0.0.1:8081 down;
server 127.0.0.1:8082 down;
server 127.0.0.1:8083 backup;
}
1.3 tomcat Server High Availability Mechanism
High availability : When the server fails , Through some mechanism, we can Automatic implementation Fault migration , So that users will not be affected by any
# To configure tomcat Server cluster 1. Default Polling strategy 2. Weight strategy 3.ip_hash Strategy
upstream jtWindows {
#ip_hash; down Identify downtime backup Spare machine
#max_fails=1 The maximum number of failures
#fail_timeout=60s If there's no access , It's in 60 Seconds , No more access to the malfunctioning machine
server 127.0.0.1:8081 max_fails=1 fail_timeout=60s;
server 127.0.0.1:8082 max_fails=1 fail_timeout=60s;
server 127.0.0.1:8083 max_fails=1 fail_timeout=60s;
}
2、 About virtual machines
2.1 Modify virtual machine IP Address
1. modify IP Section
2. Check the gateway address
3. Set up IP lease
Check IP Address
command : ip addr
without IP The display performs the following commands
service NetworkManager stop
chkconfig NetworkManager off Permanent ban Manager network card
service network restart restart network network card
2.2 Remote server connection
3、Linux Environment building
3.1 install JDK
3.1.1 Upload JDK file
3.1.2 decompression JDK
3.1.3 Mobile installation package
Mobile installation package
[root@localhost src]# mv jdk-8u51-linux-x64.tar.gz software/
3.1.4 Modify file name
[root@localhost src]# mv jdk1.8.0_51 jdk1.8
3.1.5 To configure JDK environment variable
File directory : /etc/profile
Edit the file : vim /etc/profile
Let the environment variables take effect source /etc/profile