Alibaba Cloud Tech Share - using Linux+JAVA+Tomcat to build website. - Alibaba Cloud Developer Forums: Cloud Discussion Forums

  • UID1802
  • Fans0
  • Follows0
  • Posts1

Alibaba Cloud Tech Share - using Linux+JAVA+Tomcat to build website.

More Posted time:Jan 23, 2017 0:05 AM
Hello , I am Hong Kong user, I was first time using alibaba cloud product in December/2016.
The Alibaba cloud web page give me an impression is very advanced.
In this tutorial  I will talk about how to deploy tomcat to Alibaba cloud server with Linux.
1.First step we need to sure our ECS is on duty.
2.You can change the password because the original one is complex and not good to remember. the putty(open license) software and input your server public IP address to login with superuser account like root. another sofrwate Winscp(if you OS is windows) and drag the JDK(I suggest  JDK1.7 or above,and gz packet for linux)and tomcat to your server.
5.In this time, your server has Tomcat and jdk,then using tar -zvxf your jdk packet to unzip. you can see the bin folder after the unzip operation.if you have no right to modify this file, you can use chmod 777 filename to unlock the file.
6.After unzip,you can see the bin folder having java and javac.these command just like windows, javac is to compile source code and java is to run .class file. need to modify your OS path in linux. using command vim /etc/profile and add your JDK path in it.
like this .
8.After step seven, you can type java -version in any path in linux,do not need to CD to jdk folder. It will show you the jdk version you own.
9.tomcat is same things to jdk , you need to unzip it(tar -xzvf  apache-tomcat.tar.gz), and you can see the tomcat folder.
like thisand CD to bin can type ./ to run the tomcat container in bin path. can browse your server using http://public IP address:8080. If you can see the tomcat page, It proves you are successful to run the server.

  • UID3989
  • Fans0
  • Follows0
  • Posts2
1st Reply#
Posted time:Oct 24, 2017 8:16 AM
I have successfully installed and started tomcat on my ubuntu VM.
I am able to view tomcat welcome page on localhost using the "w3m http://localhost:8080" terminal command.
Unfortunately, I can't browse tomcat welcome page  outside of localhost using my Alibabacloud ECS assigned internet ip (http://InternetIP:8080).
I have disabled firewall using "sudo ufw disable " terminal command, yet nothing seem to work.

I have also edited tomcat server.xml file using "sudo nano [filename]" command, as suggested on some other online forum.

***FIRST MODIFICATION of tomcat server.xml file that did not work ***

<Connector port="8080" protocol="HTTP/1.1"


***ANOTHER MODIFICATION of tomcat server.xml file that did not work either ***

<Connector port="8080" protocol="HTTP/1.1"


On Microsoft Azure, it's mandatory for firewall inbound rules to be set and enabled for ports. It is also mandatory that

Endpoints be configured for same port on Azure console, before any connection can be made to VMs over the internet.

I am wondering if this is also the case with Alibabacloud ECS?

Kindly advise me on possible solution(s) to enable me access resources on my Alibabacloud Ubuntu VM via tomcat server.

*** By the way, "" did not work in my case.

    I was however, able to start tomcat using " run"