How to Install Thelia on Clear Linux

Thelia is an open-source e-commerce platform used to build online stores. It is a flexible and powerful tool that allows you to customize your online store as per your requirements. In this tutorial, we will go through the steps required to install Thelia on Clear Linux.

Prerequisites

Before starting with the installation process, make sure you have the following prerequisites:

Step 1: Create a MySQL Database

First, log in to the MySQL/MariaDB server as the root user and create a new database and user for Thelia. You can use the following commands:

$ sudo mysql -u root -p

MariaDB [(none)]> CREATE DATABASE thelia;
MariaDB [(none)]> CREATE USER 'theliauser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON thelia.* TO 'theliauser'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Step 2: Install required PHP modules

Install the required PHP modules using the following command:

$ sudo swupd bundle-add php php-mysqlnd php-curl php-gd php-mbstring php-zip

Step 3: Install Composer

Composer is a dependency manager for PHP packages. We need to install it to download and install Thelia.

Run the following command to install Composer:

$ sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 4: Download and Install Thelia

  1. Create a new directory for Thelia installation:
$ sudo mkdir /var/www/thelia
  1. Download Thelia from the official website using the following command:
$ sudo composer create-project thelia/thelia /var/www/thelia
  1. Navigate to the Thelia directory:
$ cd /var/www/thelia
  1. Install Thelia using the following command:
$ sudo php Thelia install
  1. Follow the onscreen prompt and enter the required information to complete the installation process.

Step 5: Configure Web Server

  1. Create a new virtual host configuration file for Thelia:
$ sudo nano /etc/nginx/sites-available/thelia.conf
  1. Add the following configuration to the file:
server {
    listen 80;
    server_name domain.com; #Change domain.com with your domain name or IP address
    root /var/www/thelia/web;
    index index.php index.html;

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

    location ~ ^/admin(.*)$ {
        index index.php;
        auth_basic "Restricted Access";
        auth_basic_user_file /etc/nginx/.htpasswd; # Use your own htpasswd file
        try_files $uri /index.php?$args$1;
    }
 
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        try_files $uri =404;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

Change the server_name with your own domain name or IP address.

  1. Save the file and exit. Then, create a symbolic link to the nginx's site-enabled directory:
$ sudo ln -s /etc/nginx/sites-available/thelia.conf /etc/nginx/sites-enabled/
  1. Test the configuration:
$ sudo nginx -t
  1. Restart the Nginx server:
$ sudo systemctl restart nginx

Step 6: Access Thelia Web Interface

Now open your web browser and enter your domain name or IP address. You should see the Thelia installation wizard.

Follow the onscreen instructions to complete the installation. Once the installation is complete, you can log in to Thelia's admin panel by going to http://your-domain.com/admin. Log in with the administrator username and password generated during the installation process.

Conclusion

Congratulations! You have successfully installed Thelia on Clear Linux. You can now customize your online store as per your requirements.

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!