1. leasing server
Given the small size to deploy the site (even without a database), I chose minimum configuration vultr of (1024MB RAM, 25GB SSD, 1000GB Bandwith), 5 dollars a month, choose a location in Silicon Valley (incidentally, they used scientific Internet flattered) .
After successful purchase order on the server even with SSH: SSH root @ ip
2. Install jdk
There have been no java installed before the first check the system before installation: java -version . If the command does not exist, then the server is currently no version of java, you can directly install a new one.
Installation with yum: yum the install Java-1.8.0--Y * OpenJDK
ps: I tried to use wget to download the compressed package on CentOS before, and then extract the installation. However, the downloaded files will complain when extracting tar.gz: gzip: stdin: not in gzip format , with a file after the command to see to know this stuff is Html Document, then this method will not work.
3. Install Tomcat
依旧用 yum: yum install -y tomcat tomcat-admin-webapps tomcat-docs-webapp tomcat-webapps
Start: systemctl Start tomcat.service
Restart: systemctl restart Tomcat
4. Deployment Project
WinSCP connect with the server, into the directory / var / lib / Tomcat / the webapps / the ROOT , empty the directory.
(WinSCP visual interface may be time to find a file on the server Where also help XD)
Then the war package of projects reached this directory, unzip: JAR -xvf xxxx.war
End all java process: PS -e | grep java | awk '{Print "the kill -9" $ 1}' | SH
Start Tomcat, in the browser enter ip: 8080 can access a project just deployed (as to why 8080 I do not know, this is the default Tom Cat).
* 5. Easily installed git
Or use yum: yum install git
Next To initialize the git repository server and configure ssh key, see this article