https://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/

Apache Tomcat is an opensource web hosting server for Java based web application. Tomcat is licensed under Apache License version 2. Apache has released stable version of Tomcat 8 on June 25, 2014. Which is available for download on its official site. Apache tomcat 8 has upgraded some features. Below are few details about Tomcat 8.

    • Tomcat 8 requires JAVA 7 or Higher to work.
    • Tomcat 8 supports Java Servlet 3.1
    • Tomcat 8 supports JavaServer Pages 2.3
    • Tomcat 8 supports Java Unified Expression Language 3.0
    • Tomcat 8 supports Java WebSocket 1.0

This article will help you to Install Tomcat 8 on your CentOS/RHEL and Ubuntu systems. Tomcat 8 stable release is available for download. To install other version of tomcat visit Install Tomcat 7 on CentOS/RHEL or Install Tomcat 7 on Ubuntu as per your operating system used.

Step 1 – Verify JAVA

JAVA is the first requirement of Tomcat installation. Use following command to check if you have java installed already on your system.

# java -version

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Tomcat 8 is designed to run on Java SE 7 and later. So make sure you have installed correct version on your system. If you don’t have Java installed on your system or installed lower version, use one of following link to install Java first.

Step 2 – Downloading Tomcat Archive

Download Apache Tomcat 8 archive file using following commands or you can visit Tomcat 8official download page for download most recent available version. After downloading extract archive file in /opt directory. You may change this location as per your setup.

# cd /opt
# wget http://www.us.apache.org/dist/tomcat/tomcat-8/v8.0.27/bin/apache-tomcat-8.0.27.tar.gz
# tar xzf apache-tomcat-8.0.27.tar.gz

Step 3 – Configure Environment Variables

Before starting Tomcat, configure CATALINA_HOME environment variable in your system using following commands.

# echo "export CATALINA_HOME="/opt/apache-tomcat-8.0.27"" >> ~/.bashrc
# source ~/.bashrc
Step 4 – Starting Tomcat

Tomcat is very easy to use, There are no need to compile its source. You simple extract the archive and start the tomcat server. Tomcat by default start on port 8080, So make sure no other application using the same port.

# cd /opt/apache-tomcat-8.0.27
# ./bin/startup.sh

[Sample Output]

Using CATALINA_BASE:   /opt/apache-tomcat-8.0.27
Using CATALINA_HOME: /opt/apache-tomcat-8.0.27
Using CATALINA_TMPDIR: /opt/apache-tomcat-8.0.27/temp
Using JRE_HOME: /opt/jdk1.8.0_60
Using CLASSPATH: /opt/apache-tomcat-8.0.27/bin/bootstrap.jar:/opt/apache-tomcat-8.0.27/bin/tomcat-juli.jar
Tomcat started.
Step 5 – Access Tomcat in Browser

Tomcat server works on port 8080 default. Access tomcat on web browser by connecting your server on port 8080.

 http://svr1.tecadmin.net:8080 

Step 6 – Setup User Accounts

Finally we need to create user accounts to secure and access admin/manager pages. Editconf/tomcat-users.xml file in your editor and paste inside <tomcat-users> </tomcat-users> tags.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" /> <!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

How to Install Tomcat 8.0.27 on CentOS/RHEL and Ubuntu【转】的更多相关文章

  1. Install OpenCV 3.0 and Python 2.7+ on Ubuntu

    为了防止原文消失或者被墙,转载留个底,最好还是去看原贴,因为随着版本变化,原贴是有人维护升级的 http://www.pyimagesearch.com/2015/06/22/install-Open ...

  2. Adobe Flash Player 27 on Fedora 27/26, CentOS/RHEL 7.4/6.9

    This is guide, howto install Adobe Flash Player Plugin version 27 (32-bit and 64-bit) with YUM/DNF o ...

  3. Install Tomcat 6 on CentOS or RHEL --转载

    source:http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos This post will cover installa ...

  4. 转: How to Install MongoDB 3.2 on CentOS/RHEL & Fedora (简单易懂)

    from:  http://tecadmin.net/install-mongodb-on-centos-rhel-and-fedora/ MongoDB (named from “huMONGOus ...

  5. Eclipse配置tomcat8.5.7报错:The Apache Tomcat installation at this directory is version 8.5.27. A Tomcat 8.0 installation is...

    Eclipse配置tomcat8.5.7报错:The Apache Tomcat installation at this directory is version 8.5.27. A Tomcat ...

  6. Linux Tomcat 6.0安装配置实践总结

    系统环境: Red Hat Enterprise Linux Server release 5.7 (Tikanga)  64位 Tomcat下载 从官方网站 http://tomcat.apache ...

  7. Tomcat 9.0安装配置

    本文转自:http://blog.sina.com.cn/s/blog_15126e2170102w5o8.html 一.JDK的安装与配置 1.从官网下载jdk,注意是jdk不是jre.最好从官网下 ...

  8. tomcat之 Tomcat 7.0.78 单机多实例配置

    前言:JDK(JavaDevelopment Kit)是Sun Microsystems针对Java开发员的产品.自从Java推出以来,JDK已经成为使用最广泛的javaSDK. JDK是整个Java ...

  9. 创建Dynamic Web Project时 显示最新Apache Tomcat 8.0 的方法

    创建Dynamic Web Project时  显示最新Apache Tomcat  8.0 等的方法 解决办法如下: 第一步:eclipse菜单help->eclipse marketplac ...

随机推荐

  1. Ubuntu 安装 Docker CE

    注:本文转载自<Docker入门> 警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. 准备工作 系统要求 Docker CE 支持以下版本的 ...

  2. Java正则中为什么反斜线"\"需要用“\\\\”表示,原因详解。

    首先,我们需要知道在java字符串和正则表达式中,“\”都具有特殊的含义. 一.在Java的字符串中"\"有两个功能 (一)代表特殊字符:\t代表制表符,\n代表换行....等. ...

  3. EXCEL中把两列表格里的数字合成一列并且中间用逗号隔开

    背景:使用loadrunner做参数化时,往往需要在excel表格中做数据,比如:第一列是用户名,第二列是密码,格式如下: 再将用户名和密码合并成一列,以逗号分隔,需要用到的公式为: =A1& ...

  4. 构建oracle12c的Docker镜像

    1. 准备工作 需要下载oracle相关的东东,例如安装文件,dockerfile.这些都可以从oracle 的github 上面找到.https://github.com/oracle/docker ...

  5. WingIDE 常用快捷键

    Ctrl+N        新建文件 Ctrl+O   打开文件夹 Ctrl+W            关闭当前文件 Ctrl+S              保存文件 Ctrl+shif+S      ...

  6. 《Practical Vim》第八章:利用动作命令在文档中移动

    面向单词的移动 定义: Vim 提供了面向单词的动作命令,用于将光标正向/反向移动一个单词; 功能 命令 正向移动到下一单词开头 w 反向移动到上一单词的开头 b 正向移动到下一单词(当前单词)的结尾 ...

  7. mysql查看配置生效

    mysql> show status like 'Threads%';+-------------------+-------+| Variable_name     | Value |+--- ...

  8. Putting Boxes Together CodeForces - 1030F (带权中位数)

    #include <iostream> #include <algorithm> #include <cstdio> #include <math.h> ...

  9. 『TensorFlow』正则化添加方法整理

    一.基础正则化函数 tf.contrib.layers.l1_regularizer(scale, scope=None) 返回一个用来执行L1正则化的函数,函数的签名是func(weights).  ...

  10. TCP建立连接为什么是三次握手,为什么不是两次或四次?

    什么是三次握手 学过网络编程的人,应该都知道TCP建立连接的三次握手,下面简单描述一下这个过程. 如图所示 第一次握手:客户端发送TCP包,置SYN标志位为1,将初始序号X,保存在包头的序列号(Seq ...