Skip to content

Sådan installeres PrestaShop på Ubuntu 24.04 Server

Cloud Infrastructure Expert
Sådan installeres PrestaShop på Ubuntu 24.04 Server

 

 

PrestaShop er en populær open-source eCommerce platform, der giver dig mulighed for at oprette og administrere din egen online butik. Følg disse trin for at installere PrestaShop på din VPS-server, der kører Ubuntu 24.04.

Forudsætninger

  • En VPS-server, der kører Ubuntu 24.04
  • Root- eller sudo-adgang
  • Grundlæggende kendskab til kommandolinjen

Trin 1: Opdater dit system

Sørg for, at dit system er opdateret:

sudo apt update && sudo apt upgrade -y

Trin 2: Installer nødvendige afhængigheder

Installer de nødvendige pakker:

sudo apt install -y apache2 mysql-server php libapache2-mod-php php-mysql php-xml php-mbstring php-curl php-zip php-gd

Trin 3: Start og sikr MySQL

Start MySQL-tjenesten:

sudo systemctl start mysql

Sikre MySQL-installationen:

sudo mysql_secure_installation

Følg anvisningerne for at indstille din root-adgangskode og sikre din database.

Trin 4: Opret en database til PrestaShop

Log ind på MySQL:

sudo mysql -u root -p

Opret en database og bruger til PrestaShop:

CREATE DATABASE prestashop;
CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Trin 5: Download PrestaShop

Naviger til webrodsbiblioteket:

cd /var/www/html

Download den nyeste version af PrestaShop:

wget https://download.prestashop.com/download/releases/prestashop_1.7.8.5.zip

Udpak den downloadede fil:

unzip prestashop_1.7.8.5.zip

Trin 6: Indstil rettigheder

Indstil de korrekte rettigheder for PrestaShop-kataloget:

sudo chown -R www-data:www-data /var/www/html/*
sudo chmod -R 755 /var/www/html/*

Trin 7: Konfigurer Apache

Opret en ny Apache-konfigurationsfil til PrestaShop:

sudo nano /etc/apache2/sites-available/prestashop.conf

Tilføj følgende konfiguration:

<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName your_domain.com

    <Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Erstat your_domain.com med dit faktiske domænenavn.

Trin 8: Aktivér Apache-moduler og genstart Apache

Aktivér omdirigeringsmodulet:

sudo a2enmod rewrite

Aktivér den nye webkonfiguration:

sudo a2ensite prestashop.conf

Genstart Apache:

sudo systemctl restart apache2

Trin 9: Afslut installationen af PrestaShop

Åbn din webbrowser og gå til http://your_domain.com. Følg instruktionerne på skærmen for at afslutte installationen af PrestaShop.

Konklusion

Du har med succes installeret PrestaShop på din Ubuntu 24.04 VPS-server. Du kan nu begynde at opbygge din online butik!

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Windows VPS

Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.