Versions Compared

Key

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


Note

These are instructions for flex.bi private 3.0 and later. For earlier version please contact our support.

...

    • Create a new file named flexbi.service in the /etc/systemd/system directory using a text editor or copy the provided example file from the flex.bi server package folder bin/systemd. Configure the file like this (adjust the configuration to your particular case):

      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"
      Environment="EAZYBI_HOST=localhost"
      Environment="EAZYBI_PORT=8080"
      
      # 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


    • Check and adjust the necessary parameters, such as user, group and working directory, in the example, as they can differ from your setup.

      Note

      If you have changed the configuration after the flex.bi service has been started, run the following code:

      Code Block
      systemctl daemon-reload



    • If you don't use any proxy web server to route web requests to flex.bi, you need to enable public access, because by default flex.bi will answer requests only from localhost. In order to do that, in the flexbi.service file, add a comment symbol (#) before this line:

      Code Block
      ExecStart=/usr/bin/java $JAVA_OPTS "${JAVA_TMPDIR}" -jar flexbi_private.jar -e production "$@"


      and remove the comment symbol (#) from this line:

      Code Block
      # ExecStart=/usr/bin/java $JAVA_OPTS "${JAVA_TMPDIR}" -jar flexbi_private.jar -e production -b 0.0.0.0  "$@"


...

  • Open the port 8080 in your firewall to allow remote access to the flex.bi server:
    • Run the following command to open the port 8080:

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


    • Run the following command to reload the firewall:

      Code Block
      firewall-cmd --reload


    • Run the following command to check if the port is open:

      Code Block
      firewall-cmd --list-ports


Google Chrome

  • If you have installed and configured PhantomJS for previous flex.bi enterprise versions then remove PhantomJS settings from the eazybi.toml file by deleting the following lines:

    Code Block
    [phantomjs]location = "..."


  • Run the following command to enable Google YUM repository:

    Code Block
    cat << EOF > /etc/yum.repos.d/google-chrome.repo
    [google-chrome]
    name=google-chrome - \$basearch
    baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch
    enabled=1
    gpgcheck=1
    gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
    EOF


  • Run the following command to install the package:

    Code Block
    yum install google-chrome-stable


  • After you have installed Google Chrome, please restart flex.bi enterprise. During the startup, flex.bi will detect installed Google Chrome and will start to use it for PDF exports. 

    Note

    For additional information regarding Google Chrome installation please see Google Chrome installation instructions.



...

Note

Make sure there is enough (and any for that matter) swap space available and set the swappiness setting to 1. See this manual for CentOS.

Run the flex.bi server

Finally, now you can start the flex.bi service using this code:

...

Configure the database connection in the wizard that should open once you connect for the first time using the database parameters from above.


Note

There are many tutorials on how to use systemd out there, such as this one from Digital Ocean.

...