-
Notifications
You must be signed in to change notification settings - Fork 7
Deploy Report Engine Server on RHEL, CentOS and Fedora
###Install Postgres-server and create a Data base for Report Engine
Install postgres-server on RHEL/Fedora,
yum install postgres postgres-server -y
Init Database
service postgresql initdb
Start database service
service postgresql start
wget https://raw.github.com/jkandasa/report-engine/master/ReportEngine.sql psql -d reserver -U readmin -f ReportEngine.sql
Note: If you are running postgresql database server on remote machine, assign required privileges to access from remote.
###Place Mandatory files under user's home location
Download configuration file and extract it under user's home directory. Extracted directory will be listed under /.java/
######/.java/reportengine/ Directory Structure:
[hudson@mercury .java]$ tree ~/.java/reportengine/
/home/hudson/.java/reportengine/
|-- conf
| |-- log4j.properties
| `-- reportengine.properties
`-- logs
`-- ReportEngine.log
Update your database hostname, username and password in ~/.java/reportengine/conf/reportengine.properties #####Example:
# Database Configurations
JDBC.Driver=org.postgresql.Driver
JDBC.ConnectionURL=jdbc:postgresql://localhost:5432/reserver
JDBC.Username=readmin
JDBC.Password=readmin
###Setup Apache Tomcat Server Download and extract [Apache Tomcat 7] (http://tomcat.apache.org/download-70.cgi)
######Apache-Tomcat Directory Structure:
apache-tomcat-7.0.22
|-- bin
|-- conf
| `-- Catalina
| `-- localhost
|-- lib
|-- logs
|-- temp
|-- webapps
| `-- re
| `-- re.war
|
`-- work
###Deploy Report Engine war file in Apache Tomcat: Download Report Engine re.war file. Place re.war under apache-tomcat-7.0.22/wepapps/
######Start Apache-Tomcat server:
cd apache-tomcat-7.0.22/bin
./startup.sh
######Stop Apache-Tomcat server:
cd apache-tomcat-7.0.22/bin
./shutdown.sh
######Enabling https on Apache-Tomcat Server:
We have to generate Self-Signed certificate for HTTPS connection,
######Generate Self-Signed Certificate:
Use keytool
command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in the certificate’s detail.
[hudson@mercury jon]$ keytool -genkey -alias report-engine -keyalg RSA -keystore jeeva.redhat.com.keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: Report Engine
What is the name of your organizational unit?
[Unknown]: JBoss
What is the name of your organization?
[Unknown]: Red Hat, Inc
What is the name of your City or Locality?
[Unknown]: Bangalore
What is the name of your State or Province?
[Unknown]: Karnataka
What is the two-letter country code for this unit?
[Unknown]: IN
Is CN=Report Engine, OU=JBoss, O="Red Hat, Inc", L=Bangalore, ST=Karnataka, C=IN correct?
[no]: yes
Enter key password for <report-engine>
(RETURN if same as keystore password):
Re-enter new password:
[hudson@mercury jon]$ ls
jeeva.redhat.com.keystore
Copy jeeva.redhat.com.keystore file to apache-tomcat-7.0.22/conf/
cp jeeva.redhat.com.keystore /opt/applications/apache-tomcat-7.0.22/conf/
Once you done with self-signed certificate, add the details in apache-tomcat-7.0.22/conf/server.xml
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="conf/jeeva.redhat.com.keystore" keystorePass="password"
clientAuth="false" sslProtocol="TLS" />
**Note:**If you are using different port for https, do not forget to change it on http redirect port (redirectPort="8443"),
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Restart the Apache-Tomcat Server,
cd apache-tomcat-7.0.22/bin
# Stop the server
./shutdown.sh
# Start the server
./startup.sh
#####Would you like to Enable debug log level? Change INFO->DEBUG in ~/.java/reportengine/conf/log4j.properties file.
You can watch logs under ~/.java/reportengine/logs/