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/7.9/8.2/8.3/8.4, 64-bit, CentOS 7.5/7.6/7.7/7.8/7.9/8.2/8.3/8.4, 64-bit or Oracle Linux Server 7.7/7.8/7.9/8.2/8.3/8.4, 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.

Note: Upgrading the Linux operating system from v7.x to v8.x is NOT supported once the installation or upgrade of NetBrain Workstation v10 is completed. Refer to Linux System Upgrade Instructions Online or Linux System Upgrade Instructions Offline for workaround solution to upgrade Linux operating system from v7.x to v8.x prior to the installation of or upgrade to NetBrain Workstation v10.

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 gcc. Run the rpm -qa|grep -E "zlib-devel|readline-devel|bzip2-devel|ncurses-devel|gdbm-devel|xz-devel|tk-devel|libffi-devel|gcc" 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 gcc 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 10GB 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, netbraintemp10.0a.

[[email protected] ~]# mkdir /opt/netbraintemp10.0a

3.Run the cd /opt/netbraintemp10.0a command to navigate to the /opt/netbraintemp10.0a 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-rhel-10.0a.tar.gz file from NetBrain and then upload it to the /opt/netbraintemp10.0a 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/netbraintemp10.0a directory to directly download the netbrain-all-in-two-linux-x86_64-rhel-10.0a.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-rhel-10.0a.tar.gz command under the /opt/netbraintemp10.0a directory to extract installation files.

[[email protected] netbraintemp10.0a]# tar -zxvf netbrain-all-in-two-linux-x86_64-rhel-10.0a.tar.gz
netbrain-all-in-two-linux-10.0a/
netbrain-all-in-two-linux-10.0a/servicemonitoragent/
netbrain-all-in-two-linux-10.0a/servicemonitoragent/dependencies
...
netbrain-all-in-two-linux-10.0a/install.sh
...

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

7.Run the ./install.sh command under the netbrain-all-in-two-linux-10.0a 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-10.0a]# ./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: Collecting system information SUCCEEDED.
INFO: MongoDB was not installed. Fresh installation is required.
 
Components to be installed:
     servicemonitoragent
     mongodb 
     licenseagent 
     elasticsearch 
     rabbitmq 
     redis 
...
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: Starting to check if rpm exists
INFO: Starting to check if erlang rpm exists
INFO: Dependent packages checking
INFO: Dependent packages checking SUCCEEDED
INFO: Selinux-policy version: 3.13.1
Checking information for redis...
INFO: Dependent packages 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 Mon 2021-02-22 01:30:29 EST; 23min 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 Mon 2021-02-22 01:30:52 EST; 32min 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 Mon 2021-02-22 01:30:52 EST; 35min 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 Mon 2021-02-22 01:30:52 EST; 42min 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 Mon 2021-02-22 01:30:52 EST; 45min 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 2021-02-22 01:30:52 EST; 50min 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 Agent 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 use FQDN during Database Server installation, do the following:

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

2)Add the following DNS info 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
      dns: mongo2.cloud.netbraintech.com

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

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

4)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 binding IP address for MongoDB/ElasticSearch/NetBrain License Agent. 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 password must meet the following criteria:
• The length should be not less than 8 and not greater than 64 characters.
• Cannot be Admin1.#
• Cannot be empty and cannot start with! or #.  
• Cannot contain any of the following special characters,
{ } [ ] : " , ' | < > @ & ^ % \ and spaces.

Note: The username must meet the following criteria:
• The length cannot exceed 64 characters.  
• Cannot be empty and cannot start with! or #.  
• Cannot contain any of the following special characters,
{ } [ ] : " , ' | < > @ & ^ % \ and spaces.

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 for all components 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.

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.

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.

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.

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

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.

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 configuration by default. To verify the CA certificate, complete the following steps after the configuration:

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. Make sure the CA certificate could be accessed and read by the Service Monitor Agent Service.