Instalace Prestashop na Ubuntu 22.04

Instalace Apache http serveru

sudo apt install apache2
Files 

apache2.conf The main Apache2 configuration file. Contains settings that are global to Apache2. Note: Historically, the main Apache2 configuration file was httpd.conf, named after the “httpd” daemon. In other distributions (or older versions of Ubuntu), the file might be present. In modern releases of Ubuntu, all configuration options have been moved to apache2.conf and the below referenced directories and httpd.conf no longer exists. 

envvars File where Apache2 environment variables are set. 

magic Instructions for determining MIME type based on the first few bytes of a file. 

ports.conf Houses the directives that determine which TCP ports Apache2 is listening on.

Povolit mod_rewrite modul

sudo a2enmod rewrite

sudo systemctl restart apache2.service 

Nastavit SSL

Připravit certifikát

openssl req –new –newkey rsa:2048 –nodes –keyout <server-name>.key –out <server-name>.csr
openssl x509 -signkey <server-name>.key -in <server-name>.csr -req -days 365 -out <server-name>.crt

Povolit ssl modul

sudo a2enmod ssl

sudo systemctl restart apache2.service 

V httpd.conf nastavit virtualhost

<VirtualHost *:443>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/<server-name>.crt
SSLCertificateKeyFile /etc/apache2/ssl/<server-name>.key
</VirtualHost>

2. Instalace MySQL

sudo apt install mysql-server

Vytvořit uživatele prestashop a databázi prestashop

Přihlásit se do mysql pod root uživatelem.
mysql -root
Vytvořit databázi a nového uživatele
create database prestashop;
create user prestashop identified by 'heslo';
grant all privileges on *.* to 'prestashop';

3. Instalace PHP

sudo apt install php libapache2-mod-php
sudo apt install php-mysql
sudo apt install php-zip
sudo apt install php-simplexml
sudo apt install php-curl
sudo apt install php-gd
sudo apt install php-intl
sudo apt install php-mbstring

sudo systemctl restart apache2.service 
Odkomentovat řádek extension=curl v souboru php.ini (/etc/php/8.1/cli/php.ini)

4. Nahrát instalační soubor Prestashop

https://github.com/PrestaShop/PrestaShop/releases/tag/8.1.1 Rozbalit zip soubor do /var/www/html

Spustit instalaci

http://localhost/index.php












Komentáře