Skip to content

Installere PrestaShop på Ubuntu 24.04 Server

Cloud Infrastructure Expert
Installere PrestaShop på Ubuntu 24.04 Server

 

 

PrestaShop er en populær open-source eCommerce-plattform som lar deg lage og administrere din egen nettbutikk. Følg disse trinnene for å installere PrestaShop på din VPS-server som kjører Ubuntu 24.04.

Forutsetninger

  • En VPS-server som kjører Ubuntu 24.04
  • Root- eller sudo-tilgang
  • Grunnleggende kunnskap om kommandolinjen

Trinn 1: Oppdater systemet ditt

Sørg for at systemet ditt er oppdatert:

sudo apt update && sudo apt upgrade -y

Trinn 2: Installer nødvendige avhengigheter

Installer de nødvendige pakkene:

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

Trinn 3: Start og sikre MySQL

Start MySQL-tjenesten:

sudo systemctl start mysql

Sikre MySQL-installasjonen:

sudo mysql_secure_installation

Følg instruksjonene for å sette opp root-passordet og sikre databasen din.

Trinn 4: Opprett en database for PrestaShop

Logg inn på MySQL:

sudo mysql -u root -p

Opprett en database og bruker for 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;

Trinn 5: Last ned PrestaShop

Gå til webroot-katalogen:

cd /var/www/html

Last ned den nyeste versjonen av PrestaShop:

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

Pakke ut den nedlastede filen:

unzip prestashop_1.7.8.5.zip

Trinn 6: Sett opp tillatelser

Sett de riktige tillatelsene for PrestaShop-katalogen:

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

Trinn 7: Konfigurer Apache

Opprett en ny Apache-konfigurasjonsfil for PrestaShop:

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

Legg til følgende konfigurasjon:

<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>

Erstatt your_domain.com med ditt faktiske domenenavn.

Trinn 8: Aktiver Apache-moduler og start Apache på nytt

Aktiver modulen for omskrivning:

sudo a2enmod rewrite

Aktiver den nye nettstedkonfigurasjonen:

sudo a2ensite prestashop.conf

Start Apache på nytt:

sudo systemctl restart apache2

Trinn 9: Fullfør installasjonen av PrestaShop

Åpne nettleseren din og gå til http://your_domain.com. Følg instruksjonene på skjermen for å fullføre installasjonsprosessen for PrestaShop.

Konklusjon

Du har installert PrestaShop vellykket på din Ubuntu 24.04 VPS-server. Nå kan du begynne å bygge nettbutikken din!

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.