Linux installation and configuration under Tomcat8
Before installing tomcat must first install and configure the corresponding jdk Java environment.
First, prepare the environment
jdk Version: 1.8
Tools: xShell5 xftp5
Note: This article is connected to a remote Linux operating through Xshell5 tool, the same principle.
Second, the installation step
1, download the installation package
Download the official website address: http: //www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I was here to download jdk-8u161-linux-x64.tar.gz
If Linux is itself connected to the Internet, we can directly through the wget command directly to the JDK installation package downloaded.
2, extract the installation package
We downloaded the JDK installation package uploaded to the server, decompress.
I was placed under / usr / local / java files, so you want to create java folder and extract the files to move to the next java (due before or again by creating a new repeat)
mkdir /usr/local/java
mv jdk1.8.0_161 /usr/local/java/
3, modify the configuration file (configuration environment variable)
vim /etc/profile
With vim editor to edit the profile file, add it to the end of the file:
: Wq Enter to save and exit.
After saving the modified configuration by source / etc / profile command takes effect
4, the test JDK installation was successful
java -version appear installed version information
Here begin the installation tomcat.
Download and install tomcat (http://tomcat.apache.org/) my side is downloaded apache-tomcat-8.0.50.tar.gz
Decompression
tar -zxvf apache-tomcat-8.0.50.tar.gz
I was placed under usr / local / tomcat tomcat so to create a folder and extract the files to move to the next tomcat (due before or duplication by creating new again)
mkdir /usr/local/tomcat
mv apache-tomcat-8.0.50 /usr/local/tomcat/
进入tomcat安装bin目录并启动
cd usr/local/tomcat/apache-tomcat-8.0.50/bin/
./startup.sh
成功启动后浏览器输入http://localhost:8080/查看信息(如果不是本机则输入对应IP,比如我输入服务器IP47.97.189.117:8080)
至此,tomcat安装完成,后续可添加项目重启tomcat服务。