« PrestaShop » : différence entre les versions

De Le Wiki de Lug
Aller à la navigation Aller à la recherche
Ligne 53 : Ligne 53 :
  # chown -R apache:apache /var/www/html/<font color = green>prestashop</font>/
  # chown -R apache:apache /var/www/html/<font color = green>prestashop</font>/
  # chmod -R 775 /var/www/html/<font color = green>prestashop</font>/
  # chmod -R 775 /var/www/html/<font color = green>prestashop</font>/
Configuration de apache :
# mkdir /etc/httpd/sites-available /etc/httpd/sites-enabled
# vi /etc/httpd/conf/httpd.conf
<font color = grey>...
IncludeOptional conf.d/*.conf</font>
<font color = blue>IncludeOptional sites-enabled/*.conf</font>
# vi /etc/httpd/sites-available/<font color = green>prestashop</font>.conf
<VirtualHost *:80>
    ServerAdmin <font color = blue>monmail@exemple.net</font>
    ServerName <font color = blue>prestashop.exemple.net</font>
    ServerAlias <font color = blue>www.prestashop.exemple.net</font>
    DocumentRoot /var/www/html/<font color = green>prestashop</font>
    <Directory /var/www/html/<font color = green>prestashop</font>>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog /var/log/httpd/<font color = green>prestashop</font>-error_log
    CustomLog /var/log/httpd/<font color = green>prestashop</font>-access_log common
</VirtualHost>
# ln -s /etc/httpd/sites-available/<font color = green>prestashop</font>.conf /etc/httpd/sites-enabled/
  # systemctl restart httpd
  # systemctl restart httpd
Après avoir créé un [[Nginx_ReverseProxy_LXC_Alpine_Linux#Création_d'un_"vhost"_sécurisé|VHost]] on se connecte avec un navigateur pour finaliser l'installation..
Après avoir créé un [[Nginx_ReverseProxy_LXC_Alpine_Linux#Création_d'un_"vhost"_sécurisé|VHost]] on se connecte avec un navigateur pour finaliser l'installation..

Version du 8 octobre 2022 à 13:20

Installation

Alma Linux

Source

# dnf update && dnf upgrade

Installation Serveur LAMP

Apache :

# dnf install httpd
# systemctl enable --now httpd

php 8.1 :

source

# dnf install epel-release
# dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
# dnf update
# dnf module enable php:remi-8.1
# dnf install php php-{zip,xml,gd,curl,intl,xmlrpc,mbstring,mysqli,bcmath,dom,posix,cli,pdo,posix,fpm,fileinfo,json,iconv}

On augmente certaines limitations de PHP :

# sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php.ini
# sed -i 's/post_max_size = .*/post_max_size = 64M/' /etc/php.ini
# sed -i 's/upload_max_filesize = .*/upload_max_filesize = 64M/' /etc/php.ini

MariaDB :

# dnf install mariadb-server mariadb
# systemctl enable --now mariadb

On sécurise MariaDB :

# mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n] y
New password: 
Re-enter new password:
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Création BDD Prestashop

# mysql -u root -p
> CREATE DATABASE mabaseprestashop;
> CREATE USER 'monutilisateur'@'localhost' IDENTIFIED BY 'monsupermotdepasse';
> GRANT ALL PRIVILEGES ON mabaseprestashop.* TO 'monutilisateur'@'localhost';
> EXIT

Installation PrestaShop

On récupère la dernière version sur GitHub :

# cd/tmp/
# dnf install wget unzip
# wget https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.7/prestashop_1.7.8.7.zip
# unzip prestashop_*.zip -d /var/www/html/prestashop/
# chown -R apache:apache /var/www/html/prestashop/
# chmod -R 775 /var/www/html/prestashop/
# systemctl restart httpd

Après avoir créé un VHost on se connecte avec un navigateur pour finaliser l'installation..