Bigemap offline map publisher for Linux

Posted by modcar on Thu, 13 Jan 2022 20:42:17 +0100

Bigemap offline map publisher for Linux

I. environmental inspection

Before installing Bigemap Server, you need to install the following dependencies:

  • Wget
  • OpenSSL (optional)
  • Docker
  • Docker Compose
  • unzip

Wget, OpenSSL and unzip are all required by the Bigemap Server installation script. Docker and Docker Compose are service running and integration containers.

# Install docker
#1. Uninstall the old version
yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
#2. Required installation package
yum install -y yum-utils
#3. Set the warehouse of the image
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
#The default is from abroad. It is not recommended
#Domestic is recommended
yum-config-manager \
    --add-repo \
    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#Update yum package index
yum makecache fast
#4. Install docker CE community version related to docker, while ee is enterprise version
yum install docker-ce docker-ce-cli containerd.io
#5. Start docker
#root user
systemctl start docker 
#Non root user
sudo systemctl start docker
#6. Use docker version to check whether the operation is successful
docker version
# Install l Docker Compose
yum install docker-compose

II. Installer Download

Bigemap Server Installer

Bigemap Server installer is a command line script (CLI) program used to download and install Bigemap Server.

Installation command

commandNeed networkingdescribe
installyesAutomatically download and install Bigemap Server
downloadyesDownload Bigemap Server
setupnoInstalling Bigemap Server
listyesView published historical versions
removenoUninstall Bigemap Server

Download Installer

  1. Download installation script: wget http://downloads.bigemap.com/bm-server/linux/bm-server-installer.zip ( Click download)
  2. Unzip the downloaded zip file: unzip BM server installer zip
  3. Modify execution permission: Chmod + X/ bm-server-installer
  4. View command help:/ bm-server-installer help

One step installation

One step installation will automatically download and install the latest released version, which needs local networking deployment.

# Install Bigemap server, 'bm-server/' is the installation path.
$ sudo ./bm-server-installer install bm-server/

# Enter installation path
$ cd bm-server

# Start Bigemap server
$ ./bm-server.sh start

Service management

# Service restart
$ ./bm-server.sh restart

# Start service
$ ./bm-server.sh stop

# Service log
$ ./bm-server.sh logs

Offline installation

Offline deployment requires manual downloading and Install dependencies To perform this offline installation step. Follow the steps below. First download the required files, then copy the BM server installer and the download directory BM server files to the offline server, and finally execute the setup command to install.

Download Bigemap Server

The download command downloads the files required by the Bigemap Server to a specified directory, which will be used later in the setup command.

#  Download the file to BM server files
$ ./bm-server-installer download bm-server-files/
option
  • --Version (optional) download the version specified by Bigemap Server through the list command View available versions

Installing Bigemap Server

Execute the setup command on the server that will run the Bigemap Server. The parameter BM server files / is the file required by the download command to download; The parameter BM server / is the target installation directory.

$ ./bm-server-installer setup bm-server-files/ bm-server/

After installation, execute BM server SH start service:

$ (cd bm-server && ./bm-server.sh start)

View available versions

The list command lists all available versions of Bigemap Server. Through BM server SH view the currently installed version:

$ ./bm-server.sh version

View all downloadable versions:

$ ./bm-server-installer list

Download the specified Bigemap Server version through the download command and specify the -- version parameter.

$ ./bm-server-installer download bm-server-files/ --version <bm-server-version>

III. configure Bigemap Server

Bigemap Server adopts JSON file configuration, and the default configuration file is in the BM server installer directory. The default configuration of Linux is as follows:

{
  "Hostname": "localhost",
  "Port": 3000,
  "ServicePort": 3001,//Remember to open ports
  "Password": "password",
  "TilesetPath": "/usr/local/tilesets" //Upload data here
}

configuration option

  1. Hostname service hostname.
  2. Port service port, 3000 by default.
  3. ServicePort map tile service port, 3001 by default; Cannot be the same as the service port.
  4. Password login service management password, remote access service management requires login, it is recommended to modify the password.
  5. TilesetPath map tile service root directory. Add an offline map service to browse the files in this directory.

Configuration command

After modifying the configuration file, apply the configuration through the settings command.

$ ./bm-server-installer settings <target> --config <path to JSON file>
parameter
  • < target > target installation directory, such as BM server /.
  • --config configuration file path.

Example

# Execute the configuration update command
$ ./bm-server-installer settings bm-server/ --config ./config.json

# Restart service
$ (cd bm-server && ./bm-server.sh restart)

Configure Https/Http

BIgemap Server can be configured to communicate using Https to improve security. In production, the certificate file should be signed by a trusted certification authority. To facilitate testing, a script is provided to generate a self signed certificate.

Configure certificate file

$ ./bm-server-installer settings <target> --ssl-key <path to pkey file> --ssl-cert <path to cert file>
parameter
  • < target > target installation directory, such as BM server /.
  • --Private key file of SSL key certificate.
  • --SSL cert certificate file.
  • --SSL Ca (optional) CA certificate file.

Example

# Use the certificate file
$ ./bm-server-installer settings bm-server/ --ssl-key ./cert/pri.key --ssl-cert ./cert/cert.crt

# Use self-signed certificate
$ ./bm-server-installer settings bm-server/ --self-signed

# Switch to HTTP
$ ./bm-server-installer settings bm-server/ --http

# Restart Bigemap Server
$ (cd bm-server && ./bm-server.sh restart)

Configure authorization service (offline area must be enabled)

Configure the offline map server authorization service, which is only applicable to specific terminal authorization programs.

  1. Download the specific authorization service program and store it in the docker directory under the installation directory; As in BM server / docker.

  2. implement

    settings
    

    command

    ./bm-server-installer settings bm-server/ --init-auth
    
  3. Restart service

    (cd bm-server && ./bm-server.sh restart)
    

Topics: Java Linux Database CentOS Docker