How to Install eLabFTW on MXLinux Latest
Introduction
eLabFTW is a free and open source electronic lab notebook software that allows scientists, researchers, and students to manage their experiments, protocols, and laboratory data in a secure and organized manner.
In this tutorial, we will walk through the process of installing eLabFTW on MXLinux latest version.
Prerequisites
- A running instance of MXLinux latest version.
- Sudo or root access to the MXLinux instance.
- Basic knowledge of the Linux command line.
Step 1: Update your system
Before installing any software, it is always recommended to update your system packages to the latest version. Run the following command to update the system.
sudo apt-get update && sudo apt-get upgrade
Type in your password when prompted and let the system update.
Step 2: Install dependencies
eLabFTW requires some dependencies to be installed on your system. We need to install the Apache web server, PHP, MySQL server, and some other required PHP modules. Run the following command to install dependencies:
sudo apt-get install apache2 php7.4 libapache2-mod-php7.4 php-mysql mysql-server php-mbstring php-xml php-zip
During the installation, you will be prompted to enter the MySQL root password. Type in a secure password and remember it for later.
Step 3: Download eLabFTW
Go to the official website of eLabFTW: https://www.elabftw.net/ and download the latest version of the software in .zip format.
Once the download is complete, extract the file to the /var/www directory:
sudo unzip elabftw-latest.zip -d /var/www/
This will create a new directory named elabftw in the /var/www directory.
Step 4: Configure Apache for eLabFTW
Now we need to configure the Apache web server to serve the eLabFTW application. We will create a new virtual host configuration file for eLabFTW.
Run the following command to create a new virtual host configuration file:
sudo nano /etc/apache2/sites-available/elabftw.conf
Paste the following configuration code into the file:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/elabftw
ServerName example.com
<Directory /var/www/elabftw>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/elabftw_error.log
CustomLog ${APACHE_LOG_DIR}/elabftw_access.log combined
</VirtualHost>
Save and close the file (Ctrl+X, Y, Enter).
Now we need to enable the site and restart Apache:
sudo a2ensite elabftw.conf
sudo systemctl restart apache2
Step 5: Create a MySQL database for eLabFTW
eLabFTW requires a MySQL database to store its data. We will create a new database and a user for the eLabFTW application.
Log in to the MySQL server using the following command:
sudo mysql -u root -p
Enter the MySQL root password when prompted.
Create a new database for eLabFTW:
CREATE DATABASE elabftw_db;
Create a new MySQL user with a strong password:
CREATE USER 'elabftw_user'@'localhost' IDENTIFIED BY 'your_strong_password';
Replace your_strong_password with a secure password of your choice.
Give the user full access to the database:
GRANT ALL PRIVILEGES ON elabftw_db.* TO 'elabftw_user'@'localhost';
Flush the MySQL privileges and exit:
FLUSH PRIVILEGES;
EXIT;
Step 6: Configure eLabFTW
Rename the config.sample.php file to config.local.php:
cd /var/www/elabftw/
sudo cp config.sample.php config.local.php
Open the config.local.php file:
sudo nano config.local.php
Update the following lines with your MySQL database details:
define('DB_HOST', 'localhost');
define('DB_NAME', 'elabftw_db');
define('DB_USERNAME', 'elabftw_user');
define('DB_PASSWORD', 'your_strong_password');
Save and close the file (Ctrl+X, Y, Enter).
Step 7: Access eLabFTW
Open a web browser and navigate to http://example.com, where example.com is the domain name or IP address of your MXLinux instance.
The eLabFTW installation wizard should appear. Follow the on-screen instructions to complete the installation process.
Once the installation is complete, you can log in to eLabFTW using the default username admin and password admin.
Conclusion
Congratulations! You have successfully installed eLabFTW on MXLinux latest version. You can now start using eLabFTW to manage your experiments, protocols, and laboratory data.