1.3.4. Install and customize Tomcat server
The Apache Tomcat server will serve as the execution environment for various web applications and services. Within this system will be housed the following applications:
1. Certificate Manage
2 . b+ SII Dashboard
3. Dashboard web services
4. Tenant configuration of the integration system
- Download Tomcat 8
We create support scripts for Tomcat 8 to facilitate the start and stop operations of the server.
1- Download Apache Tomcat 8 | |
Filename: Download Apache Tomcat 8.5.11: | |
apache-tomcat-8.5.11.tar.gz | |
2- Instalación de Apache Tomcat 8 | |
The contents of the compressed are extracted in ~/sii/tomcat/ | |
3- Change the admin password for Apache Tomcat 8 | |
Edit the Tomcat user configuration file and change the password to change it | vim ~/sii/tomcat/apache-tomcat-8.5.11/conf/tomcat-users.xml |
Contens of tomcat-users.xml | |
(...) |
- Creating support scripts for Tomcat 8
Creating support scripts for Tomcat 8
1- Create files to fill | |
cd ~ | |
2- Fill in the scripts with their respective contents | |
Contents of ~/bin/startTomcat8511 | |
#!/bin/bash | |
Contents of ~/bin/stopTomcat8511 | |
#!/bin/bash | |
3- Add alias for scripts to: .bashrc | |
Edit ~/.bashrc y añadir las siguientes líneas | alias STARTTOMCAT8511='/bin/bash $HOME/bin/startTomcat8511' |
Booting Tomcat 8
1- Test Boot and Pause Scripts for Tomcat.
Booting Tomcat allows you to create the localhost folder:
~/sii/tomcat/apache-tomcat-8.5.11/conf/Catalina/localhost2- To allow access from any network
Edit the manager.xml file in the directory, for remote access:
~/sii/tomcat/apache-tomcat-8.5.11/conf/Catalina/localhostContenidos de manager.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF)
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<!-- The contents of this file will be loaded for each web application -->
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.$"* />
</Context>3- Edit the server configuration
We change the ports used by default to secure the serverEdit file:
/home/fuseadmin/sii/tomcat/apache-tomcat-8.5.11/conf/server.xml
It is replaced by text editor, replacing all instances of ort = "8 for ort =" 9. Changing all ports starting with 8 to ports starting with 9
In vim it can be done with the following command:
:%s/ort="8/ort="9/gAdditional settings for Tomcat
1- Stop and replicate host_manager and examples, so you can remove them
2- Block access to the application, allowing only access from localhost.
3- IPV6 is disabled as described at https://access.redhat.com/solutions/8709
4- IPV6 is disabled at file /etc/sysconfig/network/ifcfg-eth0
5- Add the following lines a/etc/default/grub
6- Enable configuration changes
grub2-mkconfig -o /boot/grub2/grub.cfg
Avvale 2024