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.
Before starting with the installation process, make sure you have the following prerequisites:
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
Install the required PHP modules using the following command:
$ sudo swupd bundle-add php php-mysqlnd php-curl php-gd php-mbstring php-zip
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
$ sudo mkdir /var/www/thelia
$ sudo composer create-project thelia/thelia /var/www/thelia
$ cd /var/www/thelia
$ sudo php Thelia install
$ sudo nano /etc/nginx/sites-available/thelia.conf
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.
$ sudo ln -s /etc/nginx/sites-available/thelia.conf /etc/nginx/sites-enabled/
$ sudo nginx -t
$ sudo systemctl restart nginx
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.
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!