Last active
January 24, 2021 22:49
-
-
Save nathanbarrett/1f51ec9f9fb6d0405b5836615459130d to your computer and use it in GitHub Desktop.
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/bash | |
# This installs all of the necessary base level services | |
# required for Laravel on a fresh instance of Ubuntu 20.04 | |
# To download and run this script click on the "Raw" button and copy the url for the contents of this gist | |
# then run the following two commands: | |
# apt-get update && apt-get install -y curl | |
# curl -sS {paste gist url} | bash | |
export DEBIAN_FRONTEND=noninteractive | |
TZ=UTC | |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
# Install base services | |
apt-get update \ | |
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 nginx nano build-essential libssl-dev sudo mysql-client \ | |
&& mkdir -p ~/.gnupg \ | |
&& chmod 600 ~/.gnupg \ | |
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \ | |
&& apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C \ | |
&& apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C \ | |
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list | |
# Install PHP 7.0 | |
# apt-get update \ | |
# && apt-get install -y php7.0-cli php7.0-fpm php7.0-dev \ | |
# php7.0-pgsql php7.0-sqlite3 php7.0-gd \ | |
# php7.0-curl php7.0-memcached \ | |
# php7.0-imap php7.0-mysql php7.0-mbstring \ | |
# php7.0-xml php7.0-zip php7.0-bcmath php7.0-soap \ | |
# php7.0-intl php7.0-readline \ | |
# php7.0-msgpack php7.0-igbinary php7.0-ldap \ | |
# php7.0-redis | |
# Install PHP 7.1 | |
# apt-get update \ | |
# && apt-get install -y php7.1-cli php7.1-fpm php7.1-dev \ | |
# php7.1-pgsql php7.1-sqlite3 php7.1-gd \ | |
# php7.1-curl php7.1-memcached \ | |
# php7.1-imap php7.1-mysql php7.1-mbstring \ | |
# php7.1-xml php7.1-zip php7.1-bcmath php7.1-soap \ | |
# php7.1-intl php7.1-readline php7.1-pcov \ | |
# php7.1-msgpack php7.1-igbinary php7.1-ldap \ | |
# php7.1-redis | |
# Install PHP 7.2 | |
# apt-get update \ | |
# && apt-get install -y php7.2-cli php7.2-fpm php7.2-dev \ | |
# php7.2-pgsql php7.2-sqlite3 php7.2-gd \ | |
# php7.2-curl php7.2-memcached \ | |
# php7.2-imap php7.2-mysql php7.2-mbstring \ | |
# php7.2-xml php7.2-zip php7.2-bcmath php7.2-soap \ | |
# php7.2-intl php7.2-readline php7.2-pcov \ | |
# php7.2-msgpack php7.2-igbinary php7.2-ldap \ | |
# php7.2-redis | |
# Install PHP 7.4 | |
apt-get update \ | |
&& apt-get install -y php7.4-cli php7.4-fpm php7.4-dev \ | |
php7.4-pgsql php7.4-sqlite3 php7.4-gd \ | |
php7.4-curl php7.4-memcached \ | |
php7.4-imap php7.4-mysql php7.4-mbstring \ | |
php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \ | |
php7.4-intl php7.4-readline php7.4-pcov \ | |
php7.4-msgpack php7.4-igbinary php7.4-ldap \ | |
php7.4-redis | |
# Install PHP 8.0 | |
# apt-get update \ | |
# && apt-get install -y php8.0-cli php8.0-fpm php8.0-dev \ | |
# php8.0-pgsql php8.0-sqlite3 php8.0-gd \ | |
# php8.0-curl php8.0-memcached \ | |
# php8.0-imap php8.0-mysql php8.0-mbstring \ | |
# php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap \ | |
# php8.0-intl php8.0-readline \ | |
# php8.0-msgpack php8.0-igbinary php8.0-ldap \ | |
# php8.0-redis | |
# Install composer | |
php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer | |
# Install node and version manager | |
apt-get update \ | |
&& apt-get install -y nodejs npm \ | |
&& npm i -g n \ | |
&& n 14.15.4 | |
# Install Yarn | |
npm install -g yarn | |
# Cleanup | |
apt-get -y autoremove \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | |
&& apt-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment