How to Install Thelia on Arch Linux

Thelia is an open-source and free e-commerce solution that allows you to create and manage your online store easily. In this tutorial, we will guide you on how to install the latest version of Thelia on Arch Linux.

Prerequisites:

Step 1: Install Apache Web Server

To start, you need to install the Apache webserver on your Arch Linux instance. Run the following command to install Apache:

sudo pacman -S apache

To enable and start the Apache service, run the following command:

sudo systemctl enable apache
sudo systemctl start apache

You can verify the Apache server is running by visiting your IP address in your browser.

http://your_server_IP_address/

Step 2: Install MariaDB

Next, you will need to install the MariaDB server to store Thelia's data. Run the following command to install MariaDB:

sudo pacman -S mariadb

To start and enable the MariaDB service, run the following commands:

sudo systemctl start mariadb
sudo systemctl enable mariadb

After starting the MariaDB service, we must run the security script to set up the root password and other security settings:

sudo mysql_secure_installation

You will be prompted to set up a new root password and secure the installation. After completing the setup, you can log in to the MariaDB server:

sudo mysql -u root -p

Step 3: Install PHP and Required Modules

Thelia requires PHP version 7.2 or later, and several required modules must be installed. Run the following command to install PHP and required modules:

sudo pacman -S php php-apache php-mysql mariadb

After installing PHP, you will need to modify the PHP configuration file to adjust some settings by running the following command:

sudo nano /etc/php/php.ini

Change the following values:

uncomment:

extension=mysqli

and update the following values:

memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 360
date.timezone=YOUR_TIMEZONE

Save and close the file by using the CTRL + X key combination and then confirming the changes by pressing Y and hitting Enter.

After modifying the PHP configuration file, you will need to restart the Apache service:

sudo systemctl restart apache

Step 4: Download and Install Thelia

To download and install Thelia, you need to clone the GitHub repository:

git clone https://github.com/thelia/thelia.git

Enter into the Thelia directory and switch to the appropriate branch:

cd thelia/
git branch -r
git checkout <branch_name>

For example, if you want to install the latest stable version, use the following command:

git checkout 2.5.9

After checking out the specific branch, copy the env file by running the following command:

cp env-default .env

Then, install the required libraries:

composer install

If you don't have composer installed, you can use the following command to install it:

sudo pacman -S composer

Once the installation is complete, you can proceed to install Thelia by running the following command:

php Thelia install

During the installation, you will be prompted to set up the database and other settings, such as your website name and credentials.

Step 5: Configure Thelia

After installation, you will need to configure Thelia by updating the configuration file:

nano /var/www/thelia_local/config/local_config.php

Update the following information:

define('SECRET_PASSPHRASE', 'set_your_own_secret_key_here');

After updating the configuration file, save and close it.

Step 6: Access Thelia

That’s it. You have successfully installed Thelia on your Arch Linux instance.

You can now visit your Thelia URL in your web browser to access the login page:

http://your_ip_address/thelia

You can log in using the username and password you created during the installation process.

Conclusion

This tutorial explained how to install Thelia on Arch Linux. We hope you have found it helpful. If you have any questions or comments, please feel free to leave them below.

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!