当前位置:网站首页>Jingtao project day09

Jingtao project day09

2020-11-07 20:56:09 wusheng

1. Nginx Attribute specification

image

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 sends a fault , 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
image

2. Check the gateway address
image

3. Set up IP lease
image

2.2 Remote server connection

1. Remote Links
image

enter one user name :/ Enter after the password
image

3, Set software security password english + Numbers 8 Who can Then press enter to log in

3.Linux Environment building

3.1 install JDK

3.1.1 Upload JDK file

image

3.1.2 decompression JDK

image

3.1.3 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

image

3.1.5 To configure JDK Environment configuration

File directory : /etc/profile
Edit the file : vim /etc/profile
image

Let the environment variables take effect :
image

版权声明
本文为[wusheng]所创,转载请带上原文链接,感谢