Installation


Requirements

Role Operating System Database
Master Node CentOS/RHEL 7, or Debian 9, x86_64, with systemd PostgreSQL 9.3 / 9.4 / 9.5 / 9.6 / 10
Slave Node CentOS/RHEL 7, or Debian 9, x86_64, with systemd Not required

Step 1: Download

$cd ~
$wget https://www.janusec.com/download/janusec-latest.tar.gz
$tar zxf ./janusec-latest.tar.gz

Step 2: Install

Switch to root and run install.sh , janusec application gateway will be installed to /usr/local/janusec/

$su
#cd janusec-0.9.3
#./install.sh

Select 1. Master Node, then it will:

  • copy files to /usr/local/janusec/
  • copy service file to system service directory
  • Enable Janusec Application Gateway as a system service, but not start it for the first time.

Step 3: Config

PostgreSQL is not included in release package, you should prepare database name and account.
Now we assume you have PostgreSQL installed already, and database name and account is ready, then edit /usr/local/janusec/config.json :

Master Node (The First Node)

{
    “node_role”: “master”,
    “master_node”: {
        “admin_http_listen”: “:9080”,
        “admin_https_listen”: “:9443”,
        “database”: {
            “host”: “127.0.0.1”,
            “port”: “5432”,
            “user”: “your_postgresql_user”,
            “password”: “your_postgresql_password”,
            “dbname”: “janusec
        }
    },
    “slave_node”: {
        “node_key”: “”,
        “sync_addr”: “”
    }
}

  • “node_role”: “master” ( fixed master )
  • “admin_http_listen”: “:9080” ( Listen on all IP address by default, custom address with internal IP:Port is preferred, such as 10.10.10.10:9080 )
  • “admin_https_listen”: “:9443” ( Listen on all IP address by default, custom address with internal IP:Port is preferred, such as 10.10.10.10:9443 )

For security reasons, use internal IP:Port is preferred.

Slave Node (Optional)

Usually only one Master Node is required for small scale web applications.
Slave Nodes is for large scale web applications, and need GSLB (Global Server Load Balance) of yourselves.
You must copy the node_key in web administration portal if you need slave nodes, and paste into the config.json of slave nodes.

{
    “node_role”: “slave”,
    “master_node”: {
        “admin_http_listen”: “”,
        “admin_https_listen”: “”,
        “database”: {
            “host”: “”,
            “port”: “”,
            “user”: “”,
            “password”: “”,
            “dbname”: “”
        }
    },
    “slave_node”: {
        “node_key”: “produced_by_web_admin_in_master_node”,
        “sync_addr”: “http://master_ip:9080/janusec-api/
    }
}

  • “node_role”: “slave” (fixed slave)
  • “node_key”: “produced_by_web_admin_in_master_node” (produced by web admin)
  • “sync_addr”: “http://master_ip:9080/janusec-api/” (replace with the master IP address)

Step 4: Start

#systemctl start janusec.service

Step 5: Test Installation

Open web browser such as Chrome, navigate with address:

http://your_master_ip_address:9080/

This is the first administration address for Janusec Application Gateway.
Login with default username admin and password J@nusec123 .
You should change the password for security reasons.

©Janusec All Rights Reserved.      Contact: support#janusec.com    QQ Group: 776900157