How to Install Thelia on Void Linux

Thelia is an open-source e-commerce platform that enables businesses to create online stores. This tutorial provides step-by-step instructions for installing Thelia on Void Linux.

Prerequisites

Before you start the installation process, you need to ensure that your system meets the following prerequisites:

Step 1: Install Dependencies

Open a terminal window and enter the following commands to install dependencies:

sudo xbps-install -S php-fpm php-mysqli php-curl php-gd php-json php-mbstring php-session php-xml php-zip composer nginx

Step 2: Download and Install Thelia

  1. Go to the Thelia website at https://thelia.net/download/.
  2. Click on the latest stable version of Thelia and copy the link to the download page.
  3. Open a terminal window and enter the following commands:
cd /tmp
wget <paste the link to the downloaded Thelia file>
tar -xzf <filename> -C /usr/share/nginx/
cd /usr/share/nginx/<folder extracted from the downloaded Thelia file>
sudo composer install

Step 3: Create a Database

  1. Log in to MySQL or MariaDB using the following command:
mysql -u root -p
  1. Enter your MySQL or MariaDB root password when prompted.
  2. Create a database for Thelia by entering the following command:
CREATE DATABASE thelia_db;
  1. Create a new user for Thelia by entering the following command:
CREATE USER 'thelia_user'@'localhost' IDENTIFIED BY 'thelia_password';
  1. Grant permissions to the new user on the Thelia database by entering the following command:
GRANT ALL PRIVILEGES ON thelia_db.* TO 'thelia_user'@'localhost';
  1. Exit MySQL or MariaDB by entering the following command:
exit;

Step 4: Configure Thelia

  1. Copy the sample configuration file by entering the following command:
cp .env.dist .env
  1. Open the configuration file using a text editor:
nano .env
  1. Modify the following settings in the file:
[database]
db_driver=pdo_mysql
db_user=thelia_user
db_password=thelia_password
db_name=thelia_db
  1. Save and close the file by hitting Ctrl + X, then Y, then Enter.

Step 5: Configure Nginx

  1. Create a new Nginx server block file by entering the following command:
sudo nano /etc/nginx/conf.d/thelia.conf
  1. Add the following contents to the file:
server {
  listen 80;
  server_name yourdomain.com;
  root /usr/share/nginx/public;

  index index.html index.htm index.php;

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

  location ~ \.php$ {
      fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
      fastcgi_index index.php;
      include fastcgi_params;
  
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param PATH_INFO $fastcgi_path_info;
      fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  }

  location ~* \.(jpg|jpeg|gif|png|css|js|ico)$ {
      expires max;
      log_not_found off;
  }
}
  1. Save and close the file by hitting Ctrl + X, then Y, then Enter.

  2. Test the Nginx configuration by entering the following command:

sudo nginx -t
  1. Restart Nginx by entering the following command:
sudo systemctl restart nginx

Step 6: Access Thelia

  1. Open a web browser and navigate to http://yourdomain.com/.
  2. Follow the Thelia installation wizard to complete the installation.

Congratulations! You have successfully installed and configured Thelia on Void 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!