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 (Note: Use VI command) file, configure the environment variable (note: Assuming that the JDK is unpacked after the directory 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, you need to perform:
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 it, and then execute the script startup.sh in the extracted bin directory to start the Tomcat service.
Test:
HTTP://IP Address: 8080
See if the browser can appear in the Tomcat Docs document, and if so, Tomcat is good.
3. Follow the MySQL
sudo apt-get install Mysql-server
When the installation is complete, the MySQL environment variable is configured itself.
Test:
Input:
Mysql-p
Enter password
If 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 modify xxx.xxx.xxx.xxx for their own IP address on the line, just give me my own domain name to make an advertisement
Host name (A) (up to 20) IP address TTL operation Help
Www.uhdesk.com
XXX.XXX.XXX.XXX 3600 Modify-Delete
5. At this point the need to enter the domain name, but also add the port to access the machine Tomcat webapps/root under the index.htm
To solve this problem, you need to change the service port of Tomcat to provide HTTP to 80.
Cause: When the browser makes an HTTP request, the default port is 80.