In this tutorial, we will guide you step-by-step on how to install PrestaShop, an open-source e-commerce platform, on Elementary OS Latest.
Prerequisites
Before we begin, please make sure you have the following:
- Elementary OS Latest installed on your computer
- Access to the command line interface (terminal)
Step 1: Install Apache, PHP, and MySQL
- Open the terminal by pressing
Ctrl + Alt + T
on your keyboard.
- Update the package list by running the following command:
sudo apt update
- Install Apache by running the following command:
sudo apt install apache2
- Once Apache is installed, start the service:
sudo systemctl start apache2
- Install PHP and its dependencies:
sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-xml php-mbstring
- Install MySQL:
sudo apt install mysql-server
- Once MySQL is installed, secure the installation by running the following command:
sudo mysql_secure_installation
Step 2: Download PrestaShop
- Download the latest version of PrestaShop from their website: https://www.prestashop.com/en/download
- Extract the archive by right-clicking the downloaded file and selecting "Extract here".
Step 3: Configure Apache
- Open the Apache configuration file for editing:
sudo nano /etc/apache2/sites-available/000-default.conf
- Add the following lines of code at the very end of the file:
<Directory /var/www/html>
AllowOverride All
</Directory>
- Save the file and exit the editor.
Step 4: Move PrestaShop to the Webserver Directory
- Move the extracted PrestaShop folder to the Apache webserver directory:
sudo mv /path/to/prestashop /var/www/html/
- Change the ownership of the PrestaShop folder to the Apache user:
sudo chown -R www-data:www-data /var/www/html/prestashop
Step 5: Create a MySQL Database for PrestaShop
- Log in to MySQL:
sudo mysql -u root -p
- Once logged in, create a new database:
CREATE DATABASE prestashop_db;
- Create a new user and grant them privileges on the database:
CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON prestashop_db.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;
- Exit MySQL:
EXIT;
Step 6: Install PrestaShop
- Open your web browser and go to http://localhost/prestashop.
- Follow the on-screen instructions to install PrestaShop.
- When prompted for a database connection, use the following information:
- Database server address: localhost
- Database name: prestashop_db
- Database login: prestashop_user
- Database password: your_password
- Finish the installation process.
Congratulations! You have successfully installed PrestaShop on Elementary OS Latest. You can now log in to the PrestaShop dashboard and start building your e-commerce website.
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!