# Installation

Before you start, you need to perform the platform installation steps on your machine, which must be based on a Unix Operating System (preferably Ubuntu) to ensure having full compatibility.

TIP

If you do not have a Ubuntu Operating System, you can download the Ubuntu Desktop Long-Term-Supported image here (opens new window).

If you're using a MS Windows machine, and you wish to dual boot Ubuntu and Windows, follow the instructions here (opens new window).

If you're using a MacOS machine, you can dual boot by following the instructions here (opens new window).

Once the Ubuntu Operating System is installed you can go through the installation steps.

At the end of the installation, PlexusLAB platform will be served at the URL http://localhost/plexus/ or http://YOUR_HOST_OR_IP_ADDRESS/plexus/ if your machine is exposed to the Internet.

# Default installation

Open the terminal and enter these commands:

sudo apt install curl -y
bash <(curl https://setup.plexus-automation.com/lab/ubuntu/install-php7.4.sh)
# or, to enable PHP8, 
bash <(curl https://setup.plexus-automation.com/lab/ubuntu/install.sh) # PHP8

WarnThe installation will require you to enter your system password at this point

WARNING

On your terminal, after the installation is done, your password will be displayed. Copy the password to login into PlexusLAB for the first time. Remember to change the password by going into the users page, after the first login.

# Updating version

Open the terminal and enter this command:

bash <(curl https://setup.plexus-automation.com/lab/ubuntu/install-php7.4.sh) update
# or, for a PHP8 installation, 
bash <(curl https://setup.plexus-automation.com/lab/ubuntu/install.sh) update # PHP8

TIP

The update command skips OS libraries/packages update and maintain the Expose and Apache2 basic authentication mechanism (if previously enabled).

WarnWhen asked, enter system password

# Offline installation

# Prerequisites

In case you don't have internet access on your Ubuntu machine, you can still install PlexusLAB.

You must verify that the following requirements are met on your system, by running these commands:

Requirement How to check Notes
Ubuntu OS 18.04 or newer [Ubuntu 20.04 recommended] lsb_release -a
Apache 2.4 apache2 -v Any minor version will be fine
Apache status enabled and active sudo systemctl status apache2
unzip unzip -v Any version will be fine
jq jq --version Any version will be fine
SQLite 3 sqlite3 --version Any minor version will be fine
PHP 7.4 or newer [8.0 recommended] php -v PHP 8.1 is not fully supported yet Warn
libapache2-mod-php7.4 or newer [libapache2-mod-php8.0 recommended] sudo apachectl -M Enlisted values must contain: php7_module [or php8_module]
PHP Modules php -m Enlisted values must contain: bcmath, bz2, intl, gd, mbstring, mysql, zip, curl, sqlite3

WARNING

The offline installation will not install the tunneling service on your machine.

You will not be able to expose your PlexusLAB installation publicly and grant remote access to the platform.

# Manual installation steps

If all requirements are satisfied, you can proceed by following the manual installation steps.

Download the offline install script (opens new window) on a device, and move the file on the Ubuntu machine.

Download the latest Plexus (opens new window) version on a device, and move the file on the Ubuntu machine.

If you don't have direct access to the machine, remember you can always push them remotely via ssh with the scp command (opens new window):

scp /local/path/to/offline_install.sh <ubuntu_remote_user>@<ubuntu_ip_address_or_host>:/var/tmp
scp /local/path/to/latest.zip <ubuntu_remote_user>@<ubuntu_ip_address_or_host>:/var/tmp

Now you must operate on the Ubuntu machine, either by directly opening the Terminal application or by connetting remotely via ssh.

# Move to the folder where PlexusLAB will be installed
cd /var/tmp
# Check latest.zip and offline_install.sh exists
ls -la
# Ensure you can execute the script
sudo chmod +x offline_install.sh
# Execute the script and follow the instructions
./offline_install.sh

# Deleting PlexusLAB

sudo apt install curl
bash <(curl https://setup.plexus-automation.com/lab/ubuntu/remove.sh)

AlertAll your project files will be deleted. This is a permanent removal of PlexusLAB and your data

# Retrieving the password

echo $password$(bash /var/www/html/plexus/getpass.sh) | head -n1 | awk '{print $1;}'

# Securing the installation (Apache2)

Scripts available from PlexusLAB 0.15.0 and above.

The following are optional steps, but we encourage you to proceed in order to configure a basic authentication for the platform.

TIP

This is a good practice everytime your machine is exposed to the external WWW network (public IP), or everytime you activate the tunneling service.

WARNING

If you enable this kind of authentication and you need to enable the tunneling service, remember to leave the tunnel password input field empty in the system settings.

Otherwise, the two authentication systems will conflict and the browser will keep you asking a password over and over again when you navigate to the tunnel'ed URL
(e.g.: <SOME_HASH_HERE>.plexus-automation.com/plexus).

# Enabling + Adding new credentials

By enabling basic authentication, users will be prompted by the browser to insert some credentials before actually showing anything, either for PlexusLAB and for the HMI panels.

This is an additional security layer that works on top of standard PlexusLAB / HMI Panels credentials, and will not replace the PlexusLAB login page, nor the HMI Panel PIN code.

Open a terminal, copy/paste the following commands and follow the wizard

cd /var/www/html/plexus/
./apache_basic_auth_enable.sh

Apache2 webserver Basic Auth will be performed under the hood.

# Removing existing credentials

Open a terminal, copy/paste the following commands and follow the wizard

cd /var/www/html/plexus/
./apache_basic_auth_disable_user.sh

# Disabling

Open a terminal, copy/paste the following commands and follow the wizard

cd /var/www/html/plexus/
./apache_basic_auth_disable.sh

Apache2 webserver Basic Auth will be performed no more.

# Performance improvements

The following instructions are not mandatory, and you will need direct access to the machine on which PlexusLAB is installed.

By editing the PHP configuration file, you may improve the system loop performance by enabling PHP default caching mechanism called OPcache, especially when you have many active functions defined in the Functions page. In most cases, your system loop will take ~20% less time to execute.

You will found the php.ini file in one of the following two paths, depending on your installation (PHP7 or PHP8).

First, create a backup of the actual configuration:

sudo cp /etc/php/7.4/cli/php.ini /etc/php/7.4/cli/_php.ini.bkp
# or, for a PHP8 installation, 
sudo cp /etc/php/8.0/cli/php.ini /etc/php/8.0/cli/_php.ini.bkp  # PHP8

Then open the config file in a nano editor:

sudo nano /etc/php/7.4/cli/php.ini
# or, for a PHP8 installation, 
sudo nano /etc/php/8.0/cli/php.ini  # PHP8

Once the nano editor is opened, search for the following config keys and set them as:

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=512
opcache.max_accelerated_files=10000
opcache.validate_timestamps=1
opcache.revalidate_freq=0
opcache.revalidate_path=1

Quit the editor and save by pressing (CTRL + S), (CTRL + X).

To enable the new configuration a PlexusLAB system restart is needed. You can do that by accessing PlexusLAB platform, in the Settings page.

Last Updated: 5/20/2022, 3:01:26 PM