This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:server-install-components [2019/01/04 11:17]
mpospisek [System variables setting]
documentation:server-install-components [2019/08/01 09:09]
tjotov removed
Line 115: Line 115:
 # D | install systemd unit file # D | install systemd unit file
 # create and open unit file service # create and open unit file service
-vi /​usr/​lib/​systemd/​system/​tomcat9.service +#vi /​usr/​lib/​systemd/​system/​tomcat9.service 
-</​sxh>​ +echo \ 
-File contents: +"[Unit]
-<sxh bash> ​ +
 Description=Apache Tomcat 9.0.x Servlet Container Description=Apache Tomcat 9.0.x Servlet Container
 After=syslog.target network.target After=syslog.target network.target
Line 127: Line 125:
 Group=tomcat Group=tomcat
 Type=forking Type=forking
-#Environment=JAVA_HOME=/​usr/​java/​default +Environment=JAVA_HOME=/​usr/​java/​default 
 Environment=CATALINA_PID=/​opt/​tomcat/​tomcat.pid Environment=CATALINA_PID=/​opt/​tomcat/​tomcat.pid
 Environment=CATALINA_HOME=/​opt/​tomcat Environment=CATALINA_HOME=/​opt/​tomcat
Line 136: Line 134:
 [Install] [Install]
-WantedBy=multi-user.target +WantedBy=multi-user.target" >/​usr/​lib/systemd/​system/​tomcat9.service 
-</sxh> + 
-  +Prepare config files 
-Prepare config files +/​opt/​tomcat/​bin/​tomcat-startup.sh 
-<codedoc code:​bash>​ +echo \ 
-vi /​opt/​tomcat/​bin/​tomcat-startup.sh +"#!/bin/bash -x
-</​codedoc>​ +
-  +
-<sxh bash> ​ +
-#!/bin/bash -x+
-./​bin/​startup.sh +./​bin/​startup.sh" ​>/​opt/​tomcat/​bin/​tomcat-startup.sh
-<codedoc code:​bash>​ +/​opt/​tomcat/​bin/​tomcat-shutdown.sh 
-vi /​opt/​tomcat/​bin/​tomcat-shutdown.sh +echo \ 
-</​codedoc>​ +"#!/bin/bash -x
-  +
-<sxh bash> ​ +
-#!/bin/bash -x+
-./​bin/​shutdown.sh +./​bin/​shutdown.sh" ​>/​opt/​tomcat/​bin/​tomcat-shutdown.sh
-The Dcom.sun.management lines are just voluntarily,​ in case you want monitor Tomcat +# /​opt/​tomcat/​bin/​setenv.sh 
-<codedoc code:​bash>​ +The Dcom.sun.management lines are just voluntarily,​ in case you want monitor Tomcat 
-vi /​opt/​tomcat/​bin/​setenv.sh +# *** Check validity of Xms-Xmx settings in your environment *** 
-</​codedoc>​ +echo \ 
- +"CATALINA_OPTS="​-server \
-<sxh bash> ​ +
-CATALINA_OPTS="​-server \+
  ​-Dcom.sun.management.jmxremote.port=8086 \  ​-Dcom.sun.management.jmxremote.port=8086 \
  ​-Dcom.sun.management.jmxremote.ssl=false \  ​-Dcom.sun.management.jmxremote.ssl=false \
Line 175: Line 162:
  ​-XX:​+UseStringDeduplication \  ​-XX:​+UseStringDeduplication \
  ​-XX:​MaxGCPauseMillis=100 \  ​-XX:​MaxGCPauseMillis=100 \
- "​+ " ​>/​opt/​tomcat/​bin/​setenv.sh 
 +# make the scripts executable 
 +chmod +x /​opt/​tomcat/​bin/​*.sh
 </​sxh> ​ </​sxh> ​
-<​codedoc ​code:bash> +Add ${catalina.home}/​conf to the common.loader values in the catalina.properties file and modify last two lines of the file to somewhat speed Tomcat startup 
-cd /​opt/​tomcat/​bin +  
-chmod +x *.sh +<​codedoc> ​
 vi /​opt/​tomcat/​conf/​catalina.properties vi /​opt/​tomcat/​conf/​catalina.properties
 </​codedoc>​ </​codedoc>​
Line 346: Line 335:
 </​codedoc>​ </​codedoc>​
-<codedoc code:​bash>​ 
-vi 00-mpm.conf 
 <sxh bash> ​ <sxh bash> ​
 +cat 00-mpm.conf | grep prefork
 LoadModule mpm_prefork_module modules/​mod_mpm_prefork.so LoadModule mpm_prefork_module modules/​mod_mpm_prefork.so
 </​sxh> ​ </​sxh> ​
-<codedoc code:bash> +<sxh bash> 
-vi 00-proxy.conf +echo \ 
-</​codedoc>​ +"# This file configures all the proxy modules:
-<sxh bash> ​ +
-# This file configures all the proxy modules:+
 LoadModule proxy_module modules/​mod_proxy.so LoadModule proxy_module modules/​mod_proxy.so
 #LoadModule lbmethod_bybusyness_module modules/​mod_lbmethod_bybusyness.so #LoadModule lbmethod_bybusyness_module modules/​mod_lbmethod_bybusyness.so
Line 373: Line 358:
 #LoadModule proxy_hcheck_module modules/​mod_proxy_hcheck.so #LoadModule proxy_hcheck_module modules/​mod_proxy_hcheck.so
 #LoadModule proxy_scgi_module modules/​mod_proxy_scgi.so #LoadModule proxy_scgi_module modules/​mod_proxy_scgi.so
-#LoadModule proxy_wstunnel_module modules/​mod_proxy_wstunnel.so+#LoadModule proxy_wstunnel_module modules/​mod_proxy_wstunnel.so" > 00-proxy.conf ​
 </​sxh> ​ </​sxh> ​
Line 381: Line 366:
 <sxh bash; highlight: [9]> ​ <sxh bash; highlight: [9]> ​
-#+echo \ 
 # This file loads most of the modules included with the Apache HTTP # This file loads most of the modules included with the Apache HTTP
 # Server itself. # Server itself.
Line 453: Line 439:
 LoadModule version_module modules/​mod_version.so LoadModule version_module modules/​mod_version.so
 #LoadModule vhost_alias_module modules/​mod_vhost_alias.so #LoadModule vhost_alias_module modules/​mod_vhost_alias.so
-#LoadModule watchdog_module modules/​mod_watchdog.so+#LoadModule watchdog_module modules/​mod_watchdog.so" > 00-base.conf
 </​sxh>​ </​sxh>​