Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

These are instructions for flex.bi Enterprise 6.0 and later. For earlier version please contact flex.bi support.

On this page:

...

System Requirements

Information about system requirements for flex.bi Enterprise installation can be found here: Requirements.

Note

Make sure you have set up server entropy to avoid your server from being slow and unresponsive. See our guide for  Setting up server entropy using Haveged.

...

MySQL Server installation

The CentOS 8 AppStream repository only contain MySQL 8.0 packages, so, to install MySQL 5.7, we need to do some prep-work.

  1. Disable MySQL default AppStream repository.

    Code Block
    sudo dnf remove @mysql
    sudo dnf module reset mysql && sudo dnf module disable mysql


  2. Create a new repository file..

    Code Block
    sudo vi /etc/yum.repos.d/mysql-community.repo


  3. Paste the following dat into the new repo file.

    Code Block
    [mysql57-community]
    name=MySQL 5.7 Community Server
    baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
    enabled=1
    gpgcheck=0
    
    [mysql-connectors-community]
    name=MySQL Connectors Community
    baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
    enabled=1
    gpgcheck=0
    
    [mysql-tools-community]
    name=MySQL Tools Community
    baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/
    enabled=1
    gpgcheck=0


  4. Disable MySQL 8 repository.

    Code Block
    sudo dnf config-manager --disable mysql80-community


  5. Enable repository for MySQL 5.7.

    Code Block
    sudo dnf config-manager --enable mysql57-community


  6. Install MySQL 5.7.

    Code Block
    sudo dnf install mysql-community-server


...

  1. If you have large amount of records, we suggest to adjust the database engine performance by editing /etc/my.cnf file using appropriate values.
    The following is an example of a good performance configuration that you can insert under the [mysqld] part of the configuration file:

    Code Block
    innodb_buffer_pool_size = 1024M
    innodb_log_file_size = 256M
    query_cache_size= 16M
    query_cache_type = 1
    max_connections = 200


    Note

    If you change the log file size after starting the MySQL server, you have to delete id_logfile0 and id_logfile1 file from /var/lib/mysql directory.


    Note

    Adjust the innodb_buffer_pool_size to a level that you can actually afford on your server, taking into account Java and other application memory need


  2. Run the following command to start MySQL Server and ensure that it will be automatically started during server startup:

    Code Block
    systemctl enable --now mysqld.service


  3. Run the following command, to get the automatically generated MySQL Server root user password:

    Code Block
    sudo grep 'A temporary password' /var/log/mysqld.log |tail -1


  4. Make note of the password shown on screen.

  5. Start MySQL Secure Installation to change the root password, Disallow root login remotely, remove anonymous users and remove test database.

    Code Block
    sudo mysql_secure_installation



  6. Connect to MySQL Database as root user, using the new password.

    Code Block
    mysql -u root -p


  7. Run the following commands, to create a flex.bi user named flexbi_private: (Exchange secret with the actual password you want to use.)

    Code Block
    CREATE USER 'flexbi_private'@'localhost' IDENTIFIED BY 'secret';
    GRANT ALL PRIVILEGES ON `flexbi_private%`.* TO 'flexbi_private'@'%' IDENTIFIED BY 'secret';
    FLUSH PRIVILEGES;


Firewall configuration

By default flex.bi Enterprise runs on the port 8080, so you should open ths port in your firewall.
To do this, follow these instructions:

  1. Run the following command to open the port 8080:

    Code Block
    firewall-cmd --permanent --add-port=8080/tcp


  2. Run the following command to reload the firewall:

    Code Block
    firewall-cmd --reload


  3. Run the following command to check if the port is open:

    Code Block
    firewall-cmd --list-ports


Google Chrome Installation

flex.bi uses Google Chrome for report exports, so for this feature to work you have to install Google Chrome.
Do do this, follow these instructions:

...

The main tool for flex.bi Enterprise configuration is the Configure the eazybi.toml file located in the /config folder in your flex.bi direcotry.

  1. Run the following command, to copy the eazybi.toml.sample file in the /config folder to a new file named eazybi.toml:

    Code Block
    cp /home/flexbi/flexbi_private/config/eazybi.toml.sample /home/flexbi/flexbi_private/config/eazybi.toml


  2. In a text editor of your choice, open the newly created eazybi.toml file and make the necessary configurations:

    1. Add licence information:

      Code Block
      [license]
      name = "Organization name"
      key = """
      Paste license key here
      """


    2. Configure general parameters, like, time zone, user registration, account creation etc.

      Code Block
      [general]
      # By default local server time zone will be used. Specify different if necessary.
      # time_zone = "Europe/Riga"
      
      # Uncomment to allow account creation only to system admins.
      # disable_account_creation = true
      
      # Uncomment to disable user registration.
      # disable_user_registration = true
      ......


    3. Specify default URL parameters like host and port for accessing your flex.bi Enterprise installation:

      Code Block
      [default_url_options]
      # This example is for the default http://localhost:8080 URL.
      host = "localhost"
      port = 8080
      # This example is for the https://example.com URL.
      # host = "example.com"
      # protocol = "https"


    4. Specify Mailer parameter, to set the e-mail address that will be used as the sender address for communication from the flex.bi Enterprise.

      Code Block
      [mailer]
      from = "noreply@example.com"


    5. Configure SMPT parameters for sending out e-mails from flex.bi Enterprise.

      Code Block
      [mailer.smtp]
      # address = "smtp.gmail.com"
      # port = "587"
      # domain = "example.com"
      # user_name = "noreply@example.com"
      # password = "secret"
      # authentication = "plain"
      # enable_starttls_auto = true


  3. Add a systemd initialization script for starting flex.bi service.
    1. Copy the sample initialization script from the /bin/systemd directory of the flex.bi installation folder to the /etc/systemd/system/ directory in your server.

      Code Block
      cp /home/flexbi/flexbi_private/bin/systemd/flexbi.service /etc/systemd/system/


    2. Open the file with a text editor of your choice and adjust the configuration to your needs.

      Code Block
      # Sample init script for flex.bi
      [Unit]
      Description=flex.bi reporting service
      After=syslog.target network.target
      [Service]
      Type=simple
      # Run the service as this user and group
      User=flexbi
      Group=flexbi
      TimeoutSec=30
      # Remember to change /home/flexbi/flexbi_private to the actual home directory of flex.bi in all places
      WorkingDirectory=/home/flexbi/flexbi_private
      Environment="RAILS_ENV=production"
      Environment="EAZYBI_HOME=/home/flexbi/flexbi_private"
      Environment="EAZYBI_PREFIX=/flexbi"
      Environment="RUBYOPT=-W0"
      # Adjust to available memory
      Environment="JAVA_OPTS=-Xmx1024m -Xms256m -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dorg.eclipse.jetty.LEVEL=OFF -Djava.io.tmpdir=/home/flexbi/flexbi_private/tmp"
      
      # Default configuration
      ExecStart=/usr/bin/java $JAVA_OPTS -Dwarbler.host=localhost -Dwarbler.port=8080 -jar flexbi_private.jar
      
      
      Restart=on-failure
      StandardOutput=syslog
      StandardError=syslog
      SyslogIdentifier=flexbi
      #LimitNOFILE=10000
      [Install]
      WantedBy=multi-user.target


  4. Run the following command to start flex.bi service and ensure it is started during server startup:

    Code Block
    systemctl enable --now flexbi.service


  5. To ensure secure connection using https protocol, follow instructions in our documentation page HTTPS or SSL setup.
  6. Once the flexbi.service is started, you should be able to open the previously configured URL in your browser and start using flex.bi Enterprise.

...