Thelia is an open-source e-commerce platform that helps you create an online store. It is a PHP-based application that runs on a web server. In this tutorial, we will learn how to install Thelia on Elementary OS Latest.
Before we begin with Thelia installation, make sure you have the following prerequisites installed on your system:
The first thing you need to do is to install the required packages for Thelia. You can do this by running the following command in your terminal:
sudo apt-get update
sudo apt-get install apache2 php7.4 libapache2-mod-php7.4 php7.4-mysql mysql-server unzip git composer -y
After installing the required packages, you need to create a database for Thelia. You can do this by running the following commands one by one:
sudo mysql -u root
This will open the MySQL console. Here, you need to create a new database, user, and grant privileges to the user. Run the following commands:
CREATE DATABASE thelia;
CREATE USER 'theliauser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON thelia.* TO 'theliauser'@'localhost';
FLUSH PRIVILEGES;
exit
Replace the "password" with your desired password for the user.
Next, you need to clone the Thelia repository from GitHub by running the following command:
git clone https://github.com/thelia/thelia.git thelia
This will create a "thelia" directory in your current directory.
Once you have cloned the Thelia repository, navigate to the "thelia" directory and run the following command to install the Thelia dependencies:
cd thelia
composer install
This may take a few minutes to complete.
After installing the dependencies, you need to configure Thelia by creating a configuration file. To do this, run the following command:
cp local/config/database.yml.dist local/config/database.yml
Next, open the database.yml file and update the following lines with your database details:
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: 3306
database_name: thelia
database_user: theliauser
database_password: password
database_path: null
database_charset: utf8mb4
database_collation: utf8mb4_unicode_ci
Again, replace the "password" with your desired database user password.
Next, you need to create the Thelia configuration file by running the following command:
cp local/config/parameters.yml.dist local/config/parameters.yml
Next, you need to setup a virtual host for Thelia. To do this, create a new configuration file in the "sites-available" directory by running the following command:
sudo nano /etc/apache2/sites-available/thelia.conf
Then, copy and paste the following content into the file:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/thelia/web
<Directory /var/www/thelia>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/thelia_error.log
CustomLog ${APACHE_LOG_DIR}/thelia_access.log combined
</VirtualHost>
Save and close the file.
After creating the virtual host, you need to enable it by running the following command:
sudo a2ensite thelia.conf
Next, restart the Apache web server by running the following command:
sudo service apache2 restart
After configuring the virtual host, you can now install Thelia by running the following command in the "thelia" directory:
php Thelia install
This command will start the installation process. Follow the on-screen instructions to complete the installation.
Once the installation is complete, you can access the Thelia admin panel by opening your web browser and navigating to "http://localhost/admin".
Use the admin credentials you have created during the installation process to login to the admin panel.
That's it! You have successfully installed Thelia on Elementary OS Latest.
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!