Set Up Historian on a Generic Linux Distribution

Before you begin

  • Historian for Linux uses Docker containers. Therefore, you must install Docker on an x64 Linux machine on which you want to install Historian for Linux. For instructions on installing Docker, refer to https://docs.docker.com/engine/install/, and then select the platform.
  • Install Docker Compose. To verify that Docker is set up, run the following command: docker pull hello-world. Or, refer to https://docs.docker.com/config/daemon/systemd/ to set up the proxy for Docker daemon, which pulls Docker images from the Docker hub.
  • Install vi editor. To install vi editor on Ubuntu, run the following command: apt-get install vim
  • Install the zip package. To install the zip package on Ubuntu, run the following command: apt-get install zip
  • Install the curl package by running the following command: apt-get install curl

About this task

This topic describes how to set up Historian on a generic Linux distribution such as Ubuntu or CentOS. You can use any Linux distribution that has a Linux kernel with version 3.10 or later. To verify the Linux kernel version, run the following command: uname -v

You can also set up Historian on Predix Edge.

Procedure

  1. Download the Historian installation package, and place all the contents of the package in a single folder.
  2. Access the root node of the Linux machine on which you want to install Historian.
  3. Provide the executable permissions to all the scripts by running the following command: chmod +x *.sh
  4. Depending on the application that you want to install, run the command as provided in the following table.
    Application Command
    Historian database and the REST query service ./install.sh historian-linux
    MQTT collector ./install.sh mqtt
    OPCUA DA collector ./install.sh opcua
    Public REST APIs ./install.sh public-restapi
    Server-to-Server collector ./install.sh s2s
    Tuner ./install.sh tuner
    Web Admin ./install.sh webadmin
    Web Admin UAA ./install.sh webadmin-uaa
    Note: If you try to install an application again, the following error messages may appear; ignore them:
    • cp: cannot start '<file name>': No such file or directory
    • rm: cannot remove '<file name>': No such file or directory
    • unzip: cannot find or open <file name>
    • The applications are installed. A Docker component is installed for each application that you have installed.
      Tip: To verify that the Docker images are installed, run the following command: docker images. A list of Docker images for the applications that you have installed appears.
    • The proficy-historian-linux-2.3.0.zip file provided with the installation package is extracted to a folder named application-bundles. This folder contains the .zip files required to configure each application.
      Note: A backup of the proficy-historian-linux-2.3.0.zip file is located in the /opt/historian-linux-backup folder.
  5. Run the applications that you have installed.
    Application Command
    Historian database and the REST query service ./run.sh historian
    MQTT collector ./run.sh mqtt
    OPCUA DA collector ./run.sh opcua
    Public REST APIs ./run.sh public-restapi
    Server-to-Server collector ./run.sh s2s
    Tuner ./run.sh tuner
    Web Admin ./run.sh webadmin
    Web Admin UAA ./run.sh webadmin-uaa
    The Docker components for the applications are started.
    Tip:
    • To verify that the Docker components are running, run the following command: docker ps. A list of Docker components that are running appears.
    • To verify the logs of a Docker component, run the following command: docker logs <ID of the Docker container>
  6. Extract the .zip file for each application that you have installed by running the following command: unzip <file name>
  7. Set the environment variables for each application that you have installed:
    Important: For OPCUA DA, Server-to-Server, and Server-to-Cloud collectors, ensure that you have set the environment variables correctly before applying the configuration changes. This is because after you have applied the configuration changes for a collector, you cannot set the environment variables. If, however, you must change the values of the environment variables after the applying the changes, you must change the InterfaceName and DefaultTagPrefix values. When you do so, a new instance of the collector is created. As a result, you must add the tags again.
  8. Delete each .zip file that you have extracted by running the following command: rm <name of the zip file>
  9. Compress the contents of each .zip file that you have extracted by running the following command: zip <name of the .zip file (same as the original one)> <contents of the .zip file separated by a space> (for example, zip proficy-hisotiran-linux-amd64-2.3.0.zip historian-archiver-conf.json historian-license rest-query-config.json).
  10. Optional: Delete the contents of each .zip file by running the following command: rm <file name>. Since you have compressed these files, they are not required in the extracted folder.
  11. As needed, migrate Historian data from Windows to Linux.
  12. Apply the configuration changes for each application that you have installed.
    Application Command
    Historian database and the REST query service ./apply-config.sh historian-linux
    MQTT collector ./apply-config.sh mqtt
    OPCUA DA collector ./apply-config.sh opcua
    Public REST APIs ./apply-config.sh public-restapi
    Server-to-Server collector ./apply-config.sh s2s
    Tuner ./apply-config.sh tuner
    Web Admin ./apply-config.sh webadmin
    Web Admin UAA ./apply-config.sh webadmin-uaa