Installing NetBrain Database Server on Linux

MongoDB, License Agent, Elasticsearch, as well as Service Monitor Agent will be installed after the installation.

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

Note: It is highly recommended to install numactl on the server for optimizing MongoDB performance. Run the rpm -qa|grep numactl command to check whether numactl has been installed. Run the yum install numactl command to install it if it has not been installed.

2.Run the mkdir command to create a directory under the /opt directory to place the installation package. For example, /opt/netbraintemp.

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

3.Obtain the netbrain-all-in-two-linux-x86_64-rhel7-7.1a2.tar.gz file from NetBrain, and then copy it into the /opt/netbraintemp directory.

Option 1: If the Linux server has no access to the Internet, upload the netbrain-all-in-two-linux-x86_64-rhel7-7.1a2.tar.gz file to the /opt/netbraintemp directory by using a file transfer tool.

Option 2: If the Linux server has access to the Internet and the yum command has been installed:

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

2)Run the cd /opt/netbraintemp command to navigate to the /opt/netbraintemp directory.

3)Run the wget <NetBrain IE 7.1a Database download link> command under the /opt/netbraintemp directory to download the netbrain-all-in-two-linux-x86_64-rhel7-7.1a2.tar.gz file to this directory:

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

4.Run the tar -zxvf netbrain-all-in-two-linux-x86_64-rhel7-7.1a2.tar.gz command under the /opt/netbraintemp directory to extract installation files.

[root@localhost netbraintemp]# tar -zxvf netbrain-all-in-two-linux-x86_64-rhel7-7.1a2.tar.gz
netbrain-all-in-two-linux/
...
netbrain-all-in-two-linux/NetBrainInstall.sh
netbrain-all-in-two-linux/NetBrainUninstall.sh
netbrain-all-in-two-linux/NetBrainUpgrade.sh
...

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

6.Run the ./NetBrainInstall.sh command under the netbrain-all-in-two-linux directory to configure the following parameters one by one with an interactive command line.

Note: The values in the brackets are the default values of the parameters. To keep the default value for a parameter, press the Enter key.

Note: The installation path for NetBrain Linux components must have more than 50GB free space.

Note: If SSL is enabled, you must upload all certificate files under the specified paths. The certificate name must be strictly matched with the one specified in the path.

[root@localhost netbrain-all-in-two-linux]# ./NetBrainInstall.sh
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 keep notes of the password because it is required when you connect to MongoDB and Elasticsearch during the installation of NetBrain Application Server.
 
Please enter the installation path for NetBrain components [/opt]: 
Please enter the IP address of this machine [10.10.3.142]:  
Please enter the expected username for MongoDB and Elasticsearch [admin]: 
Please enter the expected password of the username for MongoDB and Elasticsearch: 
Please enter the expected password again: 
Please enter MongoDB port [27017]: 
Please enter Elasticsearch port [9200]: 
Please enter License Agent port [27654]: 
Use SSL on NetBrain Database Server [no]: 
Please enter the URL 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

After these parameters are configured, the key configurations of MongoDB, License Agent, Elasticsearch, and Service Monitor are listed for your further confirmation. To change any configurations, type no; To continue the installation with the current configurations, press the Enter key.

Installation path:              /opt
MongoDB IP address:             10.10.3.142
MongoDB port:                   27017
MongoDB username:               admin
MongoDB password:               ******
MongoDB uses SSL:               no
 
License Agent uses SSL:         no
License Agent port:             27654
 
Elasticsearch IP address:       10.10.3.142
Elasticsearch port:             9200
Elasticsearch username:         admin
Elasticsearch password:         ******
Elasticsearch uses SSL:         no
 
URL of NetBrain Web API service:   10.10.3.141/ServicesAPI
 
Do you want to continue using these parameters? [yes] 

Note: MongoDB, License Agent, Elasticsearch, and Server Monitor Agent will be installed sequentially. However, if any of the components fail to install, the installation aborts.

7.After MongoDB, License Agent, Elasticsearch, and Service Monitor Agent are successfully installed, run the reboot command to restart the machine.

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

service mongod status

[root@localhost netbrain-all-in-two-linux]# service mongod status
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
Loaded: loaded (/etc/rc.d/init.d/
  Drop-In: /etc/systemd/system/mongod.service.d
          50-CPUQuota.conf, 50-MemoryLimit.conf
  Active: active (running) since Mon 2018-11-26 02:32:06 EST; 4min 18s ago
  Docs: man:systemd-sysv-generator(8)
Main PID: 5619 (mongod
    Memory: 146.4M (limit: 8.0G)
    CGroup: /system.slice/mongod.service
            5619 /bin/mongod -f /opt/mongodb/mongod.conf

service netbrainlicense status

[root@localhost netbrain-all-in-two-linux]# service netbrainlicense status
netbrainlicense.service - SYSV: This shell script takes care of starting and stopping NetBrain license agent service.
  Loaded: loaded (/etc/rc.d/init.d/netbrainlicense)
  Active: active (running) since Mon 2018-11-26 02:32:27 EST; 17min ago 
    Docs: man:systemd-sysv-generator(8)
  Memory: 3.0M
  CGroup: /system.slice/netbrainlicense.service
          7233 /usr/bin/netbrainlicense/licensed -f /usr/licensed/licensed.conf

service elasticsearch status

[root@localhost netbrain-all-in-two-linux]# service elasticsearch status
elasticsearch.service - LSB: This service manages the elasticsearch daemon
  Loaded: loaded (/etc/rc.d/init.d/elasticsearch; bad; vendor preset: disabled)
 Drop-In: /etc/systemd/system/elasticsearch.service.d
          50-CPUQuota.conf
 Active: active (running) since Mon 2018-11-26 02:33:29 EST; 19min ago
   Docs: man:systemd-sysv-generator(8)
 Memory: 4.5G
 CGroup: /system.slice/elasticsearch.service

service netbrainagent status

[root@localhost netbrain-all-in-two-linux]# service netbrainagent status
Redirecting to /bin/systemctl status  netbrainagent.service
  netbrainagent.service - NetBrain Service Monitor Agent Daemon
    Loaded: loaded (/usr/lib/systemd/system/netbrainagent.service; enabled; vendor preset: disabled)
    Active: active (running) since Sun 2018-11-04 21:46:41 EST; 5min ago
Main PID: 14565 (python3)
  Memory: 72.6M
  CGroup: /system.slice/netbrainagent.service
          16701 /opt/netbrain/nbagent/python/bin/python3 NBAgent.py start
          16722 /opt/netbrain/nbagent/python/bin/python3 forwarder.py
          16723 /opt/netbrain/nbagent/python/bin/python3 collector.py start
          16724 /opt/netbrain/nbagent/python/bin/python3 receiver.py start

Parameters

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

Parameter

Default Value

Description

Installation path for NetBrain components

/opt

The destination directory to install NetBrain Linux components, which includes MongoDB, License Agent, Elasticsearch, and Service Monitor. You can press the Enter key to keep the default path or type a new path.

Note: Make sure the destination directory has more than 50GB free space.

Tip: You can run the df -h command to check which directory has been mounted to a large disk.

IP address of this machine

<current IP address automatically obtained from the machine>

The IP address configured for MongoDB and Elasticsearch. It will be used for establishing connections with NetBrain Application Server. You can press the Enter key to keep the default value.

Note: 127.0.0.1 is not supported.

Note: If you configured multiple network cards on this machine, type the actual IP address.

Tip: To configure an FQDN (fully qualified domain name) for MongoDB and Elasticsearch, type 0.0.0.0.

Fully Qualified Domain Name of this machine

 

The FQDN configured for MongoDB and Elasticsearch. It will be used for establishing connections with NetBrain Application Server.

MongoDB and Elasticsearch Username

admin

The admin username created for establishing connections with MongoDB and Elasticsearch. You can press the Enter key to keep the default name or type a new name.

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

MongoDB and Elasticsearch Username password

 

The password of the admin username created for establishing connections with MongoDB and Elasticsearch. Type the password twice.

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 port. Make sure the port is not used by other applications.

Note: The value cannot be modified anymore after it is specified.

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 port. Make sure the port is not used by other applications.

Note: The value cannot be modified anymore after it is specified.

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 port. Make sure the port is not used by other applications.

Note: The value cannot be modified anymore after it is specified.

Use SSL on NetBrain Database Server

no

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

Note: SSL cannot be enabled or disabled separately for MongoDB, License Agent, or Elasticsearch.

Certificate path

/etc/ssl/cert.pem

The file name and path of the certificate file that contains the public key. You must upload the certificate file under the specified path.

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

Certificate key path

etc/ssl/key.pem

The file name and path of the private key file. You must upload the key file under the specified path.

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

Certificate Authority path

etc/ssl/ca.pem

The file name and path of the CA file used to authenticate the CA issuing the SSL certificates for MongoDB, License Agent, and Elasticsearch. You must upload the CA file under the specified path.

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

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. Type http(s)://<IP address or hostname of NetBrain Application Server>, for example, http://10.10.3.141.

Note: If SSL is 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. If you want 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,  See Appendix: 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.