下载
https://tomcat.apache.org/
解压
解压 tar –zxvf apache-tomcat-8.5.24.tar.gz 重命名 mv apache-tomcat-8.5.24 tomcat8
启动
./starup.sh #cd到tomcat8/bin/
设置nginx
location ^~ /java { proxy_pass http://127.0.0.1:8080/; #代理到项目需要加/ proxy_redirect default; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }