Skip to content

Instantly share code, notes, and snippets.

@sheikhwaqas
Last active July 31, 2020 14:08
Show Gist options
  • Save sheikhwaqas/1f6de544e6ffee7660739e124267e386 to your computer and use it in GitHub Desktop.
Save sheikhwaqas/1f6de544e6ffee7660739e124267e386 to your computer and use it in GitHub Desktop.
Install the LEMP stack on Ubuntu 16.04 LTS with Composer, Ruby, Sass & Compass
###############################################################################
# Install nGinx and PHP 7 on Ubuntu 16.04 LTS
###############################################################################
# Install nGinx Server
apt install nginx
# Install PHP & and it's respective packages
apt install php-common php-fpm php-mysql php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-opcache php7.0-readline php-bcmath php-bz2 php-calendar php-ctype php-curl php-date php-enchant php-gd php-intl php-mbstring php-mcrypt php-mongodb php-soap php-sqlite3 php-tidy php-xdebug php-xml php-xml-parser php-xml-rpc2 php-xml-serializer php-xml-svg php-xmlrpc php-zip
# Install Composer
apt install composer
# Replace php.ini settings
sed -i 's/;cgi\.fix_pathinfo=1/cgi\.fix_pathinfo=0/g' /etc/php/7.0/fpm/php.ini
# Restart PHP FPM for changes to take effect
systemctl restart php7.0-fpm
# Install necessary Global Composer Packages
composer global require laravel/installer laravel/envoy phpunit/phpunit squizlabs/php_codesniffer phpmd/phpmd block8/php-docblock-checker phploc/phploc
# Install Ruby, Sass & Compass
apt install ruby ruby-ffi
gem install sass
gem install compass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment