1、安装jdk
[root@node01 ~]
[root@node01 ~]
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
2、部署Tomcat
[root@node01 ~]
[root@node01 ~]
[root@node01 local]
[root@node01 local]
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$CATALINA_HOME
[root@node01 local]
CATALINA_PID="$CATALINA_HOME/tomcat.pid"
JAVA_OPTS="-server -XX:PermSize=256M -XX:MaxPermSize=512m -Xms512M -Xmx512M -XX:MaxNewSize=256m"
[root@node01 local]
[root@node01 local]
[Unit]
Description=Apache Tomcat Web Application
ContainerAfter=syslog.target network.target
[Service]
Type=forking
PIDFile=/usr/local/tomcat/tomcat.pid
ExecStart=/usr/local/tomcat/bin/catalina.sh start
ExecReload=/bin/kill -s HUP MAINPID
ExecStop=/bin/kill?s QUIT MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
[root@node01 local]
[root@node01 local]
[root@node01 local]
[root@node01 local]
enabled
[root@node01 local]
[root@node01 local]
tcp6 0 0 :::8080 :::* LISTEN 4052/java
[root@node01 local]
root 4052 1 0 19:52 pts/0 00:00:07 /usr/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/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/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 19906 1162 0 21:23 pts/0 00:00:00 grep --color=auto java
yum install rng-tools
[root@node01 local]
1101
systemctl enable --now rngd
cat /proc/sys/kernel/random/entropy_avail
[root@node01 local]
3105
3、配置Tomcat web控制页面
注意:不要在生产环境使用
[root@node01 local]
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-jmx"/>
<role rolename="manager-script"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="admin-gui,manager-gui,managerjmx,manager-script,manager-status,admin-script"/>
[root@node01 local]
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
<!-- allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" -->
[root@node01 local]
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
<!-- allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" / -->
[root@node01 local]
浏览器访问:http://192.168.5.11:8080/
4、Web站点部署(Jpress)
jpress官网:http://jpress.io 下载地址:https://github.com/JpressProjects/jpress
[root@node01 local]
[root@node01 local]
[root@node01 local]
[root@node01 local]
[root@node01 local]
[root@node01 webapps]
total 70660
drwxr-x--- 15 root root 4096 Nov 19 19:15 docs
drwxr-x--- 7 root root 99 Nov 19 19:15 examples
drwxr-x--- 6 root root 79 Nov 19 19:15 host-manager
drwxr-x--- 6 root root 86 Nov 19 22:40 jpress-v3.3.0
-rw-r--r-- 1 root root 71677863 Feb 21 2021 jpress-v3.3.0.war
drwxr-x--- 6 root root 114 Nov 19 19:15 manager
drwxr-x--- 3 root root 223 Nov 19 19:15 ROOT
浏览器访问:http://192.168.5.11:8080/jpress-v3.3.0 部署成功!!!
|