Installing eLabFTW on Clear Linux Latest

eLabFTW is an open-source Electronic Laboratory Notebook (ELN) software that allows you to manage scientific experiments, observations, and related data. In this tutorial, we will guide you through the installation process of eLabFTW on Clear Linux Latest.

Prerequisites

Before installing eLabFTW, ensure that the following prerequisites are met:

Step 1 - Update the system

Update your Clear Linux system with the latest packages using the following command:

swupd update

Step 2 - Install required dependencies

Install required dependencies for eLabFTW using the following command:

swupd bundle-add dotnet-sdk-hosting-3.1 php php-pdo php-mysqli php-json php-ctype mariadb mariadb-message mariadb-client mariadb-common mariadb-connect mariadb-conv mariadb-core mariadb-server

Step 3 - Install MariaDB database server

eLabFTW requires a database server to store data. MariaDB is a popular, open-source database server that provides SQL compatibility.

Install MariaDB using the following command:

sudo systemctl enable mariadb
sudo systemctl start mariadb

Create a new database for eLabFTW using the following command:

sudo mysql -u root -p

Enter the root password when prompted, then execute the following SQL statement to create a new database:

CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;

Replace dbname with a name of your choice for the database.

Step 4 - Download eLabFTW

Download the latest stable version of eLabFTW from the official website using the following command:

wget -c https://github.com/elabftw/elabftw/releases/download/v1.9.7/elabftw-1.9.7.tar.gz

Step 5 - Extract eLabFTW and configure the webserver

Extract the eLabFTW archive using the following command:

tar -xzf elabftw-1.9.7.tar.gz

Copy the extracted files to the web server root directory using the following command:

sudo cp -r elabftw/* /var/www/

Create a new virtual host for eLabFTW using the following command:

sudo nano /etc/nginx/conf.d/elabftw.conf

Add the following configuration:

server {
    listen 80;
    server_name your_server_domain_or_IP;
    root /var/www/;

    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/run/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Replace your_server_domain_or_IP with your server's domain name or IP address.

Save the file and exit the editor.

Step 6 - Install and configure PHP-FPM

Install and configure PHP-FPM using the following command:

sudo systemctl enable php-fpm
sudo systemctl start php-fpm

Step 7 - Configure eLabFTW

Open the eLabFTW configuration file using the following command:

sudo nano /var/www/conf/config.php

Replace the database connection settings with the following:

define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', 'root_password');
define('DB_NAME', 'dbname');

Replace root_password with the root password you set during MariaDB installation, and dbname with the name of the database you created.

Save the file and exit the editor.

Step 8 - Access eLabFTW

Restart the web server using the following command:

sudo systemctl restart nginx

Access eLabFTW in your web browser by visiting http://your_server_domain_or_IP/elabftw.

Congratulations! You have successfully installed eLabFTW on Clear Linux Latest. You can now start using eLabFTW to manage your scientific experiments and data.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!