Installing NetBrain Database Server on Linux

Before the installation, make sure that the machine meets the System Requirements and Deployment Prerequisites. All NetBrain Linux components, including MongoDB, License Agent, Elasticsearch, Redis, RabbitMQ, and Service Monitor Agent, will be installed sequentially on this Linux server. However, if an error occurs during the installation of any components, the installation will abort. After resolving the error, you can re-run the installation package to install the remaining components.

Pre-installation Tasks

Ensure you have upgraded the Linux OS to Red Hat Enterprise Linux Server 7.5/7.6/7.7/7.8, 64-bit or CentOS 7.5/7.6/7.7/7.8, 64-bit to avoid installation or upgrade failure. Refer to Linux System Upgrade Instructions Online for more details. If your Linux server has no access to the Internet, refer to Linux System Upgrade Instructions Offline.

Note: During and after the Linux OS upgrade, do not restart the Linux server, and keep all the NetBrain services on Linux server including MongoDB running normally and all the services on the Windows server stopped.

Ensure the hostname of the Linux server must be resolvable by DNS or configured in /etc/hosts because RabbitMQ needs a resolvable hostname no matter whether it is a standalone server or a cluster.

RabbitMQ has dependencies on the third-party packages socat and logrotate. Run the rpm -qa|grep socat and rpm -qa|grep logrotate commands to check whether socat and logrotate have been installed on this Linux server. If they have not been installed yet, you can choose either option below to install the dependencies.

oOnline Install: run the yum -y install socat and yum -y install logrotate commands to install them online.

oOffline Install: refer to Offline Installing Third-party Dependencies for more details.

Service Monitor Agent has dependencies on the third-party package zlib-devel readline-devel bzip2-devel ncurses-devel gdbm-devel xz-devel tk-devel libffi-devel. Run the rpm -qa|grep -E "zlib-devel|readline-devel|bzip2-devel|ncurses-devel|gdbm-devel|xz-devel|tk-devel|libffi-devel" command to check whether it has been installed on this Linux server. If it has not been installed yet, you can choose either option below to install the dependencies:

oOnline Install: run the yum -y install zlib-devel readline-devel bzip2-devel ncurses-devel gdbm-devel xz-devel tk-devel libffi-devel command to install it online.

oOffline Install: refer to Offline Installing Third-party Dependencies for more details.

It is highly recommended to install numactl on this Linux server to optimize MongoDB performance. Run the
rpm -qa|grep numactl command to check whether it has been installed. If it has not been installed yet and the Linux server has access to the Internet, run the yum install numactl command to install it online.

If you want to enable SSL to encrypt the communications between servers, prepare a set of certificate files and upload them to the /etc/ssl directory by using a file transfer tool.

Note: Make sure each path of /usr/lib, /usr/share, and /etc has more than 1GB free space to install the component files.

Installing Database Server

1.Log in to the Linux server as the root user.

2.Create a directory under the /opt directory to place the installation package. For example, netbraintemp8.0.3.

[[email protected] ~]# mkdir /opt/netbraintemp8.0.3

3.Run the cd /opt/netbraintemp8.0.3 command to navigate to the /opt/netbraintemp8.0.3 directory.

Note: Don't place the installation package under any personal directories, such as /root.

4.Download the installation package.

Option 1: If the Linux server has no access to the Internet, obtain the netbrain-all-in-two-linux-x86_64-rhel7-8.0.3.tar.gz file from NetBrain and then upload it to the /opt/netbraintemp8.0.3 directory by using a file transfer tool.  

Option 2: If the Linux server has access to the Internet, run the wget <download link> command under the /opt/netbraintemp8.0.3 directory to directly download the netbrain-all-in-two-linux-x86_64-rhel7-8.0.3.tar.gz file.

Note: Contact NetBrain Support Team to get the download link. The download link is case-sensitive.

Tip: Run the yum -y install wget command to install the wget command if it has not been installed.

5.Run the tar -zxvf netbrain-all-in-two-linux-x86_64-rhel7-8.0.3.tar.gz command under the /opt/netbraintemp8.0.3 directory to extract installation files.

[[email protected] netbraintemp8.0.3]# tar -zxvf netbrain-all-in-two-linux-x86_64-rhel7-8.0.3.tar.gz
netbrain-all-in-two-linux-8.0.3/
netbrain-all-in-two-linux-8.0.3/config/
netbrain-all-in-two-linux-8.0.3/config/setup.conf
...
netbrain-all-in-two-linux-8.0.3/install.sh
...

6.Run the cd netbrain-all-in-two-linux-8.0.3 command to navigate to the netbrain-all-in-two-linux-8.0.3 directory.

7.Run the ./install.sh command under the netbrain-all-in-two-linux-8.0.3 directory to install NetBrain Linux components.

1)Read the license agreement, and then type YES and press the Enter key.

2)Type I ACCEPT and press the Enter key to accept the license agreement. The script starts to check whether the system configuration of the Linux server meets the requirement, and all required dependent packages are installed for each Linux component.

[[email protected] netbrain-all-in-two-linux-8.0.3]# ./install.sh
 
Please read the End User License Agreement (“EULA”) for the license type (perpetual or subscription) 
purchased in the order form at https://www.netbraintech.com/legal-tc/ carefully. I have read the 
subscription EULA, if I have purchased a subscription license, or the perpetual EULA, if I have 
purchased a perpetual license, at the link provided above. Please type “YES” if you have read the 
applicable EULA and understand its and understand its contents, or “NO” if you have not read the 
applicable EULA. [YES/NO]: YES 
 
Do you accept the terms in the subscription EULA, if you have purchased a subscription license, or 
the perpetual EULA, if you have purchased a perpetual license? If you accept, and to continue with 
the installation, please type "I Accept" to continue. If you do not accept, and to quit the 
installation script, please type "CANCEL" to stop. [I ACCEPT/CANCEL]: I ACCEPT
INFO: Creating installation log file... 
INFO: Starting to checking system
INFO: Collecting system information...
INFO: Starting to check Linux OS info
INFO: Starting to check crontab
INFO: MongoDB was not installed. Fresh installation is required. 
 
Components to be installed:
     mongodb 
     licenseagent 
     elasticsearch 
     rabbitmq 
     redis 
     servicemonitoragent 
...
Checking information for mongodb...
INFO: Dependent packages checking SUCCEEDED
Checking information for licenseagent...
INFO: Dependent packages checking SUCCEEDED
Checking information for elasticsearch...
Checking information for rabbitmq...
INFO: Dependent packages checking SUCCEEDED
Checking information for redis...
INFO: Dependent packages checking SUCCEEDED
Checking information for servicemonitoragent...
Start dependencies checking...
Dependencies checking SUCCEEDED.

3)Configure the following parameters one by one with an interactive command line.

Install NetBrain Linux components.
The values in brackets are the default values of the parameters. To keep the default value for the 
current parameter, press the Enter key.
Please enter the data path for NetBrain [/var/lib/netbrain]: 
Please enter the log path for NetBrain [/var/log/netbrain]: 
Please enter the IP address of this machine [10.10.3.142]: 
Please create NetBrain service username [admin]:
Please create NetBrain service password: 
Please re-enter NetBrain service password to confirm: 
Use SSL on NetBrain Services [no]: 
Use customized server ports? [no] 
Please enter the URL (must end with /) to call NetBrain Web API service for the Service Monitor 
[http(s)://<IP address or hostname of NetBrain Application Server>/]: http://10.10.3.141/

Note: Make sure the designated data path has more than 100GB free space and the designated log path has more than 50GB free space. You can run the df -h command to check which directory has been mounted to a large disk.

Note: The certificate name specified in the path must strictly match the one you uploaded.

Note: Keep notes of the NetBrain service username and password because they will be used later.

4)After these parameters are configured, the key configurations for each component are listed for your further confirmation. To continue the installation with the current configurations, press the Enter key. To change any configurations, type no.

Data path:                      /var/lib/netbrain
Log path:                       /var/log/netbrain
 
MongoDB IP address:             10.10.3.142
MongoDB port:                   27017
MongoDB username:               admin
MongoDB password:               ******
MongoDB uses SSL:               no
 
License Agent port:             27654
License Agent uses SSL:         no
 
Elasticsearch address:          10.10.3.142
Elasticsearch port:             9200
Elasticsearch username:         admin
Elasticsearch password:         ******
Elasticsearch uses SSL:         no
 
RabbitMQ address:               10.10.3.142
RabbitMQ port:                  5672
RabbitMQ username:              admin
RabbitMQ password:              ******
RabbitMQ uses SSL:              no
 
Redis address:                  10.10.3.142
Redis port:                     6379
Redis password:                 ******
Redis uses SSL:                 no
 
NetBrain Web API service URL:   http://10.10.3.141/ServicesAPI
 
Do you want to continue using these parameters? [yes] 

8.After all the components are successfully installed, run the reboot command to restart the machine.

9.Run the following commands to check their service status separately.

- systemctl status mongod

[[email protected] ~]# systemctl status mongod
  mongod.service - MongoDB service
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-01-14 00:43:32 EST; 4min 32s ago
  Process: 6136 ExecStart=/bin/mongod -f /etc/mongodb/mongod.conf (code=exited, status=0/SUCCESS)
 Main PID: 6375 (mongod)
   Memory: 902.3M (limit: 8.0G)
...

- systemctl status netbrainlicense

[[email protected] ~]# systemctl status netbrainlicense
 netbrainlicense.service - NetBrain license agent service
   Loaded: loaded (/usr/lib/systemd/system/netbrainlicense.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-01-14 00:43:41 EST; 27min ago
 Process: 16490 ExecStart=/usr/bin/netbrainlicense/licensed -f /etc/netbrainlicense/licensed.conf (code=exited, status=0/SUCCESS)
 Process: 16488 ExecStartPre=/bin/chmod o+r /sys/class/dmi/id/product_uuid (code=exited, status=0/SUCCESS)
 Main PID: 16492 (licensed)
   Memory: 15.0M
...

- systemctl status elasticsearch

[[email protected] ~]# systemctl status elasticsearch
 elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-01-14 00:43:41 EST; 27min ago
     Docs: http://www.elastic.co
 Main PID: 5922 (java)
   Memory: 4.6G
...

- systemctl status rabbitmq-server

[[email protected] ~]# systemctl status rabbitmq-server
 rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-01-14 00:38:43 EST; 36min ago
 Main PID: 4509 (beam.smp)
   Status: "Initialized"
   Memory: 96.5M
...

- systemctl status redis

[[email protected] ~]# systemctl status redis
 redis.service - Redis
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-01-14 00:38:49 EST; 37min ago
 Main PID: 52318 (redis-server)
 Memory: 7.7M
...

- systemctl status netbrainagent

[[email protected] ~]# systemctl status netbrainagent
 netbrainagent.service - NetBrain Service Monitor Agent Daemon
   Loaded: loaded (/usr/lib/systemd/system/netbrainagent.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-01-13 22:01:54 EST; 3h 15min ago
 Main PID: 4520 (python3)
   Memory: 73.5M
...

Post-installation Tasks

If you have customized a port for any of MongoDB/License Agent/Elasticsearch/RabbitMQ/Redis or you have configured DNS connection during Database Server installation, to make the Server Monitor can still detect and monitor its service, you must add the customized port number to the corresponding configuration file.

Server Name

File Name

MongoDB

mongodb.yaml

License Agent

license.yaml

Elasticsearch

elasticsearch.yaml

RabbitMQ

rabbitmq.yaml

Redis

redis.yaml

Example: If you configured the port number 27000 during MongoDB installation, do the following:

1)Run the cd /etc/netbrain/nbagent/checks command to navigate to the checks directory.

2)Add the customized port number to the mongodb.yaml file, and save the changes. For how to modify the file, refer to Editing a File with VI Editor.

Note: Follow the text format in the example strictly, including alignment, punctuations, and spaces.

init_config:
 
instances:
    - name: default
      port: 27000

Parameters

Refer to the following table for the parameters of NetBrain Database Server.

Parameter

Default Value

Description

Data path

/var/lib/netbrain

The directory to save data of all NetBrain Linux components. You can press the Enter key to keep the default path or type a new one.

Log path

/var/log/netbrain

The directory to save logs of all NetBrain Linux components. You can press the Enter key to keep the default path or type a new one.

IP address of this machine

<current IP address automatically obtained from the machine>

The IP address of this server. It will be used for establishing connections with NetBrain Application Server. You can press the Enter key to keep the default value or type a new one.

Note: 127.0.0.1 is not supported.

Note: If you configured multiple network cards on this machine, type the designated IP address to be bound.

NetBrain service username

admin

The admin username and password created for MongoDB, Elasticsearch, RabbitMQ, Redis, Front Server and Service Monitor.

Note: The username and password cannot contain any of the following special characters, and their lengths cannot exceed 64 characters.
{ } [ ] : " , ' | < > @ & ^ % \ and spaces

Note: The username and password cannot be empty and it cannot start with ! or #.

Note: Keep notes of the NetBrain service username and password because they will be used for validating the connections with:
 - MongoDB, Elasticsearch, RabbitMQ, and Redis when installing NetBrain Application Server
 - Front Server Controller when setting up the system
 - Service Monitor Agent when communicating with Web API Server

NetBrain service password

 

Use SSL on NetBrain Services

no

Whether to enable SSL on NetBrain Database Server. To enable SSL, type yes.

 

Certificate file path

 

The file name of the certificate file that contains the public key.

Note: It is required only if Use SSL on NetBrain Services is enabled.

Private Key file path

 

The file name of the private key file.

Note: It is required only if Use SSL on NetBrain Services is enabled.

Certificate Authority file path

 

The name and directory of the chain certificate authority (CA) file, which is used to authenticate the CA issuing the SSL certificates.

Note: It is required only if Use SSL on NetBrain Services is enabled.

Use customized server ports?

no

Whether to use customized port number for each Linux component. To customize ports, type yes.

MongoDB port

27017

The port number that the MongoDB service listens to. You can press the Enter key to keep the default port or type a new one.

Note: Make sure the port is not used by other applications. The value cannot be modified anymore after it is specified.

Note: Keep notes of the customized port because it will be used for validating the connections with MongoDB when installing NetBrain Application Server.

License Agent port

27654

The port number that the License Agent service listens to. You can press the Enter key to keep the default port or type a new one.

Note: Make sure the port is not used by other applications. The value cannot be modified anymore after it is specified.

Note: Keep notes of the customized port because it will be used for validating the connections with License Agent when installing NetBrain Application Server.

Elasticsearch port

9200

The port number that the Elasticsearch service listens to. You can press the Enter key to keep the default port or type a new one.

Note: Make sure the port is not used by other applications. The value cannot be modified anymore after it is specified.

Note: Keep notes of the customized port because it will be used for validating the connections with Elasticsearch when installing NetBrain Application Server.

Rabbitmq port

5672

The port number that the RabbitMQ service listens to. You can press the Enter key to keep the default port or type a new one.

Note: Make sure the port is not used by other applications. The value cannot be modified anymore after it is specified.

Note: Keep notes of the customized port because it will be used for validating the connections with RabbitMQ when installing NetBrain Application Server.

Redis port

6379 (non-SSL)
7000 (SSL)

The port number that the Redis service listens to. You can press the Enter key to keep the default port or type a new one.

Note: Make sure the port is not used by other applications. The value cannot be modified anymore after it is specified.

Note: Keep notes of the customized port because it will be used for validating the connections with Redis when installing NetBrain Application Server.

URL to call NetBrain Web API service for the Service Monitor

http(s)://<IP address or hostname of NetBrain Application Server>/

The URL to call NetBrain Web API service. For example, http://10.10.3.141/ or https://www.YOURCOMPANY.com/.

Note: If SSL will be enabled with https binding created for the system website in IIS Manager, type https in the URL.

Note: When you type https in the URL, the CA verification will not be performed during the installation by default. To verify the CA certificate, complete the following steps after the installation:

1)Run the cd /etc/netbrain/nbagent command to navigate to the /etc/netbrain/nbagent directory.

2)Run the vi agent.conf command to edit the agent.conf file as follows and save the changes. For more details on how to edit the file with the vi editor, refer to Editing a File with VI Editor.

Modify the value of the enable_ssl_validation parameter to True.

Remove the pound sign (#) in front of the cert_path parameter, and then enter the path of the CA certificate file.

Example:

# enable ssl validation (default:False)
enable_ssl_validation: True
cert_path: /etc/ssl/smca.pem

3)Upload the CA certificate file under the specified path.