Before you begin
- Ensure that you have a super-user access to the Linux machine on which you want
to install Historian. This is required if you want to use the OPC UA DA
collector.
- 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
-
Download the Historian installation package, and place all the contents of the package in a single folder.
-
Access the root node of the Linux machine on which you want to install Historian.
-
Provide the executable permissions to all the scripts by running the following command:
chmod +x *.sh
-
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.
-
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>
-
Extract the .zip file for each application that you have installed by running the following command:
unzip <file name>
-
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.
-
Delete each .zip file that you have extracted by running the following command:
rm <name of the zip file>
-
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
).
- 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.
-
As needed, migrate Historian data from Windows to Linux.
-
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 |