# Installation

Before starting, it is needed 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

Ubuntu is free and open-source: download the desktop version here (opens new window).

For expert users, it's also possible to dual boot Ubuntu while keeping the original operating system.

Once the system is ready 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

PlexusLAB is written in PHP language. There are two versions of PHP supported, 7.4 and 8.2.

WARNING

Please notice that the installation scripts will force PHP installation to 7.4 or 8.2. If your Ubuntu machine is running any other PHP script or service, please check if it's still working after the default installation is completed. Bioforcetech Corporation is not taking care of any misconfiguration that may happen to other software previously installed on the machine.

# PHP 7.4

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)

# PHP 8.2

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

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.

# 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 22.04 recommended] lsb_release -a
Apache 2.4 apache2 -v Any minor version 2.4.x 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 [for versions older than 0.40] sqlite3 --version Any minor version 3.x will be fine
MySQL Server [from version 0.40 and newer] mysql --version
PHP 7.4 [PHP 8.2] php -v
libapache2-mod-php7.4 [libapache2-mod-php8.2] 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 tunnelling service on your machine.

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

# MySQL Server

Starting from PlexusLAB v0.40 it is necessary to install MySQL Server.
In particulare, it is requested to:

  • enable mysql.service at the startup
sudo systemctl enable mysql.service
  • having created a database named “plexus_db” and a mysql user “plexus@localhost” with associated password “plexus4mysql”. The followings are the commands needed:
sudo mysql -e "CREATE DATABASE IF NOT EXISTS plexus_db;"
sudo mysql -e "CREATE USER plexus@localhost IDENTIFIED BY 'plexus4mysql';"
sudo mysql -e "GRANT ALL PRIVILEGES ON plexus_db.* TO 'plexus'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"

# 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

# Updating version

# PHP 7.4

Open the terminal and enter the following command:

bash <(curl https://setup.plexus-automation.com/lab/ubuntu/install-php7.4.sh) update

# PHP 8.2

Open the terminal and enter the following command:

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

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

# Deleting PlexusLAB

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

# 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 tunnelling service.

WARNING

If you enable this kind of authentication and you need to enable the tunnelling 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 and/or 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

# Removing security layer

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.2/cli/php.ini /etc/php/8.2/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.2/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).

WARNING

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

Last Updated: 2/2/2024, 4:28:31 PM