Ce guide explique comment installer Magento sur Ubuntu 20.04 LTS. Magento est une plateforme e-commerce personnalisable reposant sur PHP et MySQL/MariaDB.
Prérequis : Ubuntu 20.04, utilisateur sudo et serveur LAMP.
Installation de Magento
Mettez à jour le système :
sudo apt update sudo apt upgrade
Installez la pile LAMP, téléchargez Magento dans /var/www/html/magento et ajustez les permissions. Sécurisez MariaDB puis créez la base et l’utilisateur :
mysql -u root -p
CREATE DATABASE magentodb; CREATE USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'MOT_DE_PASSE'; GRANT ALL PRIVILEGES ON magentodb.* TO 'magento'@'localhost'; FLUSH PRIVILEGES;
Créez l’hôte virtuel Apache magento.conf, activez le module rewrite et redémarrez Apache. Obtenez ensuite un certificat SSL gratuit :
sudo apt install certbot python3-certbot-apache sudo certbot --apache -d magento.votre-domaine.com
Ouvrez l’URL HTTPS de Magento et suivez l’assistant d’installation.