Last active
April 25, 2019 15:03
-
-
Save arjus/d3a4a475a13fe4698751197a312bd14e to your computer and use it in GitHub Desktop.
magento 2 lemp stack bash command for Ubuntu 18 with redis and composer
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
#bash script | |
#Arjus | |
#magento 2 lemp stack for Ubuntu 18 with redis and composer | |
#linux | |
#nginx | |
#mariadb | |
#php7.2 | |
#redis | |
#composer | |
sudo apt update | |
#utils | |
sudo apt install -y unzip wget curl htop | |
#install nginx | |
sudo apt install -y nginx | |
#install mariadb | |
sudo apt install -y mariadb-server | |
sudo mysql_secure_installation | |
#install php7.2 with fpm and opcache | |
sudo apt install -y php7.2 php7.2-bcmath php7.2-cli php7.2-curl php7.2-fpm php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-soap php7.2-xml php7.2-xsl php7.2-zip | |
#install and enable redis | |
sudo apt install -y redis-server | |
#install and enable composer | |
#install and enable composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
php -r "unlink('composer-setup.php');" | |
sudo systemctl restart php7.2-fpm | |
sudo systemctl restart nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment