...
Note |
---|
These are instructions for flex.bi Enterprise 6.0 and later. For earlier version please contact flex.bi support. |
On this page:
Table of Contents |
---|
System Requirements
Information about system requirements for flex.bi Enterprise installation can be found here: Requirements.
Our default setup
We have chosen Linux CentOS 8 as our default server platform and MySQL/MariaDB as a database engine, so these instruction apply for this specific setup.
However, flex.bi Enterprise can also be installed on older CentOS, Redhat versions as well as other distributions of Linux, by adjusting the available software, it's versions and installation methods. For example using rpm
or apt-get
or yum
instead of dnf
or PostgreSQP
instead of MySQL
.
Note |
---|
Versions mentioned here are current as of 2021.03.24 - they might of course change in the future. |
Installation
The following are instructions for flex.bi Enterprise and the required software installation on Centos 8 operating system.
Java
Run the following command to install Java:
Code Block |
---|
yum install jre |
Tip |
---|
Run the command java -version and make sure that the result matches the version you just installed. |
MySQL/MariaDB
Run the following command to install MariaDB server:
Code Block |
---|
sudo yum install mariadb-server |
You can follow instructions available on MariaDB knowledge base.
Note |
---|
These are instructions for flex.bi Enterprise 6.0 and later. For earlier version please contact flex.bi support. |
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. |
Our default setup
We have chosen Linux CentOS 8 as our default server platform and MySQL/MariaDB as a database engine, so these instruction apply for this specific setup.
However, flex.bi Enterprise can also be installed on older CentOS, Redhat versions as well as other distributions of Linux, by adjusting the available software, it's versions and installation methods. For example using rpm
or apt-get
or yum
instead of dnf
or PostgreSQP
instead of MySQL
.
Note |
---|
Versions mentioned here are current as of 2021.03.24 - they might of course change in the future. |
Software Installation
The following are instructions for flex.bi Enterprise and the required software installation on Centos 8 operating system.
Java installation
Run the following command to install Java JDK 11:
Code Block sudo dnf install java-11-openjdk-devel
Run the following command, to test if the result matches the version you installed
Code Block java -version
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.
Disable MySQL default AppStream repository.
Code Block sudo dnf remove @mysql sudo dnf module reset mysql && sudo dnf module disable mysql
Create a new repository file..
Code Block sudo vi /etc/yum.repos.d/mysql-community.repo
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
Disable MySQL 8 repository.
Code Block sudo dnf config-manager --disable mysql80-community
Enable repository for MySQL 5.7.
Code Block sudo dnf config-manager --enable mysql57-community
Install MySQL 5.7.
Code Block sudo dnf install mysql-community-server
flex.bi Enterprise installation
For security reasons we recommend creating dedicated
flexbi
...
user.
...
Run the following command to achieve that:
Code Block sudo useradd flexbi
Move the flex.bi Enterprise installation
archive file that you received from our support.zip
archive file to
directory/home/flexbi
directory on your server.
Run the following command to unzip the
.zip
archive archive file (file name in the example can differ from the actual file depending on the software version):Code Block unzip flexbi_private_ezbi-4.7.2_4.3.0_33cdc226e7d6.0.zip
...
After the unzip process finishes, you should have a new
/home/flexbi/flexbi_private
...
directory containing the following folders:
Code Block app
...
bin
...
config
...
examples
...
lib
...
log
...
public
...
spec
...
tmp
...
Run the following commands, to ensure that the flex.bi
...
MySQL connector
- Move the downloaded MySQL connector file to
folder and its contents are owned by the user flexbi:
Code Block chown -R flexbi:flexbi flexbi_private
MySQL connector installation
- Download the MySQL JDBC driver version 8.0.23.
Move the downloaded
.zip
archive to/home/flexbi
directory directory on your server and then run the following command to unzip the .zip archive file (file name in the example can differ from the actual file depending on the software version):Code Block unzip mysql-connector-java-58.10.4723.zip
Copy the
.jar
file file from the newly created folder to the/home/flexbi/flexbi_private/lib
directory (if it doesn't exist, create it). Run the following command to achieve that (java version file name in the example can differ from the actual version name depending on the software version):Code Block cp mysql-connector-java-58.10.4723/mysql-connector-java-58.10.47-bin23.jar flexbi_private/lib/
Setup and configuration
...
MySQL Server configuration
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
...
Run the following command to make sure MariaDB starts automatically on server startup:
...
need
Run the following command to start
...
MySQL Server and ensure that it will be automatically started during server startup:
Code Block
...
systemctl
...
Note |
---|
It is recommended to use a dedicated MySQL user instead of the root user. The following is is a quick startup guide that will help you to implement the security measures according to you company guidelines. |
...
Run the following command to connect to mysql:
Code Block |
---|
mysql -u root |
Run the following command to change the password of the root user (in the example the new password is 'secret'):
Code Block |
---|
UPDATE mysql.user SET Password=PASSWORD('secret') WHERE User='root';
FLUSH PRIVILEGES; |
...
Run the following command to connect to mysql:
enable --now mysqld.service
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
Make note of the password shown on screen.
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
Connect to MySQL Database as
root
user, using the new password.Code Block mysql -u root -p
...
Run the following commands, to create a flex.bi user named
flexbi_private
: (Exchangesecret
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:
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
...
GRANT ALL ON flexbi_private.* TO 'root'@'<remote-ip-address>' IDENTIFIED BY 'PASSWORD';
GRANT ALL ON flexbi_private_dwh.* TO 'root'@'<remote-ip-address>' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
Note |
---|
In the code example above, you should use the actual username on the remote machine instead of root (you can also use the root uset), the actual IP address of the remote machine instead of <remote-ip-address> and the actual password on the remote machine instead of PASSWORD. |
Flex.bi
...
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 eazybi.toml.sample eazybi.toml |
...
Mailer parameters
You can set up the name and address used for outgoing e-mails from this private instance, for example, like this:
Code Block |
---|
[mailer]
from = "My private flex.bi <flexbi@mydomain.com>" |
Note |
---|
In the code example above, you should use your dedicated e-mail address instead of flexbi@mydomain.com. |
SMTP parameters
...
Add a systemd initialization script for flex.bi server:
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"
# 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.
...
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 "$@" |
...
Run the following command to ensure flex.bi service is started during system startup:
Code Block |
---|
systemctl enable flexbi.service |
Firewall
...
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 |
---|
We recommend to set up a web server running as reverse proxy to have SSL support for you site. For more information and instructions see this setup manual. |
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:
Code Block |
---|
systemctl start flexbi |
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. |
Troubleshooting
...
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:
Get Google Chrome rpm.
Code Block wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Install Google Chrome from the .rpm file you just downloaded.
Code Block sudo dnf localinstall google-chrome-stable_current_x86_64.rpm
Centos 8 configuration
To ensure full functionality of the flex.bi Enterprise, you have to change the default Centos 8 crypto policy level to LEGACY.
To do this, run the following command:
Code Block |
---|
update-crypto-policies --set LEGACY |
flex.bi Enterprise configuration
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.
Run the following command, to copy the
eazybi.toml.sample
file in the/config
folder to a new file namedeazybi.toml
:Code Block cp /home/flexbi/flexbi_private/config/eazybi.toml.sample /home/flexbi/flexbi_private/config/eazybi.toml
In a text editor of your choice, open the newly created
eazybi.toml
file and make the necessary configurations:Add licence information:
Code Block [license] name = "Organization name" key = """ Paste license key here """
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 ......
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"
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"
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
- Add a
systemd
initialization script for starting flex.bi service.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/
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
Run the following command to start flex.bi service and ensure it is started during server startup:
Code Block systemctl enable --now flexbi.service
- To ensure secure connection using https protocol, follow instructions in our documentation page HTTPS or SSL setup.
- 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.