Ceci est une ancienne révision du document !


Comment installer un systéme lamp ?

apache

sudo apt-get install apache2

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

Installer MySQL

apt-get install mysql-server mysql-client sudo mysql_secure_installation

Installer apache

apt-get install apache2 apache2-doc sudo service apache2 restart

Activer le mode rewrite

a2enmod rewrite

Installer php

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

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;

Autre

ln -s /home/cb/public_html /var/www/html

retour Linux