centos7 steps detailed graphic configuration tomcat8

Environment Description:
centos7 minimum installation, configuration tomcat8

Available to the local computer to download jdk1.8

The official website below, or Oracle need to register an account before they can log in to download
https://www.oracle.com/technetwork/java/javase/downloads/index.html
centos7 steps detailed graphic configuration tomcat8

2. Install the upload tool

[root@localhost ~]# yum -y install lrzsz
Upload jdk
[root@localhost ~]# rz
centos7 steps detailed graphic configuration tomcat8

After uploading OK decompression 3.jdk

[root@localhost ~]# ls
anaconda-ks.cfg  jdk-8u201-linux-i586.tar.gz
[root@localhost ~]# tar xf jdk-8u201-linux-i586.tar.gz 
[root@localhost ~]# ls
anaconda-ks.cfg  jdk1.8.0_201  jdk-8u201-linux-i586.tar.gz
[root@localhost ~]# mkdir -p /usr/local/
bin/     etc/     games/   include/ lib/     lib64/   libexec/ sbin/    share/   src/     
[root@localhost ~]# mkdir /usr/local/java
[root@localhost ~]# mv jdk1.8.0_201/* /usr/local/java/

4.jdk environment variable configuration

[root@localhost ~]# vim /etc/profile #追加如下变量
export JAVA_HOME=/usr/local/java
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

5. Update the profile file

[root@localhost ~]# source /etc/profile

6. Review the java version

[root@localhost local]# java -version
-bash: /usr/local/java/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录

Wrong: there is no prompt file.
This situation should be minimal installation system lacks the appropriate library file that caused the error
here can follow the prompts to install the appropriate library file
[root@localhost ~]# yum -y install ld-linux.so.2

[root@localhost ~]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
[root@localhost ~]# javac -version
javac 1.8.0_201

After installing it suggested that the lack of documents, once again view the Java version, OK.

7. Download tomcat8

Official website address https://tomcat.apache.org/download-80.cgi
still downloaded to the local then upload rz

centos7 steps detailed graphic configuration tomcat8

8. unzip and upload tomcat8

[root@localhost ~]# rz
centos7 steps detailed graphic configuration tomcat8

[root@localhost ~]# ls
anaconda-ks.cfg  apache-tomcat-8.5.41.tar.gz  jdk1.8.0_201  jdk-8u201-linux-i586.tar.gz
[root@localhost ~]# tar xf apache-tomcat-8.5.41.tar.gz 
[root@localhost ~]# ls
anaconda-ks.cfg  apache-tomcat-8.5.41  apache-tomcat-8.5.41.tar.gz  jdk1.8.0_201  jdk-8u201-linux-i586.tar.gz
[root@localhost ~]# mkdir /usr/local/tomcat8
[root@localhost ~]# mv apache-tomcat-8.5.41/* /usr/local/tomcat8/

9. Start tomcat

[root@localhost ~]# /usr/local/tomcat8/bin/startup.sh 
Using CATALINA_BASE:   /usr/local/tomcat8
Using CATALINA_HOME:   /usr/local/tomcat8
Using CATALINA_TMPDIR: /usr/local/tomcat8/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
Tomcat started.
[root@localhost ~]# ps -ef|grep java
root       9744      1 31 16:44 pts/0    00:00:03 /usr/local/java/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8 -Dcatalina.home=/usr/local/tomcat8 -Djava.io.tmpdir=/usr/local/tomcat8/temp org.apache.catalina.startup.Bootstrap start
root       9787   7172  0 16:44 pts/0    00:00:00 grep --color=auto java

Startup is complete, view the process OK.

10. Verify page

http://192.168.0.64:8080/
centos7 steps detailed graphic configuration tomcat8
This firewall in the ON state, access is blocked to close the port through the firewall or page can allow.
Experimental environment can turn off the firewall:

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Production environment is recommended to open the port and enhance server security:

[root@localhost tomcat8]# firewall-cmd --permanent --add-port=8080/tcp
success
[root@localhost tomcat8]# firewall-cmd --reload
success

centos7 steps detailed graphic configuration tomcat8
Returning to the tomcat page displays OK.

Guess you like

Origin blog.51cto.com/11573159/2404918