-
Purchase Alibaba Cloud server ECS, choose CentOS 7.6 operating system
-
Schematic diagram of external users accessing instances in cloud servers
- Reset the password of the instance
- Set security group rules
-
Create security groups and security group rules
-
Add an instance to the security group
- Use XShell and XFTP to connect to the remote instance
- Install JDK, MySQL, Tomcat, Nginx to the instance
Super detailed reference steps: Linux configuration JavaEE environment
- Package the project
-
Pass
http://[云服务器实例的ip地址]:8080/crud/
, you can access the project from any location -
You can also upload the war directly to the cloud server and analyze it in Tomcat of the cloud server
-
Use Nginx as a proxy server to access Tomcat projects
(1) Proxy configuration in Nginx configuration file,vim /usr/local/nginx/conf/nginx.conf
(2) Hot deployment of Nginx server,/usr/local/nginx/sbin/nginx -s reload
(3) Pass http://[云服务器实例的ip地址]/crud
, you can access the project from any location