Last active
October 3, 2020 01:51
-
-
Save p-mylecharane/f938c7e856677a73f9113a19f0b74b85 to your computer and use it in GitHub Desktop.
Basic Debian/Apache setup php7.4
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/sh | |
# Basic Apache setup | |
# Update first | |
sudo apt-get update; | |
sudo apt-get -y upgrade; | |
sudo apt-get -y install software-properties-common; | |
sudo apt-get -y install lsb-release apt-transport-https ca-certificates; | |
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list; | |
sudo apt-get -y update; | |
sudo apt-get -y install php7.4; | |
# Install Apache and basics | |
sudo apt-get -y install apache2 php gnupg2 git libapache2-mod-php7.4 php-mbstring php7.4-curl php7.4-zip php7.4-json php7.4-xml imagemagick zip unzip wget fail2ban; | |
#Node, yarn and permissions | |
sudo apt-get -y install nodejs; | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt update && sudo apt install yarn | |
chown -Rf www-data:www-data /var/www/html; | |
sudo a2enmod rewrite; | |
systemctl restart apache2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment