« PrestaShop » : différence entre les versions

De Le Wiki de Lug
Aller à la navigation Aller à la recherche
Ligne 7 : Ligne 7 :
  # dnf install httpd
  # dnf install httpd
  # systemctl enable --now httpd
  # systemctl enable --now httpd
----
php 8.1 :
php 8.1 :


Ligne 14 : Ligne 15 :
  # dnf update
  # dnf update
  # dnf module enable php:remi-8.1
  # dnf module enable php:remi-8.1
----
On install PHP et les dépendances nécessaire :
  # dnf install php php-{zip,xml,gd,curl,intl,xmlrpc,mbstring,mysqli,bcmath,dom,posix,cli,pdo,posix,fpm,fileinfo,json,iconv}
  # 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 :
On augmente certaines limitations de PHP :

Version du 8 octobre 2022 à 13:28

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

On install PHP et les dépendances nécessaire :

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