Last active
May 7, 2024 17:49
-
-
Save guychouk/c8c60bc7cdba50b1096aea1a2610b9e8 to your computer and use it in GitHub Desktop.
LEMP Installation with PHP8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt update | |
apt upgrade | |
apt install gnupg | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list | |
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - | |
apt update | |
apt install -y \ | |
lsb-release \ | |
ca-certificates \ | |
apt-transport-https \ | |
software-properties-common \ | |
nginx \ | |
rsync \ | |
php8.0 \ | |
php8.0-cli \ | |
php8.0-fpm \ | |
php8.0-pdo \ | |
php8.0-mysql \ | |
php8.0-zip \ | |
php8.0-gd \ | |
php8.0-mbstring \ | |
php8.0-curl \ | |
php8.0-xml | |
adduser --disabled-password --gecos "" --home /home/github github | |
usermod -g www-data github | |
mkdir -p /home/github/.ssh | |
chown -R github:www-data /home/github/.ssh | |
chown -R www-data:www-data /var/www/html | |
chmod -R 770 /var/www/html | |
systemctl disable apache2 | |
systemctl enable php8.0-fpm nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment