How to configure Apache Tomcat in Linux ubuntu14.0.4 __linux

Source: Internet
Author: User

First we have to install the Tomcat server, first of all must be installed Java running environment JDK, because Tomcat is a Java-written server, install JDK see: http://blog.csdn.net/u013412497/article/details/47000275

After installing the JDK, download Apache on the official web, I downloaded the current minimum version of apache-tomcat-8.0.24.tar.gz, of course, the high version is compatible with the low version, if we develop in the myeclipse, we can also choose a lower than the other version.

After downloading, unzip the file. Download the default place is/home/ranruilong/download, this is my directory, the default is home, everyone's directory only need to change the Ranruilong to your corresponding directory can

In terminal input: TAR-ZXVF apache-tomcat-8.0.24.tar.gz

After decompression, there is one more folder in the current directory: apache-tomcat-8.0.24

Then I created a new Apache directory in/opt and put the unpacked files under this folder.

Create a file with Mkdir/opt/apache in the terminal

Then under the original download directory: CP Apache-tomcat-8.0.24/opt/apache

It's simple, then you just need to configure the environment variables.

In Terminal input: Vi/etc/profile

At the back, add:

The catalog in export catalina_base=/opt/apache/apache-tomcat-8.0.24//Here is your own Tomcat directory
The catalog in export catalina_home=/opt/apache/apache-tomcat-8.0.24//Here is your own Tomcat directory

Finally, save the file. Then go to Tomcat's Bin directory to start startup.sh

In the terminal input./startup.sh can be started successfully.

If you encounter insufficient permissions during the operation, log in with the root user. In the terminal input su-root then enter the password, the root login succeeded, but the root user permissions are the highest, so in the root

In the process of logging in, do not arbitrarily change files

So tomcat is configured successfully.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.