Differences

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

Link to this comparison view

Next revision
Previous revision
installation:software-components [2019/08/01 09:10]
tjotov created
installation:software-components [2019/11/18 12:02] (current)
mpospisek [Software Configuration]
Line 5: Line 5:
 ==== Software Installation ==== ==== Software Installation ====
  
-Configure repository: ​On CentOS: /​etc/​yum.repos.d/​CentOS-Base.repo, [base] and [updates] sections+Configure repository ​files to make sure correct software is installedModify [base] and [updates] sections of /​etc/​yum.repos.d/​CentOS-Base.repo  
 +<codedoc code:bash> 
 +vi /​etc/​yum.repos.d/​CentOS-Base.repo 
 +</​codedoc>​
 <sxh bash> <sxh bash>
 exclude=postgresql* exclude=postgresql*
 </​sxh>​ </​sxh>​
 +Next, get the packages and install them
 <codedoc code:​bash>​ <codedoc code:​bash>​
 yum install ~~codedoc:​clean:​https://​download.postgresql.org/​pub/​repos/​yum/​9.6/​redhat/​rhel-7-x86_64/​pgdg-redhat96-9.6-3.noarch.rpm~~ yum install ~~codedoc:​clean:​https://​download.postgresql.org/​pub/​repos/​yum/​9.6/​redhat/​rhel-7-x86_64/​pgdg-redhat96-9.6-3.noarch.rpm~~
Line 41: Line 44:
 ===== Java ===== ===== Java =====
 ==== Software Installation ==== ==== Software Installation ====
-**Experimentally you can omit this part**+We use OpenJDK 13. Get it and save the file in /opt directory ​
  
-//Oracle distribution policy has changed//+<codedoc code:​bash>​ 
 +cd /opt 
 +wget https://download.java.net/java/​GA/​jdk13/​5b8a42f3905b406298b72d750b6919f6/​33/​GPL/​openjdk-13_linux-x64_bin.tar.gz 
 +  
 +tar -xvf openjdk-13_linux-x64_bin.tar.gz 
 +</​codedoc>​
  
-Java 1.8.0_151+==== Software Configuration ====
  
-GET JAVA 1.8.0_151 JRE RPM from Oracle at \\ 
-http://​www.oracle.com/​technetwork/​java/​javase/​downloads/​java-archive-javase8-2177648.html \\ 
-or \\ 
-http://​download.oracle.com/​otn/​java/​jdk/​8u151-b12/​e758a0de34e24606bca991d704f6dcbf/​jre-8u151-linux-x64.rpm 
- 
-Newer versions of 1.8 will probably work, too. 
- 
-<sxh bash> 
-yum localinstall jre-8u151-linux-x64.rpm 
- 
-==== Software Configuration ==== 
-  
-alternatives --install /​usr/​bin/​java java /​usr/​java/​default/​bin/​java 180151 \ 
- ​--slave /​usr/​bin/​keytool keytool /​usr/​java/​default/​bin/​keytool ​            \ 
- ​--slave /​usr/​bin/​orbd orbd /​usr/​java/​default/​bin/​orbd ​                     \ 
- ​--slave /​usr/​bin/​pack200 pack200 /​usr/​java/​default/​bin/​pack200 ​            \ 
- ​--slave /​usr/​bin/​rmid rmid /​usr/​java/​default/​bin/​rmid ​                     \ 
- ​--slave /​usr/​bin/​rmiregistry rmiregistry /​usr/​java/​default/​bin/​rmiregistry \ 
- ​--slave /​usr/​bin/​servertool servertool /​usr/​java/​default/​bin/​servertool ​   \ 
- ​--slave /​usr/​bin/​tnameserv tnameserv /​usr/​java/​default/​bin/​tnameserv ​      \ 
- ​--slave /​usr/​bin/​unpack200 unpack200 /​usr/​java/​default/​bin/​unpack200 ​      \ 
- ​--slave /​usr/​lib/​jvm/​jre jre /​usr/​java/​default 
-  
-alternatives --config java 
-# select /​usr/​java/​default/​bin/​java 
-</​sxh>​ 
  
 ===== Tomcat ===== ===== Tomcat =====
  
 Tomcat 9.0.6 installation bash commands: Tomcat 9.0.6 installation bash commands:
-<sxh bash>+ 
 +<codedoc code:bash>
 # A | installation # A | installation
 cd ~ cd ~
Line 112: Line 95:
 chown -R tomcat /opt/tomcat chown -R tomcat /opt/tomcat
 chown -R tomcat /​opt/​apache-tomcat-9.0.6 chown -R tomcat /​opt/​apache-tomcat-9.0.6
 +</​codedoc> ​
    
-# D | install ​systemd unit file +Next, create ​systemd unit file 
-# create and open unit file service + 
-#vi /​usr/​lib/​systemd/​system/​tomcat9.service +<codedoc code:​bash>​ 
-echo \ +vi /​usr/​lib/​systemd/​system/​tomcat9.service 
-"[Unit]+</​codedoc>​ 
 + 
 +<​sxh> ​ 
 +[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 125: Line 112:
 Group=tomcat Group=tomcat
 Type=forking Type=forking
-Environment=JAVA_HOME=/​usr/java/​default +Environment=JAVA_HOME=/​opt/jdk-13
-#​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 121:
 [Install] [Install]
 WantedBy=multi-user.target"​ >/​usr/​lib/​systemd/​system/​tomcat9.service 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> ​ 
 +#!/bin/bash -x
 cd $CATALINA_BASE cd $CATALINA_BASE
-./​bin/​startup.sh" ​>/​opt/​tomcat/​bin/​tomcat-startup.sh+./​bin/​startup.sh 
 +</sxh
    
-/​opt/​tomcat/​bin/​tomcat-shutdown.sh +<codedoc code:​bash>​ 
-echo \ +vi /​opt/​tomcat/​bin/​tomcat-shutdown.sh 
-"#!/bin/bash -x+</​codedoc>​ 
 + 
 +<​sxh> ​ 
 +#!/bin/bash -x
 cd $CATALINA_BASE cd $CATALINA_BASE
-./​bin/​shutdown.sh" ​>/​opt/​tomcat/​bin/​tomcat-shutdown.sh+./​bin/​shutdown.sh 
 +</sxh
    
-/​opt/​tomcat/​bin/​setenv.sh +<​codedoc>​ 
-# 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 \ +*** IMPORTANT: ​Check validity of Xms-Xmx settings ​according ​in your environment *** 
-"CATALINA_OPTS="​-server ​+<​sxh> ​ 
- ​-Dcom.sun.management.jmxremote.port=8086 \ +CATALINA_OPTS="​-server  
- ​-Dcom.sun.management.jmxremote.ssl=false \ + ​-Djava.security.egd=file:/​dev/​./​urandom -Djava.awt.headless=true  
- ​-Dcom.sun.management.jmxremote.authenticate=false \ + ​-Xms2g -Xmx2g  
- ​-Djava.security.egd=file:/​dev/​./​urandom -Djava.awt.headless=true ​\ + ​-XX:​+UseG1GC  
- ​-Xms2g -Xmx2g ​\ + ​-XX:​+UseStringDeduplication  
- ​-XX:​+UseG1GC ​\ + ​-XX:​MaxGCPauseMillis=100
- ​-XX:​+UseStringDeduplication ​\ +
- ​-XX:​MaxGCPauseMillis=100 ​+
- "​ >/​opt/​tomcat/​bin/​setenv.sh +
- +
-# make the scripts executable +
-chmod +x /​opt/​tomcat/​bin/​*.sh+
 </​sxh> ​ </​sxh> ​
 + 
 +Make the scripts executable
 +<​codedoc> ​
 +chmod +x /​opt/​tomcat/​bin/​*.sh
 +</​codedoc>​
  
-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+Add ${catalina.home}/​conf to the common.loader values in the catalina.properties file and change ​the lines for jarsToSkip, jarsToScan ​to somewhat speed Tomcat startup
    
 <​codedoc> ​ <​codedoc> ​
 vi /​opt/​tomcat/​conf/​catalina.properties vi /​opt/​tomcat/​conf/​catalina.properties
 </​codedoc>​ </​codedoc>​
- 
 <sxh bash> ​ <sxh bash> ​
 common.loader="​${catalina.base}/​lib","​${catalina.base}/​lib/​*.jar","​${catalina.home}/​lib","​${catalina.home}/​lib/​*.jar","​${catalina.home}/​conf"​ common.loader="​${catalina.base}/​lib","​${catalina.base}/​lib/​*.jar","​${catalina.home}/​lib","​${catalina.home}/​lib/​*.jar","​${catalina.home}/​conf"​
Line 198: Line 191:
 rm -rf * rm -rf *
 </​codedoc>​ </​codedoc>​
- + 
 +Set up AJP connector for requests from Apache  
 +<codedoc code:​bash>​ 
 +vi /​opt/​tomcat/​conf/​server.xml 
 +</​codedoc>​ 
 +<sxh>  
 +    <!-- Define an AJP 1.3 Connector on port 8009 --> 
 +    <!-- ADUCID AJP options --> 
 +    <​Connector port="​8009"​ protocol="​AJP/​1.3"​ redirectPort="​8443"​  
 +    enableLookups="​false"​  
 +    acceptCount="​300" ​  
 +    keepAliveTimeout="​7000"​  
 +    connectionTimeout="​10000"​  
 +    URIEncoding="​UTF-8"​ /> 
 +</​sxh> ​  
 Optional: ​ Optional: ​
   * change the port of tomcat webserver in case of conflicts   * change the port of tomcat webserver in case of conflicts
   * search for <​Connector port="​8080"​ ...   * search for <​Connector port="​8080"​ ...
    
-# NOT used in this release 
-<codedoc code:​bash>​ 
-vi /​opt/​tomcat/​conf/​server.xml 
-  
-    <!-- ADUCID AJP options --> 
-    <​Connector port="​8009"​ protocol="​AJP/​1.3"​ enableLookups="​false"​ 
-      acceptCount="​300"​ redirectPort="​8443"​ 
-      keepAliveTimeout="​7000"​ connectionTimeout="​10000"​ URIEncoding="​UTF-8"​ /> 
-  ​ 
-</​codedoc>​ 
  
 ===== Apache ===== ===== Apache =====
Line 218: Line 216:
 CodeIT Apache 2.4 and related modules 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.
  
 Except for modules libnghttp2 and apr-util. They will be downloaded from the epel-release repository. Except for modules libnghttp2 and apr-util. They will be downloaded from the epel-release repository.
Line 280: Line 278:
 </​sxh> ​ </​sxh> ​
  
 +<codedoc code:​bash>​
 Modify /​etc/​sysconfig/​httpd Modify /​etc/​sysconfig/​httpd
 +</​codedoc>​
        
 <sxh bash> <sxh bash>
-echo 'LANG=C' >>/​etc/​sysconfig/​httpd +LANG=C 
-echo 'OPENAAA_PROTOCOL="​aaa"​' >>/​etc/​sysconfig/​httpd +OPENAAA_PROTOCOL="​aaa"​ 
-echo 'OPENAAA_HANDLER="/​usr/​local/​bin/​aducid"' >>/​etc/​sysconfig/​httpd +OPENAAA_HANDLER="/​usr/​local/​bin/​tlsbinder
-echo OPENAAA_AUTHORITY=\"`hostname`\" >>/​etc/​sysconfig/​httpd +OPENAAA_AUTHORITY=`hostname` ​
-tail -3 /​etc/​sysconfig/​httpd ​+
 </​sxh> ​ </​sxh> ​
  
Line 335: Line 334:
 </​codedoc>​ </​codedoc>​
    
-<sxh bash> ​+<codedoc code:bash> ​
 cat 00-mpm.conf | grep prefork cat 00-mpm.conf | grep prefork
 +# ... result should be:
 LoadModule mpm_prefork_module modules/​mod_mpm_prefork.so LoadModule mpm_prefork_module modules/​mod_mpm_prefork.so
-</sxh+</codedoc
    
-<sxh bash> +<codedoc code:bash> 
-echo \ +vi 00-proxy.conf 
-"# This file configures all the proxy modules:+</​codedoc>​  
 + 
 +<​sxh> ​ 
 +# 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 361:
 #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" > 00-proxy.conf ​+#LoadModule proxy_wstunnel_module modules/​mod_proxy_wstunnel.so ​ 
 </​sxh> ​ </​sxh> ​
    
Line 366: Line 369:
  
 <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 439: Line 441:
 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" > 00-base.conf+#LoadModule watchdog_module modules/​mod_watchdog.so
 </​sxh>​ </​sxh>​
  
  • installation/software-components.1564650600.txt.gz
  • Last modified: 2019/08/01 09:10
  • by tjotov