Jump to content
  • This documentation is an older version of JasperReports Server Installation Guide - Community Edition. View the latest documentation.

    JasperReports Server requires a database in order to run. The installer is pre-configured to run with the PostgreSQL database. There are two options available for your PostgreSQL database:

    I want to use the bundled PostgreSQL database
    I want to use an existing PostgreSQL database

    Choosing the Bundled PostgreSQL

    If you choose the option to install the bundled PostgreSQL, the installer puts PostgreSQL 9 onto your system. The default PostgreSQL port 5432 will be used. If the installer finds that port 5432 is already in use, you are prompted to pick an alternate port. In this case, choose an alternative port value. The installer sets the PostgreSQL administrator password to postgres and also creates a PostgreSQL database user with administrator privileges and credentials of jasperdb/password.

    The following table summarizes the parameters set during installation of the bundled PostgreSQL:

    Parameter

    Default Value and Description

    Binary Directory

    The directory where the postgres and pgAdmin3 binaries are located.

    Port

    The port number that PostgreSQL uses (default is 5432). User must choose an alternate port if 5432 is in use.

    IP or Host Name

    The IP address or name of the machine where PostgreSQL is installed. The default value is 127.0.0.1.

    PostgreSQL Administrative Password

    Password of the database administrative user: postgres. The installer cannot handle special characters at the end of a password string. Incompatible characters include: & ; $

    Database User Name

    Hard coded default: jasperdb - The installer creates this user which is used to connect to the JasperReports Server database

    Database User Password

    Hard coded default: password - The installer uses this password for the jasperdb user.

    Additional notes for Linux

    If your Linux installation does not have a locale setting that supports UTF-8 encoding, your Bundled PostgreSQL instance will be initialized using a temporary locale (--locale=C). This will allow the PostgreSQL initdb to succeed with the desired UTF-8 database encoding.

    Choosing an Existing PostgreSQL on a Local Host

    If you choose the option to use an existing PostgreSQL database, you are eventually prompted for the location of PostgreSQL and the port to use. If you have an instance of PostgreSQL installed locally, accept the default, which is 127.0.0.1, the localhost. Accept the default location for the PostgreSQL bin directory, or click Browse to locate and select another location. You are also prompted for the default administrative account password of the PostgreSQL administrative user. The database administrative user account name postgres is used by default. Enter the database administrative user password and click Enter.

    note-icon-ns_28x28.png.3ddbe3864711da697632d4315e711bb6.png

    If the installer displays an error message saying FATAL: password authentication failed for user postgres, try re‑entering the administrative password for your PostgreSQL database.

    The following table summarizes the parameters set during the installation of an existing PostgreSQL:

    Defaults Used Hardcoded Default Values Used or Created

    PostgreSQL Administrative User Name

    postgres - The default administrative database user.

    jasperserver Database User Name

    jasperdb - The installer creates this database user which is used to connect to jasperserver database.

    jasperserver Database User Password

    password - The installer creates this password for the jasperdb database user.

    warning-icon-ns_28x28.png.f77691864c5de85950711fd39a10311e.png

    To improve system security, Jaspersoft recommends that you change the default password for jasperdb as soon as possible. To change the jasperdb connection password in JasperReports Server, edit: <js-install>/apache‑tomcat/jasperserver/META-INF/context.xml. (And delete, if it exists: <js-install>/apache-tomcat/conf/Catalina/localhost/jasperserver.xml.) Then, make the same change in PostgreSQL using pgAdmin III or psql.

    Using an Existing PostgreSQL on a Remote Host

    If you are installing to a remote instance of PostgreSQL, you need the PostgreSQL client tools on your local machine. The version of client tools should match the remote PostgreSQL version. You can check the version of PostgreSQL instance by entering this command on the computer where it’s installed:

    psql --version

    or

    <path-to-postgresql-bin-folder>/psql --version

    For instance: C:/Jaspersoft/PostgreSQL/9.0/bin/psql --version

    To verify that you can connect to the target remote PostgreSQL from the local installation machine:

    1. If necessary, install PostgreSQL client tools on your local, JasperReports Server machine.
    2. Using your local PostgreSQL client tools, enter this command:

    psql -U postgres -h <remote-host> -d postgres

    or

    <path-to-postgresql-bin-folder>/psql -U postgres -h <remote-host> -d postgres

    You might also need to enable connections as described in the next section.

    Enabling Connections to a Remote Host

    On most platforms, the default PostgreSQL installation doesn’t allow remote connections (as a security feature). You need to enable remote connections as described in this documentation:

    The PostgreSQL configuration documentation on the PostgreSQL web site
    The docs directory of your PostgreSQL installation

    To enable connections from the installation machine to the remote PostgreSQL server:

    1. Locate the following PostgreSQL host-based authentication (hba) configuration file on the remote PostgreSQL server instance:

    Windows: C:Program FilesPostgreSQL9.0datapg_hba.conf

    Linux: /var/lib/pgsql/data/pg_hba.conf

    2. Add the IP address of your local JasperReports Server installation machine to this file. For example, to allow the local installation machine with address 192.168.12.10 to connect to the PostgreSQL server, add this entry to the pg_hba.conf file:

    host all 192.168.12.10/32 trust

    3. Allow TCP/IP connections to the remote PostgreSQL server instance by making the following change to the postgresql.conf file on the remote machine:

    From: listen_addresses = 'localhost'

    To: listen_addresses = '*'

    4. Restart PostgreSQL.
    5. Using your local PostgreSQL client tools, verify that you can connect to the target remote PostgreSQL from the local installation machine, as described in Using an Existing PostgreSQL on a Remote Host.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...