Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu installs the port of configuring Tomcat and the process of decompressing tomcat

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the port of Ubuntu installation and configuration of Tomcat and the process of decompressing tomcat". In the daily operation, I believe that many people have doubts about the process of installing and configuring Tomcat in Ubuntu and decompressing tomcat. The editor consulted all kinds of materials and sorted out a simple and useful method of operation. I hope it will be helpful to answer the doubts of "Ubuntu installation and configuration of Tomcat port and decompression of tomcat process". Next, please follow the editor to study!

1. First of all, make sure to install the relevant software

Install the JAVA environment to open the terminal, execute the following command, or use Synaptic Software Manager, search for "sun-java5-jre" and "sun-java5-jdk" and mark the installation. Sudo apt-get install sun-java5-jre# if there is plenty of space, it is recommended to install a JDK. Hehe sudo apt-get install sun-java5-jdk sets the current default java interpreter sudo update-alternatives-config java

After execution, a screen similar to the following appears: There are 4 alternatives which provide `java'.

Selection Alternative 1 / usr/lib/jvm/java-gcj/jre/bin/java 2 / usr/bin/gij-wrapper-4.1 3 / usr/bin/gij-wrapper-4.0 4 / usr/lib/jvm/java-1.5.0-sun/jre/bin/java Press enter to keep the default or type selection number:

Enter the number in front of the line that contains "sun". As shown above, enter 4, and then enter enter to confirm.

2. Install and download tomcat for Ubuntu

$wget http://apache.freelamp.com/jakarta/tomcat-5/v5.5.9/bin/jakarta-tomcat-5.5.9.tar.gz my tomcat is a download of core from http://tomcat.apache.org/download-55.cgi. Of course, the following file name should also be modified accordingly.

3. Ubuntu installation and decompression of tomcat

$sudo tar zxvf jakarta-tomcat-5.5.9.tar.gz-C / opt $sudo mv / opt/jakarta-tomcat-5.5.9 / opt/tomcat

4. Make sure you have: (this step is not sure if it is needed) in the / etc/environment file.

> CLASSPATH=/usr/lib/j2sdk1.5-sun/lib > JAVA_HOME=/usr/lib/j2sdk1.5-sun

5. Start tomcat

$sudo / opt/tomcat/bin/startup.sh if you can see the following prompt, it indicates that the startup is successful!

> Using CATALINA_BASE: / opt/tomcat > Using CATALINA_HOME: / opt/tomcat > Using CATALINA_TMPDIR: / opt/tomcat/temp > Using JRE_HOME: / usr/lib/j2sdk1.5-sun

6. Test: open Firefox and enter http://localhost:8080 in the address bar. If you come out of the default interface of Tomcat, the test passed!

7. Stop the Tomcat service $sudo / opt/tomcat/bin/shutdown.sh

8. Get the JDBC of MySQL, and type http: / / dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.10.tar.gz/from/http: / / mysql.cbn.net.id/ in the address bar of the Firefox browser to get the software.

9. Install JDBC

$tar-zxvf mysql-connector-java-3.1.10.tar.gz $sudo cp mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin*.jar / usr/lib/j2sdk1.5-sun/lib

Ubuntu installs the port on which Tomcat is configured

The Tomcat that comes with the Ubuntu installation opens port 8180, which is neither conventional nor easy to use. We can make some simple changes to allow Tomcat to use other ports for service. In Terminal, enter sudo gedit / usr/share/tomcat5/conf/server.xml

Look in the Ubuntu installation configuration file

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report