Table des matières

Comment installer un systéme lamp ?

apache

sudo apt-get install apache2

Userdir

sudo a2enmod userdir
# il peut y avoir une erreur 403 dans ce cqas il faut lancer les 2 commandes suivantes
chmod 711 "$HOME"
chmod 755 "$HOME/public_html"

sudo systemctl restart apache2

Solution avec un lien symbolique change user par ton compte

mkdir "$HOME"/public_html
ln -s "$HOME"/public_html  /var/www/html

Installer MySQL ou Mariadb

sudo apt install mariadb-server mariadb-client

Installer php

sudo apt update sudo apt install php libapache2-mod-php php-mysql php-cli

Installer virtuahost

- faire le fichier domaine.conf - faire un fichier index.html pour tester sur la racine du site -

Installer cerbot

a2enmod ssl systemctl restart apache2

echo “deb http://ftp.debian.org/debian jessie-backports main” > /etc/apt/sources.list.d/backports.list

apt update

Installer le paquet certbot :

apt install certbot -t jessie-backports

certbot certonly –standalone -d domaine –pre-hook “systemctl stop apache2” –post-hook “systemctl start apache2

ça ne marche pas. cerbot –apache et ça a marché. Bon il va falloir revalider tout cela

https://www.youtube.com/watch?v=3sz3ukyYN0I https://certbot.eff.org/lets-encrypt/debianjessie-apache

Activer le mode rewrite

a2enmod rewrite

Installer phpmyqdmin

apt-get install phpmyadmin

Eventuellement

sudo mysql -u root -p
CREATE USER USERNAME IDENTIFIED by 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
EXIT;

retour Linux