One of my projects is to play the AVI video file on the set-top box, but the test cannot be continued due to unnecessary errors. Therefore, I want to build a tomcat environment in Linux for testing, the previous installation has failed many times and has not found the cause of the error. I just re-installed it once according to the process ~ The process is now successful and I hope it will be helpful to you.
1. Build a Java environment
2. Install MySQL
3. tomcat installation
The previous two parts will not be given a process due to the time relationship. I hope you will understand it later.
1. Build a Java environment
Now we assume that the Java environment has been successfully set up.
And in ~ /. The JDK environment has been configured in bashrc:
Export java_home =/usr/Java/jdk1.6.0 _ 13
Export Path = $ path: $ java_home/bin: $ java_home/JRE/bin
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. jar: $ java_home/JRE/lib
Restart your computer, write a correct helloworld. Java program, and check whether your Java installation is successful.
This step must be correct; otherwise, it cannot be continued.
You can also enter Java-version on the terminal to check whether the version is the same as the version prompted by java_home.
2. Install MySQL
This website can be found anywhere. You can refer to the materials and this article will not be provided.
3. tomcat configuration and installation
3.1 Tomcat 5.5 download:
We recommend that you use 5.5 instead of 6.0 because I encountered an error when configuring 6.0. 5.5 is successful. Of course, if someone configures 6.0 successfully, I hope I can give a proposal.
: Http://apache.etoak.com/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.tar.gz
3.2 after the download, place it under/OPT. Of course, the directory can be customized. You can also use other. Right-click and decompress the package to the directory to generate the Tomcat directory.
3.3 enter Vim ~ on the terminal ~ /. Bashrc, and then add:
Export catalina_base =/opt/apche-tomcat-5.5.27
Export catalina_home =/opt/apche-tomcat-5.5.27
3.4 save the file and restart your computer.
3.5 input echo $ catalina_base on the terminal to check whether the information above is the same. If they are the same
3.6 go to the bin directory of Tomcat and run./Catalina. Sh run
When prompted
Using catalina_base ..................
Information: server startup in 2693 MS
And other information, it indicates that the operation is successful.
4. View http: // localhost: 8080/To see the page we are familiar.