How to Install eLabFTW on Manjaro
eLabFTW is a free and open-source laboratory notebook available for various operating systems. In this tutorial, we will learn how to install eLabFTW on Manjaro.
Prerequisites
Before proceeding with the installation process, make sure your Manjaro system is up to date using the following command:
sudo pacman -Syu
Also, you must have installed LAMP stack on your system. If not, run the following commands to install it:
sudo pacman -S apache mariadb php php-apache
sudo systemctl enable --now httpd mariadb
sudo mysql_secure_installation
These commands will install the Apache web server, PHP scripting language, and the MariaDB database server. They will also enable and start the Apache and MariaDB services.
Installation
Follow the below steps to install eLabFTW:
Step 1: Download eLabFTW
Open the terminal and go to the Apache’s document root directory that is /var/www/html. Then, download the eLabFTW package from their website using the following command:
sudo wget https://download.elabftw.net/3.6/elabftw-3.6.tar.gz
Step 2: Extract eLabFTW
Once the download is complete, extract the eLabFTW package using the following command:
sudo tar -xzf elabftw-3.6.tar.gz
After the extraction process completes, rename the extracted directory using the following command:
sudo mv elabftw-3.6 elabftw
Step 3: Configure MariaDB
First, log in to the MySQL server using the following command:
sudo mysql -u root -p
Create a new database for eLabFTW using the following command:
CREATE DATABASE elabftw;
Create a new user and grant it all the privileges on the elabftw database:
CREATE USER 'elabftwuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON elabftw.* TO 'elabftwuser'@'localhost';
FLUSH PRIVILEGES;
Replace the username and password with the desired ones.
Step 4: Configuration
Now, it's time to configure the eLabFTW.
Navigate to the eLabFTW directory using the following command:
cd /var/www/html/elabftw
Copy the config.php.dist file to config.php using the following command:
sudo cp config.php.dist config.php
Now, edit the config.php file using your favorite text editor:
sudo nano config.php
Update the following options in the config.php file:
$db_info = array(
'db_host' => 'localhost',
'db_name' => 'elabftw',
'db_user' => 'elabftwuser',
'db_password' => 'password',
);
Save and close the file.
Step 5: Enabling Apache Configuration
Create a new virtual host file for eLabFTW using the following command:
sudo nano /etc/httpd/conf/extra/elabftw.conf
Add the following content to the file:
<VirtualHost *:80>
DocumentRoot "/var/www/html/elabftw"
ServerName localhost
<Directory "/var/www/html/elabftw">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Save and close the file.
Step 6: Restart Apache
Once you've completed all the steps, restart the Apache server to apply the changes:
sudo systemctl restart httpd
Step 7: Accessing the eLabFTW
Open your favorite web browser and go to URL http://localhost/elabftw to access the eLabFTW web interface.
Conclusion
In this tutorial, we have learned how to install and configure eLabFTW on Manjaro. Now, you are ready to organize and manage your laboratory notebooks through eLabFTW.