Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.2 Download Software

Download the required opHA 5 software onto each server.

...

Run the installation commands on each server as neededin the opHA cluster.

All the following setup commands in this setup should be run as the root user

...

  1. Edit Configuration: Update the /etc/nats-server.conf file with the following settings:

    1. Change the server_name to the name of your Main Primary server.

    2. Remove or comment out the cluster section, so that this remains:

Code Block
languagejson
server_name: "opha-primary1.opmantek.net"  #The local server  
http_port: 8222 
listen: 4222 
jetstream: enabled 
accounts { 
  $SYS { 
    users = [ 
      { user: "admin",
        pass: "password" 
      } 
    ] 
  } 
  ophad: { 
    users: [ 
        { user: "omkadmin", password: "op42opha42" } 
    ] 
    jetstream: enabled 
  } 
} 

jetstream { 
  store_dir: "/opt/nats/storage" 
  max_memory_store: 1028M 
  max_file_store: 1028M 
} 

3. Common Configuration for All Servers

...

The following steps should be performed only on the Main Primary MongoDB instance.

4.1 Initialize MongoDB Replica Set

Connect to MongoDB using the mongosh command:

...

Code Block
systemctl restart mongod

5.

...

Start Nats

5.1 Start NATS

Start the NATS service on the Main Primary server ONLY:

...