Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux / CentOS 7.0 installation and configuration under Tomcat 8.0     - Ubuntu 14.04 LTS compiler installation R Source Code (Linux)

- Ubuntu 14.04 next upgrade to GNOME 3.12 (Linux)

- AppCode developed Mac OS X application or shared library experience summary (Programming)

- Hibernate + JUnit test entity class generate database table (Programming)

- Logging information through the web GUI (LogAnalyzer) (Server)

- Linux Firewall Builder shorewall (Linux)

- Linux / Raspberry Pi using the following command-line based web browser (Linux)

- awk pattern matching (Programming)

- Use C program in JavaScript (Programming)

- Use libcurl library download url image (Programming)

- Installation and configuration to compile MySQL 5.6.10 under CentOS 5.9 (Database)

- Variables Python variables (Programming)

- Shared directory settings between Linux and Linux (Linux)

- How to install Ubuntu strategy game Wesnoth 1.12.0 (Linux)

- Explore Android SQLite3 multithreading (Programming)

- how to quickly find a file on Linux system (Linux)

- CRF ++ Linux use (Linux)

- Proficient in C / C ++ can also find a very good job (Programming)

- shell script: MySQL startup script simple (Database)

- Oracle 11g maintenance partitions (Seven) - Modifying Real Attributes of Partitions (Database)

 
         
  Linux / CentOS 7.0 installation and configuration under Tomcat 8.0
     
  Add Date : 2017-01-08      
         
         
         
  Installation under Linux / CentOS7.0 configuration Tomcat8.0

A. Configuring Tomcat installation environment

1. Download the corresponding jdk

http://www.Oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I use 64-bit download address:

http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz

After downloading the jdk under pressure into the / usr / local directory:

2. Establish / usr / local / jdk soft connection to facilitate future upgrades under version:

# Ln -s /usr/local/jdk1.8.0_40/ / usr / local / jdk

3. Environment Variables

Add the following line in / etc / profile in

JAVA_HOME = / usr / local / jdk1.8.0_40

JAVA_BIN = / usr / local / jdk1.8.0_40 / bin

PATH = $ PATH: $ JAVA_BIN

CLASSPATH = $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar

export JAVA_HOME JAVA_BIN PATH CLASSPATH

Save and exit

[Root @ master ~] source / etc / profile

See java environment variable is in effect

[Root @ localhost local] # java -version

java version "1.7.0_51"

OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)

OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

Note: I configure JAVA environment variable when JDK is jdk1.8.0_40, run java -version get is 1.7.0_51

This shows that the system gcj carried JAVA environment variable priority access to the execution right. The solution is to set like the above
export PATH = $ JAVA_HOME / bin: $ PATH, pay attention to the $ PATH into the final. (If placed before the above-mentioned problem occurs)

# Java -version
java version "1.8.0_40"
Java (TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot (TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Prior to mounting you can uninstall:

[Root @ local src] # rpm -qa | grep java

java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64

rpm -e java-version-openjdk java-version-openjdk-devel according to their own version.

two. Tomcat8.0.20 Download:

http://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.0.20/bin/apache-tomcat-8.0.20.tar.gz

#tar xzf apache-tomcat-8.0.20.tar.gz // decompression

#mv apache-tomcat-8.0.20 / usr / local / tomcat

#vim /usr/local/tomcat/bin/catalina.sh

Add: CATALINA_HOME = / usr / local / tomcat
chmod + x * .sh

three. Start tomcat server

1. Firewall Release 80

# / Etc / sysconfig / iptables // open with VI

-A INPUT -p tcp -m state -state NEW -m tcp -dport 80 -j ACCEPT // add a sentence to release 80

#cd / usr / local / tomcat / bin /

#. / Startup.sh // start tomcat

four. In the browser input test

http: // localhost: 8080 (if not the machine, enter the corresponding ip address)

Testing indicates that the test page appears tomcat success!

V. modify and add the port test application

ps: Note that the default test page tomcat webapps is placed below, in fact, this is server.xml configuration file, as follows: