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/19 13:57]
mpospisek [Java]
documentation:server-install-components [2019/01/27 08:02]
mpospisek [Tomcat]
Line 2: Line 2:
  
 ===== PostgreSQL ===== ===== PostgreSQL =====
 +
 +==== Software Installation ====
  
 Configure repository: On CentOS: /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections Configure repository: On CentOS: /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections
Line 18: Line 20:
 </codedoc> </codedoc>
  
 +==== DB configuration ====
 Roles after installation Roles after installation
 <codedoc code:bash> <codedoc code:bash>
Line 31: Line 34:
 </sxh> </sxh>
  
-PGSQL optimalizations are TBD+<codedoc code:bash> 
 +logout 
 +</codedoc> 
 + 
 ===== Java ===== ===== Java =====
 +==== Software Installation ====
 +**Experimentally you can omit this part**
 +
 +//Oracle distribution policy has changed//
  
 Java 1.8.0_151 Java 1.8.0_151
 +
 GET JAVA 1.8.0_151 JRE RPM from Oracle at \\ GET JAVA 1.8.0_151 JRE RPM from Oracle at \\
 http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html \\ http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html \\
Line 44: Line 56:
 <sxh bash> <sxh bash>
 yum localinstall jre-8u151-linux-x64.rpm yum localinstall jre-8u151-linux-x64.rpm
 +
 +==== Software Configuration ====
    
 alternatives --install /usr/bin/java java /usr/java/default/bin/java 180151 \ alternatives --install /usr/bin/java java /usr/java/default/bin/java 180151 \
Line 62: Line 76:
 ===== Tomcat ===== ===== Tomcat =====
  
-Tomcat 9.0.6 installation +Tomcat 9.0.6 installation bash commands: 
-<codedoc code:bash>+<sxh bash>
 # A | installation # A | installation
 cd ~ cd ~
 mkdir development mkdir development
 cd development cd development
-wget ~~codedoc:clean:https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.6/bin/apache-tomcat-9.0.6.tar.gz~~+wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.6/bin/apache-tomcat-9.0.6.tar.gz
  
 # install tomcat to the /opt/tomcat directory # install tomcat to the /opt/tomcat directory
Line 101: 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 
-</codedoc> +echo \ 
- +"[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 114: 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 121: 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 160: 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 211: Line 215:
  
 ===== Apache ===== ===== Apache =====
-** CodeIT Apache 2.4 and related modules**+==== Software Installation ==== 
 +CodeIT Apache 2.4 and related modules
  
 Download CodeIT Apache 2.4.25 (NOT NEWER) RPMs from %%https://repo.codeit.guru/packages/centos/7/x86_64/%%. Put them into selected directory (/root/apache/CodeIT) and from it yum localinstall one module after another, to prevent installation from external repositories. Download CodeIT Apache 2.4.25 (NOT NEWER) RPMs from %%https://repo.codeit.guru/packages/centos/7/x86_64/%%. Put them into selected directory (/root/apache/CodeIT) and from it yum localinstall one module after another, to prevent installation from external repositories.
Line 247: Line 252:
 </codedoc> </codedoc>
  
-**Set system variables used by Apache**+==== System variables setting ====
    
 <codedoc code:bash> <codedoc code:bash>
Line 274: 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> 
  
-**.conf files settings** + 
 +==== Config files settings ==== 
  
 They are in /etc/httpd. They are in /etc/httpd.
Line 295: 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 315: 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 325: 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 331: 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 358: 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 366: 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 438: 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>
  
 +==== Further steps ====
 **Prepare SSL certificates** **Prepare SSL certificates**