User Tools

Site Tools


documentation:server-install-components

Differences

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
Next revision Both sides next revision
documentation:server-install-components [2018/11/28 21:10]
mpospisek [Tomcat]
documentation:server-install-components [2019/01/27 08:02]
mpospisek [Tomcat]
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>  +
-[Unit]+
 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 128: Line 126:
 Type=forking Type=forking
 Environment=JAVA_HOME=/usr/java/default Environment=JAVA_HOME=/usr/java/default
 +#Environment=JAVA_HOME=/usr/lib/jvm/jre
 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 135: 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+
 cd $CATALINA_BASE cd $CATALINA_BASE
-./bin/startup.sh +./bin/startup.sh>/opt/tomcat/bin/tomcat-startup.sh
-</sxh+
    
-<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+
 cd $CATALINA_BASE cd $CATALINA_BASE
-./bin/shutdown.sh +./bin/shutdown.sh>/opt/tomcat/bin/tomcat-shutdown.sh
-</sxh+
    
-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 174: 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 289: Line 279:
 WantedBy=multi-user.target WantedBy=multi-user.target
 </sxh>  </sxh> 
-   
-<codedoc code:bash> 
-vi /etc/sysconfig/httpd 
-</codedoc> 
  
-<sxh bash>  +Modify /etc/sysconfig/httpd 
-# Add these lines ... +    
-LANG=C +<sxh bash> 
-OPENAAA_PROTOCOL="aaa" +echo 'LANG=C' >>/etc/sysconfig/httpd 
-OPENAAA_HANDLER="/usr/local/bin/aducid" +echo 'OPENAAA_PROTOCOL="aaa"' >>/etc/sysconfig/httpd 
-OPENAAA_AUTHORITY="your.server.dnsname"+echo 'OPENAAA_HANDLER="/usr/local/bin/aducid"' >>/etc/sysconfig/httpd 
 +echo OPENAAA_AUTHORITY=\"`hostname`\>>/etc/sysconfig/httpd 
 +tail -3 /etc/sysconfig/httpd 
 </sxh>  </sxh> 
 +
  
 ==== Config files settings ====  ==== Config files settings ==== 
Line 310: Line 299:
 </codedoc> </codedoc>
  
-<sxh bash; highlight: [4,9,20,21,22,23]> +<sxh bash; highlight: [4,9,17,20,21,22,23]> 
 ### Keep the Include conf.modules.d/*.conf setting in the file, ### Keep the Include conf.modules.d/*.conf setting in the file,
 ### but append one line in front of it, so the result will be: ### but append one line in front of it, so the result will be:
Line 330: Line 319:
  
 # Place these three lines at the end of file # Place these three lines at the end of file
-EnableTrace Off+TraceEnable Off
 Include /opt/aaa/conf/aducid-aaa.conf Include /opt/aaa/conf/aducid-aaa.conf
 Include /opt/aaa/conf/aducid-aim.conf Include /opt/aaa/conf/aducid-aim.conf
Line 340: Line 329:
  
 <codedoc code:bash> <codedoc code:bash>
-cd /opt/rh/httpd24/root/etc/httpd/conf.modules.d/+cd /etc/httpd/conf.modules.d/
 mv 00-optional.conf 00-optional.conf.xxx mv 00-optional.conf 00-optional.conf.xxx
 mv 00-lua.conf 00-lua.conf.xxx mv 00-lua.conf 00-lua.conf.xxx
Line 346: Line 335:
 </codedoc> </codedoc>
    
-<codedoc code:bash> 
-vi 00-mpm.conf 
-</codedoc> 
 <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>