Manually Creating the JasperReports Server Database

If you can’t use the js-install scripts to create the JasperReports Server database and the sample databases, you can create them manually. Follow the instructions for your database to create the repository database and optional sample databases:

PostgreSQL
MySQL

The commands in these sections have been tested at Jaspersoft, but the commands you need to use on your database instance may be different.

For running the Ant commands, you need to edit the default_master.properties file to add the settings for your database and application server as described in Installing the WAR File Using js-install Scripts.

PostgreSQL

To manually create the JasperReports Server database in PostgreSQL:

1. On the Windows, Linux, or Mac command line, enter these commands:
cd <js-install>/buildomatic/install_resources/sql/postgresql
psql -U postgres -W
postgres=#create database jasperserver encoding=’utf8’;
postgres=#\c jasperserver;
postgres=#\i js-create.ddl
postgres=#\i quartz.ddl
postgres=#\q
2. Run the following commands to install the JSAudit database:
cd <js-install>/buildomatic/install_resources/sql/postgresql
psql -U postgres -W
postgres=#create database jsaudit;
postgres=#\c jsaudit;
postgres=#\i js-pro-create-audit.ddl
postgres=#\q
3. (Optional) Run the following commands if you want to install sample databases:
cd <js-install>/buildomatic/install_resources/sql/postgresql
psql -U postgres -W
postgres=#create database sugarcrm encoding=’utf8’;
postgres=#create database foodmart encoding=’utf8’;
postgres=#\c sugarcrm;
postgres=#\i sugarcrm.sql; (first make sure the file is unzipped)
postgres=#\c foodmart;
postgres=#\i foodmart-postqresql.sql; (first make sure the file is unzipped)
postgres=#\i supermart-update.sql;
postgres=#\q
4. If you didn't install the optional sample databases, complete the installation with these commands:

cd <js-install>/buildomatic

js‑ant import-minimal-ce

js-ant deploy-webapp-ce

If you installed the optional sample databases, complete the installation with these commands:

cd <js-install>/buildomatic

js‑ant import-sample-data-ce

js-ant deploy-webapp-ce

For more information about executing the Ant scripts, see Installing the WAR File Manually.

5. Set Java JVM Options (required), as described in Setting JVM Options for Application Servers.

MySQL

To manually create the JasperReports Server database in MySQL:

You can use the MySQL client software, mysql.exe or mysql, to interact with the MySQL database.

For specific details on connecting to the MySQL database and setting privileges for databases and db users, please refer to the documentation provided with your database.

1. On the Windows, Linux, or Mac command line, enter the following commands to create and initialize the JasperReports Server database.
cd <js-install>/buildomatic/install_resources/sql/mysql
mysql -u root -p
mysql>create database jasperserver character set utf8;
mysql>use jasperserver;
mysql>source js-create.ddl
mysql>source quartz.ddl
mysql>exit
2. Run these commands to create and initialize the JSAudit database.
mysql -u root -p
mysql>create database jsaudit;
mysql>use jsaudit;
mysql>source js-pro-create-audit.ddl
mysql>exit
3. (Optional) Run these commands to install sample databases:
cd <js-install>/buildomatic/install_resources/sql/mysql
mysql -u root -p
mysql>create database sugarcrm;
mysql>create database foodmart;
mysql>use sugarcrm;
mysql>source sugarcrm.sql;(first make sure the file is unzipped)
mysql>use foodmart;
mysql>source foodmart-mysql.sql; (first make sure the file is unzipped)
mysql>source supermart-update.sql;
mysql>exit
4. If you didn't install the optional sample databases, complete the installation with these commands:

cd <js-install>/buildomatic

js‑ant import-minimal-ce

js-ant deploy-webapp-ce

If you installed the optional sample databases, complete the installation with these commands:

cd <js-install>/buildomatic

js‑ant import-sample-data-ce

js-ant deploy-webapp-ce

For more information about executing the Ant scripts, see Installing the WAR File Manually.

5. Set Java JVM Options (required), as described in Setting JVM Options for Application Servers.