Today, we build an Ubuntu 64-bit Tomcat + java + MySQL environment, and now summarize:
1. Download the JDK
Address:
Http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz?
authparam=1394967394_1531ce17d13be0962e25ec8fe3e45f1d
Installation:
Tar xvf unzip the newly downloaded JDK compression pack.
Then to the/etc/profile (gaze: Use VI command) file, configure the environment variable (gaze: If the JDK is unpacked after the folder is/softsetupdir/jdk1.7.0_51)
Place the following three lines at the end of the profile file and save
Export java_home=/softsetupdir/jdk1.7.0_51
Export path= $PATH: $JAVA _home/bin: $JAVA _home/jre/bin
Export classpath= $JAVA _hone/lib; $JAVA _hone/jre/lib:.
For these configurations to take effect immediately. Need to run:
Source/etc/profile
Test:
At this point, you should be able to enter the Java,javac command on the command line, which means your JDK is already configured.
2. Download Tomcat
Address:
Http://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.0.3/bin/apache-tomcat-8.0.3.tar.gz
Installation:
Rest assured, after the Tomcat is downloaded, unzip will be able, and then run the script startup.sh in the extracted Bin folder to start the Tomcat service
Test:
HTTP://IP Address: 8080
See if the browser can appear in the Tomcat Docs document, assuming it does, then it means that Tomcat is good.
3. In accordance with MySQL
sudo apt-get install Mysql-server
After the installation is complete. The MySQL environment variable is configured itself.
Test:
Input:
Mysql-p
Input password
Assuming that you can connect to MySQL, it means MySQL is okay.
Extension: Start and stop of MySQL service
Service MySQL Stop
Service MySQL Start
Service MySQL Restart
4. Configure the domain name
In the domain center, the domain name is set to the IP address of the machine.
Example: only need to change xxx.xxx.xxx.xxx for its own IP address. Make an ad for my own domain
Host name (A) (up to 20) IP address TTL operation Help
Www.uhdesk.com
XXX.XXX.XXX.XXX 3600 Changes-delete
5. At this time to find the need to enter the domain name of the same time, but also add port ability to visit the machine Tomcat Webapps/root under the index.htm
To solve the problem, you need to change the HTTP service port of Tomcat to 80.
Cause: When the browser makes an HTTP request, the default port is 80.
Build Java Web +mysql under 64-bit Ubuntu