How to Install eLabFTW on Arch Linux
eLabFTW is a popular open-source, web-based laboratory information management system that is designed to help researchers with project management, data sharing, and documentation. In this tutorial, we will guide you on how to install eLabFTW on Arch Linux.
Prerequisites
- Arch Linux installed on your system.
- Basic knowledge of working with the command line.
Step 1: Install Apache and PHP
eLabFTW requires a web server and PHP to function correctly. We can install both packages using the pacman package manager as follows:
sudo pacman -Syu apache php
The above command will update the system, install Apache and PHP on your Arch Linux.
Step 2: Install MariaDB
eLabFTW uses MariaDB as a database back-end. To install MariaDB, run the following command:
sudo pacman -Syu mariadb
Step 3: Secure MariaDB Installation
Secure your MariaDB installation as follows:
sudo mysql_secure_installation
This command will prompt you to set the root password, remove anonymous users, disallow root login remotely, and remove the test database. Follow the prompts to secure your database installation.
Step 4: Create a Database and User for eLabFTW
Create a new database and user for eLabFTW using the following commands:
sudo mysql -u root -p
Once logged in, create a new database called elabftw, and a new user called elabftwuser with a strong password.
CREATE DATABASE elabftw;
CREATE USER 'elabftwuser'@'localhost' IDENTIFIED BY '[password]';
GRANT ALL PRIVILEGES ON elabftw.* TO 'elabftwuser'@'localhost';
FLUSH PRIVILEGES;
Make sure to replace [password] with the actual password that you set for the elabftwuser user.
Step 5: Install eLabFTW
Download the latest release of eLabFTW from their website using the following command:
cd /var/www/html
sudo wget https://github.com/elabftw/elabftw/releases/download/1.8.2/elabftw-1.8.2.zip
Extract the downloaded archive file to the Apache web server root directory and set proper permissions:
sudo unzip elabftw-*.zip
sudo chown -R http:http elabftw
sudo chmod -R 755 elabftw
Step 6: Configure Apache for eLabFTW
Create a new virtual host configuration file for eLabFTW in the /etc/httpd/conf/extra/ directory:
sudo nano /etc/httpd/conf/extra/elabftw.conf
Add the following content to the configuration file:
<VirtualHost *:80>
DocumentRoot /var/www/html/elabftw
ServerName elabftw.yourdomain.com
<Directory /var/www/html/elabftw>
AllowOverride All
</Directory>
ErrorLog "/var/log/httpd/elabftw-error_log"
CustomLog "/var/log/httpd/elabftw-access_log" common
</VirtualHost>
Make sure to replace yourdomain.com with your actual domain name. Save and close the file.
Next, enable the new virtual host configuration and restart Apache:
sudo systemctl enable httpd
sudo systemctl restart httpd
Step 7: Install PHP Extensions
Finally, install the PHP extensions required by eLabFTW:
sudo pacman -Syu php-sqlite php-intl php-gd php-ldap
Step 8: Access eLabFTW
You can now access eLabFTW by opening your web browser and entering the URL http://elabftw.yourdomain.com. You should see the eLabFTW login page. Enter the database details that you set up in Step 4 to log in.
Congratulations, you have successfully installed eLabFTW on Arch Linux.