Skip to content

Instantly share code, notes, and snippets.

@od3n
Last active May 11, 2019 00:02
Show Gist options
  • Save od3n/85bbdc56534560e549c3 to your computer and use it in GitHub Desktop.
Save od3n/85bbdc56534560e549c3 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment