Build the Java development environment on Ubuntu 16.04 (my 64-bit OS):
Pre-Preparation: JDK, Tomcat, Eclipse, MySQL
JDK Installation configuration:
I chose the JDK version of 1.8: The installation package bit is jdk-8u144-linux-x64.tar.gz
: Https://download.csdn.net/download/aqtata/9931416?web=web
Installation steps:
Unzip to the specified file path (see your own situation)
I created a new Java folder (mkdir command) on the mounted disk and gave the read, write, and run permissions under the root user: chmod 777 Java
Place the downloaded installation package under the Java folder; Unzip the installation package into the Java folder: TAR-XZVF jdk-8u144-linux-x64.tar.gz
Configuring environment variables: sudo vi/etc/profile
Export java_home=/java/jdk1.8.0_144 #此为jdk路径 (pwd command to view full file path)
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
Make the configuration file effective: Source/etc/profile
To see if the JDK was installed successfully: Java-version
Tomcat installation configuration:
I chose Tomcat 7: The installation package is apache-tomcat-7.0.73.tar.gz
: https://download.csdn.net/download/omiconlee/9710792
Place the downloaded installation package under the Java folder; Unzip the installation package into the Java folder: TAR-XZVF apache-tomcat-7.0.73.tar.gz
Configuring environment variables: sudo vi/etc/profile
-No change
Export java_home=/java/jdk1.8.0_144 #此为jdk路径 (pwd command to view full file path)
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
---modification
Export Path=${java_home}/bin: $PATH: Tomcat_home
---add
Export tomcat_home=/java/apache-tomcat-7.0.73 # (TOMCAT file path)
Make the configuration file effective: Source/etc/profile
Note: About Tomcat can proceed with the boot port configuration (the default 8080 port, if the port is occupied or want to change the port can refer to a), administrator configuration (can refer to B) and other configuration (Baidu, such as: Default time zone, boot-up and other configuration), see the individual needs * * *
A: CD into the Conf directory of Tomcat, edit Server.xml file: VI server.xml
Find and modify:
<connector port= "8080" protocol= "http/1.1"--#修改启动端口
connectiontimeout= "20000"
Redirectport= "8443"
uriencoding= "UTF-8"/>--#默认字符集设置 (see, not configurable)
B: CD into the Conf directory of Tomcat, edit Tomcat-users.xml file: VI tomcat-users.xml
The second line between <tomcat-users></tomcat-users> is added as follows:
<user username= "admin" password= "admin" roles= "Admin-gui,manager-gui"/>
The annotations are finished ******
Launch TOMCAT:CD into the Tomcat bin directory, execute:./startup.sh start Omcat, view logs logs to see if it starts properly (CD to tomcat logs directory under VI catalina.out view)
In the browser access: Http://localhost:8080/into the Tomcat interface, you can verify the administrator click on the Manager app login in the Tomcat-user.xml set user name and password.
。。。。。。。。 Write tomorrow about Eclispe and MySQL-related installation configuration
The Java development environment of Ubuntu 16.04 system is built