Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
tutorial:adm:czechidm_installation [2019/03/13 11:25] urbanl old revision restored (2018/11/09 14:11) |
tutorial:adm:czechidm_installation [2019/03/18 14:46] urbanl new tomcat instalation |
||
---|---|---|---|
Line 35: | Line 35: | ||
and restart PostgreSQL. | and restart PostgreSQL. | ||
</ | </ | ||
- | ==== 2. JDBC driver installation | + | ==== 2. JDBC driver installation ==== |
+ | **CentOS** | ||
Install the package with PostgreSQL JDBC driver: | Install the package with PostgreSQL JDBC driver: | ||
Line 47: | Line 47: | ||
<code bash> | <code bash> | ||
- | ln -s / | + | ln -s / |
</ | </ | ||
- | ==== 3. JDBC driver installation - Debian | + | **Debian** |
Install the package with PostgreSQL JDBC driver: | Install the package with PostgreSQL JDBC driver: | ||
Line 64: | Line 63: | ||
ln -s / | ln -s / | ||
</ | </ | ||
- | ==== 4. Configure environment properties. Select application profile ==== | + | ==== 3. Configure environment properties. Select application profile ==== |
- | Edit the configuration file ''/ | + | Edit tomcat |
< | < | ||
Line 74: | Line 73: | ||
</ | </ | ||
- | Change | + | Use '' |
<code bash> | <code bash> | ||
Environment=' | Environment=' | ||
Line 83: | Line 82: | ||
</ | </ | ||
- | Reload | + | On CentOS reload |
<code bash> | <code bash> | ||
systemctl daemon-reload | systemctl daemon-reload | ||
</ | </ | ||
- | + | ==== 4. Create CzechIdM configuration folders ==== | |
- | ==== 5. Create CzechIdM configuration folders ==== | + | |
In CzechIdM, you can store all deployment-specific configuration (i.e. database credentials) outside the war file. This is a configure-once approach which greatly simplifies future deployments. | In CzechIdM, you can store all deployment-specific configuration (i.e. database credentials) outside the war file. This is a configure-once approach which greatly simplifies future deployments. | ||
* The **etc** directory stores configuration files. | * The **etc** directory stores configuration files. | ||
Line 94: | Line 92: | ||
* The **backup** directory stored Groovy scripts backups. | * The **backup** directory stored Groovy scripts backups. | ||
* The **data** directory stores various user-attached files. | * The **data** directory stores various user-attached files. | ||
+ | * The **app** directory stores war files. | ||
+ | * | ||
Create the directory structure: | Create the directory structure: | ||
< | < | ||
- | mkdir -p / | + | mkdir -p / |
</ | </ | ||
- | ==== 6. Create CzechIdM configuration ==== | + | |
+ | |||
+ | ==== 5. Create CzechIdM configuration ==== | ||
Now we will create configuration files the CzechIdM will use. | Now we will create configuration files the CzechIdM will use. | ||
< | < | ||
Line 328: | Line 329: | ||
</ | </ | ||
- | ==== Set correct permissions on CzechIdM files ==== | + | |
+ | |||
+ | ==== 6. Set correct permissions on CzechIdM files ==== | ||
+ | **CentOS** | ||
< | < | ||
chown tomcat: | chown tomcat: | ||
- | chown -R tomcat: | + | chown -R tomcat: |
- | chown tomcat: | + | chmod 750 / |
- | chmod 750 / | + | |
chmod 640 / | chmod 640 / | ||
</ | </ | ||
- | ==== Adjust Tomcat' | + | **Debian** |
+ | < | ||
+ | chown tomcat8: | ||
+ | chown -R tomcat8: | ||
+ | chmod 750 / | ||
+ | chmod 640 / | ||
+ | </ | ||
+ | ==== 7. Adjust Tomcat' | ||
Apache Tomcat has to know where the new configuration is. Because CzechIdM uses SpringBoot project, we simply add the **/ | Apache Tomcat has to know where the new configuration is. Because CzechIdM uses SpringBoot project, we simply add the **/ | ||
- | Create new file **/opt/tomcat/current/ | + | Add this line with this comand '' |
+ | < | ||
+ | Environment=' | ||
+ | </ | ||
+ | On **Debian** create new file '' | ||
+ | < | ||
CLASSPATH=/ | CLASSPATH=/ | ||
</ | </ | ||
- | And change owner of the file to tomcat:< | + | And change owner of the file to tomcat: |
- | chown root:tomcat /opt/tomcat/current/ | + | < |
+ | chown root:tomcat /usr/share/tomcat8/ | ||
</ | </ | ||
- | + | ==== 8. Create dedicated Java truststore ==== | |
- | ==== Create dedicated Java truststore ==== | + | |
Java truststore is a file which contains SSL certificates which we consider trusted. Usually this means some certificates of end systems or their respective certificate authorities. | Java truststore is a file which contains SSL certificates which we consider trusted. Usually this means some certificates of end systems or their respective certificate authorities. | ||
When we need CzechIdM to communicate with some new system with SSL-encrypted way, we need to import particular certificate here and restart the Tomcat container. | When we need CzechIdM to communicate with some new system with SSL-encrypted way, we need to import particular certificate here and restart the Tomcat container. | ||
Line 373: | Line 388: | ||
systemctl restart tomcat.service | systemctl restart tomcat.service | ||
</ | </ | ||
- | ==== Deploy the CzechIdM ==== | + | ==== 9. Deploy the CzechIdM ==== |
- | Download the latest CzechIdM version. Currently it is idm-app-7.6.1.war. | + | Download the latest CzechIdM version. Currently it is idm-app-9.4.0.war. |
- | Ensure Tomcat is stopped:< | + | |
+ | **CentOS** | ||
+ | |||
+ | Ensure Tomcat is stopped: | ||
+ | < | ||
systemctl stop tomcat.service | systemctl stop tomcat.service | ||
</ | </ | ||
- | Copy the identity manager WAR into webapps folder in Tomcat and name it **idm.war**:< | + | Copy the identity manager WAR into webapps folder in Tomcat and name it **idm.war**: |
- | cp idm-app-7.6.1.war / | + | < |
+ | cp idm-app-9.4.0.war /opt/czechidm/ | ||
+ | chown tomcat:tomcat /opt/czechidm/ | ||
</ | </ | ||
Start the Tomcat container:< | Start the Tomcat container:< | ||
systemctl start tomcat.service | systemctl start tomcat.service | ||
</ | </ | ||
+ | If everything is set up right, the CzechIdM will deploy. Default log is **/ | ||
- | If everything is set up right, the CzechIdM will deploy. Default log is **/opt/tomcat/ | + | **Debian** |
- | ===== Allow network services | + | |
+ | Ensure Tomcat is stopped: | ||
+ | < | ||
+ | systemctl stop tomcat8.service | ||
+ | </ | ||
+ | Copy the identity manager WAR into webapps folder in Tomcat and name it **idm.war**: | ||
+ | < | ||
+ | cp idm-app-9.4.0.war / | ||
+ | chown tomcat8: | ||
+ | </ | ||
+ | Start the Tomcat container:< | ||
+ | systemctl start tomcat8.service | ||
+ | </ | ||
+ | If everything is set up right, the CzechIdM will deploy. Default log is **/var/log/tomcat8/ | ||
+ | |||
+ | ==== 10. Final Steps ==== | ||
+ | === Allow network services === | ||
Firewall may restrict the access to all port except ssh (22/tcp). To be able to use CzechIdM, allow port 443/tcp and reload firewalld: | Firewall may restrict the access to all port except ssh (22/tcp). To be able to use CzechIdM, allow port 443/tcp and reload firewalld: | ||
Line 394: | Line 432: | ||
</ | </ | ||
- | ===== Change default admin password | + | === Change default admin password === |
In the fresh CzechIdM installation, | In the fresh CzechIdM installation, | ||
- | ===== Configure IdM ===== | + | === Configure IdM === |
Follow some final configuration steps: [[tutorial: | Follow some final configuration steps: [[tutorial: | ||
+ | |||
+ | === Known Isues === | ||
+ | It is possible that, on some distros, SELinux will deny acces to the database for tomcat. The tomcat will error to the ''/ | ||
+ | |||
+ | If this happens, set the permissive mode for tomcat: | ||
+ | < | ||
+ | semanage permissive -a tomcat_t | ||
+ | </ | ||
+ | |||
+ | <note warning> | ||
+ | Evaluate impact of SELinux adjustments **before** you implement them. Proper mitigation heavily depends on habits and security policies of your organization. | ||
+ | |||
+ | There are some possibilities: | ||
+ | * Set permissive mode for logrotate as above. | ||
+ | * Set permissive mode for whole SELinux. (This will drop the SELinux' | ||
+ | * Adjust particular SELinux labels. Example ([[https:// | ||
+ | </ |