一、準備工作
1、註冊帳號
#下載完成後。可到這裡 申請1GB雲端伺服器ECS的15天的免費試用,以及雲端資料庫RDS 5G 30天的免費試用。
2、下載putty和FileZlilla
本地遠端SSH登陸到個人阿里雲端伺服器的過程很簡單,這裡就不再細說
1、先到下載JDK,下載到本到後,透過FileZlilla上傳此壓縮封包到個人雲端伺服器
開啟putty。輸入IP位址,依照指示輸入使用者名稱和密碼即可。 (密碼為你登陸阿里雲首頁的那個密碼)
(tomcat是下一步下面要安裝到的)
好了,之後就很簡單了。
2、設定目錄
注意:最好以root使用者來操作
先新建一個目錄:
cd java
mkdir jdk
mkdir jdk[plain]
view plain copy#
##3、設定環境變數 #輸入:
The following appears, indicating that the installation is successful
1. Download tomcat, go to download, here the author uses It is tomcat7. At the same time, download tomcat to the local computer and upload the compressed package to the personal cloud server through FileZlilla.
This is after the upload is successful:
2. Installation
Here I install tomcat into /usr/java/tomcat.
Execute
tar zxvf apache-tomcat-7.0.68.tar.gz -C /usr/java/tomcat
Pay attention to the tomcat directory in advance Created
##Open
export JRE_HOME=/usr/java/jdk/jdk1.8.0_65/jre
Then return to the bin directory:
Execute:
[plain ]
4. Upload java web from local Project
1. War package upload
. Note that the personal cloud server must choose the correct address, otherwise you have to cp here. Remember to put the war package under webapps under tomcat
2, then open the browser and enterhttp://120.24.19.24:8080 /JavaHelloWorld-0.0.1-SNAPSHOT/
Found that it can be accessed!
Of course, you can also go to the cloud server to view the war package: Instance access to this article: http:// 120.24.19.24:8080/JavaHelloWorld-0.0.1-SNAPSHOT/ (will no longer be accessible until 2016.3.9)以上是雲端伺服器中部署java web的方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!