michaelbontyes of Edelman Digital Montreal
11/22/2017 - 7:07 PM

LEMP Stack Installation Bash Script for Ubuntu 14.0.4

LEMP Stack Installation Bash Script for Ubuntu 14.0.4

#!/usr/bin/env bash

sudo add-apt-repository ppa:ondrej/php

sudo apt-get -y update

sudo apt-get -y upgrade

sudo apt-get install -y python-software-properties

sudo apt-get install -y nginx

sudo apt-get install -y php7.0-fpm

sudo sed -i s/\;cgi\.fix_pathinfo\s*\=\s*1/cgi.fix_pathinfo\=0/ /etc/php/7.0/fpm/php.ini

sudo apt-get install -y php7.0-mysql

sudo apt-get install -y php7.0-mbstring

sudo apt-get install -y php7.0-xml

sudo apt-get install -y php7.0-zip

sudo apt-get install -y php7.0-curl

sudo apt-get install -y git

sudo apt-get install -y nodejs

sudo ln -s /usr/bin/nodejs /usr/bin/node

sudo apt-get install -y build-essential

sudo apt-get install -y npm

sudo npm install -g bower

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php

php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === 'fd26ce67e3b237fffd5e5544b45b0d92c41a4afe3e3f778e942e43ce6be197b9cdc7c251dcde6e2a52297ea269370680') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }"

php composer-setup.php

php -r "unlink('composer-setup.php');"

sudo mv composer.phar /usr/local/bin/composer