eLabFTW is an open-source electronic laboratory notebook (ELN) that allows scientists to organize and share their experiments. Installing eLabFTW on Kali Linux is a simple process that only requires a few steps. Here is a step-by-step guide:
Before you start the installation process, make sure your system meets the following requirements:
First, you need to install the required packages for eLabFTW to work properly. Open the terminal and run the following command:
sudo apt-get update
sudo apt-get install apache2 nginx mysql-server php7.2 php7.2-fpm php7.2-mysql php7.2-intl php7.2-xml php7.2-mbstring git
After installing the required packages, navigate to the root directory of your webserver (/var/www/html) and clone the eLabFTW repository from GitHub using the following command:
cd /var/www/html
sudo git clone https://github.com/elabftw/elabftw.git
Before proceeding, you need to change the ownership and permissions of the eLabFTW directory. Run the following command to change the ownership to the Apache or Nginx user:
sudo chown -R www-data:www-data /var/www/html/elabftw
Next, set the folder permission to 775:
sudo chmod -R 775 /var/www/html/elabftw
Create a new MySQL or MariaDB database for eLabFTW. You can use the following command to create a new database named "elabftw":
sudo mysql -u root -p
CREATE DATABASE elabftw;
Next, you need to configure the PHP settings for eLabFTW. Open the PHP configuration file using the following command:
sudo nano /etc/php/7.2/fpm/php.ini
Find and modify the following lines in the file:
upload_max_filesize = 50M
max_file_uploads = 20
post_max_size = 50M
max_input_vars = 5000
max_execution_time = 300
memory_limit = 512M
Save and exit the file.
Configure a virtual host for the eLabFTW installation. Create a new configuration file in /etc/apache2/sites-available/ or /etc/nginx/sites-available/ (depending on your web server) named elabftw.conf with the following content.
For Apache:
<VirtualHost *:80>
ServerName elabftw.local
DocumentRoot /var/www/html/elabftw
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
For Nginx:
server {
listen 80;
server_name elabftw.local;
root /var/www/html/elabftw;
index index.php index.html index.htm;
error_log /var/log/nginx/elabftw_error.log;
access_log /var/log/nginx/elabftw_access.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 300;
}
}
Make sure to modify the ServerName and root as per your setup.
Then, enable the virtual hosts using the following commands:
sudo a2ensite elabftw.conf #For Apache
sudo ln -s /etc/nginx/sites-available/elabftw /etc/nginx/sites-enabled/ #For Nginx
Copy the "config-sample.php" file in the "src/" directory to "config.php" and modify it with your database connection settings:
cd /var/www/html/elabftw/
cp src/config-sample.php config.php
sudo nano config.php
Find the following lines in the file and modify them according to your database details:
define('DB_HOST', 'localhost');
define('DB_NAME', 'elabftw');
define('DB_PORT', '');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
Save and exit the file.
Restart Apache or Nginx using the following command and then access the eLabFTW installation through your web browser:
sudo service apache2 restart #For Apache
sudo service nginx restart #For Nginx
Open your web browser and access your server by entering the IP address or domain name of your server in the address bar:
http://your_server_IP_address_or_domain_name/elabftw
You will see the eLabFTW installation page. Follow the on-screen instructions to complete the installation.
Congratulations! You have successfully installed eLabFTW on Kali Linux.
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!
Alternatively, for the best virtual desktop, try Shells!