ubuntu:install:lamp
Table des matières
Install LAMP
Mise à jour 20.04 à 22.04
Erreur lancement Appache2 = pb de php7.4 et 8
sudo apt install php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-xml php8.1-zip php8.1-mbstring
sudo a2dismod php7.4 sudo a2enmod php8.1
(This is php ver. you have after upgrade. Please verify the exact version by looking into /etc/apache2/mods-available folder. In my case I could see the latest ver. of php8.1 so did accordingly mentioned in this command)
systemctl restart apache2 sudo apachectl configtest
Fichier bash
sudo apt update && sudo apt upgrade sudo apt install apache2 apache2-utils mariadb-server mariadb-client -y sudo apt install php libapache2-mod-php php-mysql php-common php-cli php-common php-json php-opcache php-readline -y sudo apt install php-fpm php-cgi php-curl php-gd php-intl php-mbstring php-xml php-zip -y
- A checker si 8.1 :
sudo apt install php7.4 libapache2-mod-php7.4 php7.4-mysql php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline
sudo apt install phpmyadmin -y
*
read -p "votre reponse oui/non " reponse
if [[ "$reponse" == "oui" ]]
then
wget -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
echo deb http://download.webmin.com/download/repository sarge contrib >> /etc/apt/sources.list
sudo apt update
sudo apt install -y webmin
fi
Complément MySQL
sudo mysql_secure_installation
mariadb -u root -p
CREATE USER 'NOM'@'localhost' IDENTIFIED BY 'mot_de_passe'; GRANT ALL ON *.* TO 'NOM'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; QUIT;
Compléments d'install
Ce n'est pas obligatoire…
sudo systemctl enable apache2
sudo systemctl enable mysql
ubuntu/install/lamp.txt · Dernière modification : 2024/06/26 08:47 de sbestel
