Installation on CentOS 7 / RHEL 7¶
The installation of the Business Bot Platform on CentOS 7 and RHEL is
supported by an installer (installation wizard). The software is
provided as an rpm package (file name:
bbp-<edition>-<release>-<fixpack>-1-0.<architecture>.rpm
). After starting the installation, the installer checks
various system requirements (e.g. available disk space) as well as compatibility with the operating system.
Installation¶
The installer creates a new user during the installation. The user bbp
runs Tomcat. All files are copied to
the directory /opt/bbp
. The following steps will guide you through the installation.
Download the rpm package from the Service Portal.
The installation of the package is done with the rpm command:
1 | $ sudo rpm -ivh bbp-community-r2018-fp1845-1-0.x86_64.rpm
|
Subsequently, the POST installation script must be executed to complete the installation and configure the components of the Business Bot Platform. Therefore, run following command:
1 | $ /opt/bbp/scripts/postInstall.sh
|
You should receive the following output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | $ /opt/bbp/scripts/postInstall.sh ----------------------------------------- Copyright(c) 2018 Citunius GmbH BBP Post install started at 2018-11-17_18-28-03 ----------------------------------------- Loading settings... Prepare Apps ... Configure Tomcat ... Enable the Tomcat service, so it starts on server boot ... Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /etc/systemd/system/tomcat.service. Configure Firewall ... success success success success Deploy WebApp BBP ... Start the Tomcat Service ... Post installation action of the Business Bot Platform has finished. In the next step, you have to configure the database connection and logger. Once you have finished this, you can access the web frontend via browser. ---------------------------------------- Web Interface: https://bbpcentos7:8443/bbp/admin/login ---------------------------------------- |
Installation and Configuration of the Database mariaDB¶
MariaDB is an open source database management system that is often installed as part of the popular LAMP stack. It uses a relational database and SQL (Structured Query Language) to manage its data. In this section, we will explain how to install the latest version of MariaDB on a CentOS 7 server.
Installation¶
We use Yum to install the MariaDB package and press
y
to confirm that we want to continue:
1 | $ sudo yum install mariadb-server
|
Once the installation is complete, we start the daemon with the following command:
1 | $ sudo systemctl start mariadb
|
systemctl
does not display the result of
all service management commands, so we use the following command to make sure we were successful:
1 | $ sudo systemctl status mariadb
|
If MariaDB was started successfully, the output should contain
Active: active (running)
and the last line should look something like this:
1 2 3 4 5 6 7 8 9 10 | $ sudo systemctl status mariadb mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since Sat 2018-11-17 19:22:06 CET; 6s ago Process: 13868 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS) Process: 13787 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 13866 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─13866 /bin/sh /usr/bin/mysqld_safe --basedir=/usr └─14029 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log... |
Next, we want to ensure that MariaDB starts at boot, using the systemctl enable command, which will create the necessary symlinks.
1 | $ sudo systemctl enable mariadb |
Next, we will turn to securing our installation.
Securing the MariaDB Server¶
MariaDB includes a security script to change some of the less secure default options for things like remote root logins and sample users. Use this command to run the security script:
1 | $ sudo mysql_secure_installation
|
The script provides a detailed explanation for every step. The first
prompts asks for the root password, which hasn't been set so we'll
press ENTER
as it recommends. Next,
we'll be prompted to set that root password, which we'll do.
Then, we'll accept all the security suggestions by pressing
Y
and then ENTER
for the remaining prompts, which will remove anonymous
users, disallow remote root login, remove the test database, and reload
the privilege tables.
Finally, now that we've secured the installation, we'll verify it's working.
Testing the Installation¶
We can verify our installation and get information about it by
connecting with the mysqladmin
tool, a
client that lets you run administrative commands. Use the following
command to connect to MariaDB as root (-u root
), prompt for a password (-p
), and return the version.
1 | $ mysqladmin -u root -p version
|
You should receive an output similar to this one:
1 2 3 4 5 6 7 8 9 10 11 12 | $ mysqladmin -u root -p version Enter password: mysqladmin Ver 9.0 Distrib 5.5.60-MariaDB, for Linux on x86_64 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Server version 5.5.60-MariaDB Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 17 min 40 sec Threads: 1 Questions: 25 Slow queries: 0 Opens: 1 Flush tables: 2 Open tables: 27 Queries per second avg: 0.023 |
This indicates that the installation was successful.
In the next step it is necessary to setup the Business Bot Platform. Therefore, follow chapter Web-Setup of the platform .
Create new Database¶
Notice
You have only to create an empty database, since the database is imported via the Web setup.
The Business Bot platform manages all data such as mobile users, chatbots and settings in one database. Therefore it is necessary to create the database for the platform in mariaDB. To do this, execute the following commands:
Create a new database with the name bbp
1 | $ mysql -u root -p -e "create database bbp DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" |
The database creation is now complete.
Optional: Configuring the Database Settings of the Business Bot Platform¶
Note
This step is optional, since the database settings are made via the Web setup.
If you want to change the data resource of the Business Bot platform, you can do that as follows:
1 | $ vi /opt/bbp/apps/tomcat/webapps/bbp/WEB-INF/classes/META-INF/persistence.xml
|
After the configuration of the Business Bot platform is complete, you need to restart Tomcat:
1 | $ sudo systemctl restart tomcat
|
The next step is to register the Business Bot platform. Therefore, follow the instructions in chapter Installing a license .