Skip to content

Instantly share code, notes, and snippets.

@wicochandra
Last active May 24, 2018 04:35
Show Gist options
  • Save wicochandra/5023764687ea74b99119324a0f55a55c to your computer and use it in GitHub Desktop.
Save wicochandra/5023764687ea74b99119324a0f55a55c to your computer and use it in GitHub Desktop.
Simple Install script used for EC2 Ubuntu 16.04
# Support for one-time run only, if somethin happend in middle of the process
# Use comment to skip the success commands
apt-get update
# Variables
LOCALE="en_US.UTF-8"
TZ="Asia/Singapore"
USER="ubuntu"
# Locale
locale-gen en_US.UTF-8
echo "LANGUAGE=en_US.UTF-8" >> /etc/environment
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
# Timezone
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
echo $TZ > /etc/timezone
# Install Basic Tools
apt-get install -y \
git \
curl
# Install Latest Nodejs
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
# Add PPA
# ondrej/php
# nginx/stable
add-apt-repository -y ppa:ondrej/php
add-apt-repository -y ppa:nginx/stable
apt-get update
# Install PHP
apt-get install -y \
php7.2-cli \
php7.2-common \
php7.2-curl \
php7.2-intl \
php7.2-json \
php7.2-xml \
php7.2-mbstring \
php7.2-zip \
php7.2-bcmath \
php7.2-memcached \
php7.2-fpm \
php7.2-mysql \
php7.2-gd \
php7.2-imagick
# Install Nginx
apt-get install -y nginx
# Install Composer
curl -s http://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
# Add www-data to user group so www-data can access application code
adduser www-data $USER
adduser $USER www-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment