Atlantic.Net Blog

How to Install PrestaShop on Oracle Linux 8

Hitesh Jethva
by Atlantic.Net (511 posts) under Dedicated Server Hosting, Tutorials
0 Comments

PrestaShop is a free and open-source shopping cart system that allows you to quickly host your own online shop. It is written in the PHP programming language with support for the MySQL database management system. PrestaShop has over 300 functionalities, such as unlimited products with attributes, categories, multistore, many currencies, languages, payment, delivery methods, CMS, filtering, statistics, e-marketing, transactional e-mailing, and many more.

In this post, we will show you how to install PrestaShop on Oracle Linux 8.

Prerequisites

  • A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install the LAMP Server

First, install the Apache and MariaDB server package with the following command:

dnf install httpd mariadb-server

Once both packages are installed, enable the PHP module with the following command:

dnf module enable php:7.4

You will get the following output:

Last metadata expiration check: 2:06:55 ago on Tuesday 19 July 2022 03:11:19 AM EDT.
Dependencies resolved.
==============================================================================================================================================
 Package                           Architecture                     Version                           Repository                         Size
==============================================================================================================================================
Enabling module streams:
 nginx                                                              1.14                                                                     
 php                                                                7.4                                                                      

Transaction Summary
==============================================================================================================================================

Is this ok [y/N]: 

Next, install PHP with other required extensions using the following command:

dnf install php php-zip php-xml php-gd php-curl php-fpm php-intl php-xmlrpc php-mbstring php-mysqli php-bcmath php-dom php-posix php-cli php-pdo php-posix php-fileinfo php-json php-iconv -y

Next, edit the PHP configuration file and change some default settings:

nano /etc/php.ini

Change the following lines:

memory_limit = 256M
post_max_size = 64M
upload_max_filesize = 64M

Save and close the file, then start and enable the Apache, MariaDB, and PHP-FPM services:

systemctl start httpd mariadb php-fpm
systemctl enable httpd mariadb php-fpm

Step 3 – Create a Database for PrestaShop

Next, you will need to create a database and user for PrestaShop. First, log in to the MariaDB shell with the following command:

mysql

Once logged in, create a database and user with the following command:

CREATE DATABASE prestadb;
CREATE USER 'prestauser'@'localhost' IDENTIFIED BY 'yourpassword';

Next, grant all the privileges to the prestadb database:

GRANT ALL PRIVILEGES ON prestadb.* TO 'prestauser'@'localhost';

Next, flush the privileges and exit from the MariaDB shell with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Download PrestaShop

Next, visit the PrestaShop Git Hub download page, pick the latest version and download it with the following command:

wget https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.6/prestashop_1.7.8.6.zip

Once the download is completed, unzip the downloaded file to the PrestaShop directory:

mkdir /var/www/html/prestashop
unzip prestashop_1.7.8.6.zip -d /var/www/html/prestashop

Next, change the permissions and ownership of the PrestaShop using the following command:

chown -R apache:apache /var/www/html/prestashop
chmod -R 775 /var/www/html/prestashop

Step 5 – Configure Apache for PrestaShop

Next, create an Apache virtual host configuration file using the following command:

nano /etc/httpd/conf.d/prestashop.conf

Add the following configuration:

<VirtualHost *:80>

ServerName prestashop.example.com
DocumentRoot /var/www/html/prestashop

<Directory /var/www/html/prestashop/>
    Options -Indexes +FollowSymLinks
    AllowOverride All
</Directory>

ErrorLog /var/log/httpd/prestashop-error.log
CustomLog /var/log/httpd/prestashop-access.log combined

</VirtualHost>

Save and close the file, then restart the Apache service to apply the configuration:

systemctl restart httpd

To check the Apache status, run the following command:

systemctl status httpd

You will get the following output:

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Tue 2022-07-19 05:44:24 EDT; 4s ago
     Docs: man:httpd.service(8)
 Main PID: 33190 (httpd)
   Status: "Started, listening on: port 80"
    Tasks: 213 (limit: 11409)
   Memory: 24.5M
   CGroup: /system.slice/httpd.service
           ├─33190 /usr/sbin/httpd -DFOREGROUND
           ├─33193 /usr/sbin/httpd -DFOREGROUND
           ├─33194 /usr/sbin/httpd -DFOREGROUND
           ├─33195 /usr/sbin/httpd -DFOREGROUND
           └─33196 /usr/sbin/httpd -DFOREGROUND

Jul 19 05:44:24 oraclelinux8 systemd[1]: httpd.service: Succeeded.
Jul 19 05:44:24 oraclelinux8 systemd[1]: Stopped The Apache HTTP Server.
Jul 19 05:44:24 oraclelinux8 systemd[1]: Starting The Apache HTTP Server...

Step 6 – Access PrestaShop Web Interface

At this point, PrestaShop is installed and configured. Now, open your web browser and access the PrestaShop web UI using the URL http://prestashop.example.com. You should see the language selection screen:
Prestashop language selection page
Select your language and click on the Next button. You should see the license agreement screen:
Prestashop license page
Accept the license agreement and click on the Next button. You should see the store information screen:
Prestashop store information page
Prestashop store information page 2
Provide your store information, email, password, then click on the Next button. You should see the database configuration screen:

Prestashop database information page
Click on the “Test your database connection now” then click on the Next button. Once the installation is finished, you should see the following screen:
Prestashop installation finished page
Next, remove the installation directory using the following command:

rm -rf /var/www/html/prestashop/install/

Click on the Manage Your Store button. You should see the PrestaShop login screen:
Prestashop login page
Provide your admin username and password and click on the LOG IN button. You should see the PrestaShop dashboard on the following screen:

Prestashop dashboard page

Conclusion

In this post, we explained how to install PrestaShop on Oracle Linux 8. You can now host your own e-commerce CMS and start selling your products online. For more information, visit PrestaShop’s documentation. Try it on dedicated hosting from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Set Up Kubernetes Cluster Using Minikube on Arch Linux
How to Install Jenkins on Arch Linux
Which Compliance Standards Require an IPS?
Install Netdata Monitoring Tool on Arch Linux
How to Install Vue.js on Arch Linux

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Garland, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources