OpenI-Jasper‎ > ‎Installation Guide‎ > ‎

Database Configuration

Configure the database

  • Execute the SQL script to create necessary database structure

OpenI-Jasper distribution is bundled with a SQL script (sampledb.sql) to create the necessary databases and tables in the database system and also, dumps the sample data for running the sample reports. Unzip the sampledb.zip file under the folder "sampledata" to extract the SQL script.

Please run the following mysql command from the terminal shell to execute the sql script (Note: OpenI-Jasper assumes that mysql server is successfully installed and the mysql executables are set in the environment variables to have global access)

mysql -u <<username>> -p <<password>> -h <<hostname>>  < << path to the sql script>>

The script creates three databases in the database server namely, jasperserver, sugarcrm and foodmart.

  • Configure JNDI Datasources

OpenI-Jasper requires the properly configured JNDI datasources (jdbc/jasperserver, jdbc/sugarcrm and jdbc/foodmart), which it does by specifying in the context.xml file located under "<<openi jasper project>>/META-INF" folder location. These JNDI datasources are pre-configured to use the default user" openijasperdb" with password "password". So, you need to create a database user "openijaserperdb" in your database server, by logging into the mysql console and executing the following command.

mysql > CREATE USER 'openijasperdb'@'localhost' identified by 'password';
mysql> GRANT ALL PRIVILEGES ON jasperserver.* to 'openijasperdb';
mysql> GRANT ALL PRIVILEGES ON sugarcrm.* to 'openijasperdb';
mysql> GRANT ALL PRIVILEGES ON foodmart.* to 'openijasperdb';

You can you have your custom jndi datasources configuration in the context.xml file of the tomcat container itself.


Comments