First, download the JDK
Java-version See if there is a version of jdk:jdk-java7u60-linux-x64.tar.gz installed for the JDK downloadSecond, decompression
CP JDK-JAVA7U60-LINUX-X64.TAR.GZ/OPT/SOFTWARE/JAVACD/OPT/SOFTWARE/JAVATAR-ZXVF jdk-java7u60-linux-x64.tar.gzThird, profile configuration
Vim/etc/profile
1) Add Java_home path:
Export java_home=/xxx/xxxx/jdk1.7.0_60
This directory is the directory you extracted after the JDK, such as small, the extracted directory is:
/opt/software/java/jdk1.7.0_60
So the path to the small series is:
Export java_home=/opt/software/java/jdk_1.7.0_60
2) Add JRE path
The small part is:
Export JRE_HOME=/OPT/SOFTWARE/JAVA/JDK_1.7.0_60/JRE
3) Configure Classpath Path
Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JRE _home/lib
4) Configure path Path
Export path= $PATH: $JAVA _home/bin: $JRE _home/bin
Four, let the configuration take effect, detect
Input command: source/etc/profilejava-versionv. Installation of eclips
1, download the corresponding version of Eclipse2, unzip eclipse3, to extract files to execute sudo./eclipse 4, creating Eclipse shortcuts: sudo gedit/usr/share/applications/ Eclipse.desktop
Paste and save the following:
[Desktop Entry]
Name=eclipse 4
Type=application
Exec=/opt/eclipse/eclipse
Terminal=false
icon=/opt/eclipse/icon.xpm
comment=integrated Development environment
Nodisplay=false
Categories=development;ide;
Name[en]=eclipse
vi. installation of MySQL
Apt-get Install mysql-server You need us to manually enter the user name and password for the database
After the installation is complete, we need to modify the configuration for the database, here we only need to make a modification of the binding IP, so that convenient outside access.
# VI/ETC/MYSQL/MY.CNF
Restart the MySQL service after the modification is complete
# restart MySQL
Open "Terminal Window", enter "sudo apt-get install Libapache2-mod-auth-mysql"----the installation is successful, Apache will support MySQL after installing this module.
Open "Terminal Window", enter "sudo apt-get install Php5-mysql"----the installation is successful, PHP will support MySQL after installing this module.Vii. installation of Tomcat
Download the latest Tomcat on the official website:
http://tomcat.apache.org/download-80.cgi
On Ubuntu, we download tar.gz. Decompression: TAR-ZXVF apache-tomcat-8.0.12.tar.gz
To begin configuring Tomcat:
Copy the extracted files to the/OPT directory
sudo cp-r apache-tomcat-8.0.12/opt
Enter the/opt/apache-tomcat-8.0.12 directory
cd/opt/apache-tomcat-8.0.12
Open a startup script file
sudo vi/bin/startup.sh (not familiar with VI, can be opened with gedit: sudo gedit./bin/startup.sh)
Expansion: VI Editor in the Linux version of almost all, but gedit not necessarily have, if necessary, you have to install:
sudo apt-get install gedit
After you open the startup.sh file, add the JDK and JRE:
# #20140925 Add JDK and JRE environment variables java_home=/usr/java/jdk1.8.0_20jre_home= $JAVA _home/jrepath= $PATH: $JAVA _home/bin: $JRE _ Homeclasspath=.: $JRE _home/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jartomcat_home=/opt/ apache-tomcat-8.0.12
Java_home and Jre_home are already configured with JDK and JRE directories.
Tomcat_home is the current apache-tomcat-8.0.12 directory
PS: note that before installing Tomcat, install the JDK and JRE, I installed the jdk1.8.0_20
Version of Java.
To start Tomcat:
sudo./bin/startup.sh
Verify that the Tomcat configuration and installation are successful:
In the browser, type: http://localhost:8080/
Enter.
It then displays the tomcat version of the information, and so on.
Turn Tomcat off:
sudo./bin/shutdown.sh
Linux Configuration Java Development environment