Bluesky
Intern
Intern
  • UID1927
  • Fans0
  • Follows0
  • Posts1
Reads:59234Replies:3

Alibaba Cloud Tech Share – Install JDK, Tomcat, and its configuration Build Java web project on Ali

Created#
More Posted time:Feb 14, 2017 0:04 AM
Install JDK, Tomcat, and its configuration process. Build Java web project on Ali cloud.Get ready.Download putty and FileZlilla.
1, JDK installation
1, first of all to the http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html download JDK, download to the local to the FileZlilla upload this package to the Ali cloud server

Open putty. Enter the IP address, follow the prompts to enter the user name and password.

2, configuration directory
Note: it is best to use root users to operate
Create a new directory:
CD usrmkdir javacd javamkdir JDK
Then unzip the JDK tar file to the directory above:
Tar zxvf jdk-8u73-linux-x64.gz -C /usr/java/jdk
The results are as follows:


3, configuration environment variables
Input:
VI /etc/profile
or
GEDIT /etc/profile
Add the following:
#set Java environmentexport JAVA_HOME=/usr/java/jdk/jdk1.8.0_73export JRE_HOME=/usr/java/jdk/jdk1.8.0_73/jreexport CLASSPATH=.: $JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATHexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH
Note that this is changed to the corresponding JDK directory, and to root users to make changes, otherwise can not save
Save execution:
Source /etc/profile
Verify installation:
Input:
Java -version
The following shows that the installation is successful



2, configure Tomcat
1, Download tomcat, to download http://tomcat.apache.org/, where the author is using the tomcat7. Tomcat will be downloaded to the local computer, through the FileZlilla upload this package to a personal cloud server


2, installation
Here I install Tomcat to /usr/java/tomcat.
implement
Tar zxvf apache-tomcat-7.0.68.tar.gz -C /usr/java/tomcat
Note that the Tomcat directory should be created in advance

3, configuration environment
Go to the bin folder above tomcat:

open
VI setclasspath.sh
or
GEDIT setclasspath.sh
Add the following:
Export JAVA_HOME=/usr/java/jdk/jdk1.8.0_65 export JRE_HOME=/usr/java/jdk/jdk1.8.0_65/jre



Can save.
And then return to the bin directory:
Execution:
./startup.sh
The following shows that the installation is successful

Or directly through the port to external access, first look at the external IP server
After confirmation plus a port 8080 can be accessed:

End.

Latest likes:

CloudwingCloudw... DavecomDaveco... wendyflywendyf...
Guest