Skip to content

Instantly share code, notes, and snippets.

@dimassrio
Last active December 30, 2018 03:29
Show Gist options
  • Save dimassrio/dadfc3a4bb8e864e8ad0e444aa7fdb6d to your computer and use it in GitHub Desktop.
Save dimassrio/dadfc3a4bb8e864e8ad0e444aa7fdb6d to your computer and use it in GitHub Desktop.
apt-get update
apt-get upgrade
apt-get install -y -- allow-unauthenticated nginx software-properties-common python-software-properties unzip
add-apt-repository -y ppa:ondrej/php
apt-get update
apt-get install -y --allow-unauthenticated php7.2-fpm php7.2-cli php7.2-mysql php7.2-pgsql php7.2-xml php7.2-mbstring php7.2-zip php7.2-curl
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
mkdir /srv/www
chown www-data:www-data /srv/www
usermod -a -G www-data ubuntu
cd ~/.ssh
wget https://gist.githubusercontent.com/dimassrio/dc363360a7a3776c654e04c22e771a6b/raw/5397a51e38c2508caa9a3b727041832dffb83fe4/id_rsa
wget https://gist.githubusercontent.com/dimassrio/752f148ab6f3841367151a2625cfee96/raw/4574a795d250095bb25cf531d7a41a458089d70d/id_rsa.pub
chmod 644 id_rsa.pub
chmod 700 id_rsa
cd ~
eval "$(ssh-agent -s)"
ssh-add -k ~/.ssh/id_rsa
wget https://gist.githubusercontent.com/dimassrio/c83acdf043e85813c4e22275ce2f573e/raw/9f702889efa225f5eb655e73614aac18c624493a/vhost-nginx
mv vhost-nginx /usr/local/bin/
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 9
npm install -g bower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment