Thelia is an open-source e-commerce solution used for creating online stores. It is built on Symfony PHP framework and provides a customizable platform for managing online shops. This tutorial will guide you through the process of installing Thelia on the latest version of MXLinux.
Before we begin, ensure that your system meets the following requirements:
You should have root or sudo access to perform the commands listed in this tutorial.
The first step is to download and extract the latest version of Thelia from their official website using the following command:
wget https://thelia.net/telechargements/thelia_2.4.1.zip
unzip thelia_2.4.1.zip
Replace the download link with the latest version available.
This will download the Thelia zip file and extract it to the current directory.
Next, we need to configure Apache to serve the Thelia files on our system. Create a new Apache virtual host configuration file for Thelia using your favorite text editor.
sudo nano /etc/apache2/sites-available/thelia.conf
Add the following configuration to the file:
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/thelia/public
<Directory /var/www/thelia/public>
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/thelia_error.log
CustomLog ${APACHE_LOG_DIR}/thelia_access.log combined
</VirtualHost>
Replace yourdomain.com with your website domain and /var/www/thelia/public with the path where Thelia is extracted.
Save and close the file.
Enable the newly created virtual host and disable the default one with the following commands:
sudo a2ensite thelia.conf
sudo a2dissite 000-default.conf
Finally, restart Apache for the changes to take effect using the following command:
sudo systemctl restart apache2
Thelia requires a database to store its data. We will now create a new database for Thelia and configure it.
First, log in to your MySQL/MariaDB server using the following command:
sudo mysql -u root -p
Enter the root password when prompted.
Now, create a new database and user for Thelia using the following commands:
CREATE DATABASE thelia_db;
CREATE USER 'thelia_user'@'localhost' IDENTIFIED BY 'thelia_password';
GRANT ALL PRIVILEGES ON thelia_db.* TO 'thelia_user'@'localhost';
FLUSH PRIVILEGES;
Replace thelia_db with the name you want for your database, thelia_user with the username you want for the user and thelia_password with the password you want for the user.
Exit the MySQL/MariaDB shell using the following command:
exit
Next, we need to configure Thelia. Copy the config-example.php file to config.php using the following command:
cd /var/www/thelia/
cp config/config-example.php config/config.php
Edit the copied config.php file using your favorite text editor:
nano config/config.php
Change the database settings to the following:
'database' => array(
'adapter' => 'mysql',
'params' => array(
'host' => 'localhost',
'username' => 'thelia_user',
'password' => 'thelia_password',
'dbname' => 'thelia_db',
'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")
)
),
Replace the values for username, password and dbname with the appropriate ones for your configuration.
Save and close the file.
Now that we have Apache and Thelia configured, we can proceed with the installation process. Open your web browser and navigate to http://yourdomain.com.
You will see the Thelia installation wizard. Follow the instructions displayed on each page to complete the installation.
During the database configuration step, use the same values for the database as you did in Step 3.
Once the installation is complete, you will be directed to the login page. Use the username and password set during installation to log in.
Thelia is now installed and ready to use on your MXLinux system. You can now customize it further and start creating your online store using Thelia.
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!