Last active
November 29, 2021 01:42
-
-
Save johnrees/1985879 to your computer and use it in GitHub Desktop.
Revisions
-
johnrees revised this gist
Mar 26, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc source ~/.bashrc # Install Rails Requirements sudo apt-get install build-essential zlib1g-dev curl git-core python-software-properties software-properties-common libssl-dev openssl libreadline-dev -y # useful extras: libgeoip-dev # Add Deployment User -
johnrees revised this gist
Mar 25, 2017 . No changes.There are no files selected for viewing
-
johnrees revised this gist
Mar 25, 2017 . 3 changed files with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Install Node curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get update -y sudo apt-get install nodejs -y This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ # Install Postgres 9.6 sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update -y --fix-missing sudo apt-get install -y libpq-dev postgresql-9.6 sudo -u postgres psql \password # enter a root user password This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,12 +5,12 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile exec $SHELL -l # Install Ruby 2.4.1 git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv rehash rbenv install 2.4.1 # ^ go and get a coffee, rbenv install takes a while rbenv global 2.4.1 # Check installation went OK ruby -v -
johnrees revised this gist
Dec 10, 2015 . 1 changed file with 13 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,11 +2,19 @@ git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt ./letsencrypt-auto certonly # edit nginx conf (e.g. /etc/nginx/sites-enabled/default) server { listen 443 ssl; server_name YOURDOMAIN.COM; ssl_certificate_key /etc/letsencrypt/live/YOURDOMAIN.COM/privkey.pem; ssl_certificate /etc/letsencrypt/live/YOURDOMAIN.COM/fullchain.pem; # root /var/www/html; # index index.html index.htm index.nginx-debian.html; # location / { # try_files $uri $uri/ =404; # } } # every 90 days ./letsencrypt-auto certonly -
johnrees revised this gist
Dec 10, 2015 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt ./letsencrypt-auto certonly # edit nginx conf listen 443 ssl; server_name youdomain.com; ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; # every 90 days ./letsencrypt-auto certonly -
johnrees revised this gist
Nov 21, 2015 . 3 changed files with 9 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ # As root user sudo su # Update the OS @@ -13,18 +12,6 @@ source ~/.bashrc sudo apt-get install build-essential zlib1g-dev curl git-core python-software-properties libssl-dev openssl libreadline-dev -y # useful extras: libgeoip-dev # Add Deployment User groupadd admin adduser deployer --ingroup admin This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # Install latest stable Nginx sudo add-apt-repository ppa:nginx/stable sudo apt-get update -y sudo apt-get install nginx -y service nginx restart This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # Install Node curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get update -y sudo apt-get install nodejs -y -
johnrees revised this gist
Nov 21, 2015 . 7 changed files with 49 additions and 56 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # capistrano 3 (to run locally) cap production deploy:setup_config cap production deploy This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # java 8 sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ sudo apt-get install mysql-server sudo mysql_install_db sudo mysql_secure_installation This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Install Postgres 9.4 sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update -y --fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 sudo -u postgres psql \password # enter a root user password create user <appname> with password 'secret'; create database <appname>_production owner <appname>; \q This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # Install rbenv git clone https://github.com/sstephenson/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile exec $SHELL -l # Install Ruby 2.2.2 git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv rehash rbenv install 2.2.2 # ^ go and get a coffee, rbenv install takes a while rbenv global 2.2.2 # Check installation went OK ruby -v # Install Bundler echo "gem: --no-ri --no-rdoc" > ~/.gemrc gem install bundler rbenv rehash This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,14 +25,6 @@ curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get update -y sudo apt-get install nodejs -y # Add Deployment User groupadd admin adduser deployer --ingroup admin @@ -47,57 +39,9 @@ su deployer # Say hello to git (expect response: Permission denied (publickey).) ssh git@github.com # generate ssh keys for github if private repo ssh-keygen -t rsa -b 4096 -C "YOUR_EMAIL" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa cat ~/.ssh/id_rsa.pub # paste in https://github.com/settings/ssh ssh -T git@github.com This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Install Firewall apt-get install ufw -y ufw enable # enable ssh, either on default 22 or a port you change it to ufw allow 22 # enable http etc... ufw allow 80 -
johnrees revised this gist
Nov 21, 2015 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,3 +95,9 @@ ssh -T git@github.com # capistrano 3 cap production deploy:setup_config cap production deploy # java 8 sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer -
johnrees revised this gist
May 29, 2015 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -84,3 +84,14 @@ sudo -u postgres psql create user <appname> with password 'secret'; create database <appname>_production owner <appname>; \q # generate ssh keys for github if private repo ssh-keygen -t rsa -b 4096 -C "YOUR_EMAIL" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa cat ~/.ssh/id_rsa.pub # paste in https://github.com/settings/ssh ssh -T git@github.com # capistrano 3 cap production deploy:setup_config cap production deploy -
johnrees revised this gist
May 29, 2015 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -71,8 +71,16 @@ rbenv rehash # ... # Install postgres, redis, varnish etc # Install Postgres 9.4 sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update -y --fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 sudo -u postgres psql \password # enter a root user password create user <appname> with password 'secret'; create database <appname>_production owner <appname>; \q -
johnrees revised this gist
May 29, 2015 . 1 changed file with 19 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,12 +9,16 @@ sudo apt-get update -y echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc source ~/.bashrc # Install Rails Requirements sudo apt-get install build-essential zlib1g-dev curl git-core python-software-properties libssl-dev openssl libreadline-dev -y # useful extras: libgeoip-dev # Install latest stable Nginx sudo add-apt-repository ppa:nginx/stable sudo apt-get update -y sudo apt-get install nginx -y service nginx restart # Install Node curl -sL https://deb.nodesource.com/setup | sudo bash - @@ -24,19 +28,23 @@ sudo apt-get install nodejs -y # Install Firewall apt-get install ufw -y ufw enable # enable ssh, either on default 22 or a port you change it to ufw allow 22 # enable http etc... ufw allow 80 # Add Deployment User groupadd admin adduser deployer --ingroup admin su deployer # (logout) # brew install ssh-copy-id # ssh-copy-id deployer@SERVER_IP # ssh deployer@SERVER_IP # Say hello to git (expect response: Permission denied (publickey).) ssh git@github.com # Install rbenv @@ -45,10 +53,11 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile exec $SHELL -l # Install Ruby 2.2.2 git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv rehash rbenv install 2.2.2 # ^ go and get a coffee, rbenv install takes a while rbenv global 2.2.2 # Check installation went OK @@ -66,4 +75,4 @@ rbenv rehash sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update -y --fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 -
johnrees revised this gist
May 15, 2015 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -60,4 +60,10 @@ gem install bundler rbenv rehash # ... # Install postgres, redis, varnish etc # postgres 9.4 sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update -y --fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 -
johnrees revised this gist
May 15, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,10 +12,11 @@ source ~/.bashrc # Install Rails Requirements w/ NGINX & NODE repo sudo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y # Install Nginx sudo apt-get install nginx -y sudo service nginx restart # Install Node curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get update -y sudo apt-get install nodejs -y @@ -32,7 +33,7 @@ adduser deployer --ingroup admin su deployer # logout # ssh-copy-id keys to server (brew install ssh-copy-id) # login as deployer # Say hello to git @@ -54,8 +55,7 @@ rbenv global 2.2.2 ruby -v # Install Bundler echo "gem: --no-ri --no-rdoc" > ~/.gemrc gem install bundler rbenv rehash -
johnrees revised this gist
May 15, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -47,8 +47,8 @@ exec $SHELL -l # Install Ruby build git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv rehash rbenv install 2.2.2 rbenv global 2.2.2 # Check installation went OK ruby -v -
johnrees revised this gist
May 15, 2015 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,22 +3,23 @@ sudo su # Update the OS sudo apt-get update -y # Add this to ~/.bashrc to remove timezone warnings echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc source ~/.bashrc # Install Rails Requirements w/ NGINX & NODE repo sudo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y # Add Nginx and Node sudo apt-get install nginx -y sudo service nginx restart curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get update -y sudo apt-get install nodejs -y # Install Firewall apt-get install ufw -y ufw enable -
johnrees revised this gist
Dec 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ sudo su apt-get update -y # Add this to ~/.bashrc to remove timezone warnings echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc source ~/.bashrc # Install Rails Requirements w/ NGINX & NODE repo -
johnrees revised this gist
Sep 6, 2013 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,6 @@ sudo su # Update the OS apt-get update -y # Add this to ~/.bashrc to remove timezone warnings export LC_ALL="en_US.UTF-8" @@ -60,4 +59,4 @@ gem install bundler rbenv rehash # ... # Install postgres, redis, varnish etc -
johnrees revised this gist
Aug 11, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,9 @@ sudo su apt-get update -y apt-get upgrade -y # Add this to ~/.bashrc to remove timezone warnings export LC_ALL="en_US.UTF-8" source ~/.bashrc # Install Rails Requirements w/ NGINX & NODE repo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y -
johnrees revised this gist
Aug 5, 2013 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,15 @@ sudo su # Update the OS apt-get update -y apt-get upgrade -y # Setup TimeZone dpkg-reconfigure tzdata # Install Rails Requirements w/ NGINX & NODE repo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y # Add Nginx and Node add-apt-repository ppa:nginx/stable add-apt-repository ppa:chris-lea/node.js apt-get update @@ -32,9 +30,11 @@ groupadd admin adduser deployer --ingroup admin su deployer # logout # ssh-copy-id keys to server # login as deployer # Say hello to git ssh git@github.com # Install rbenv @@ -56,4 +56,7 @@ ruby -v vim ~/.gemrc gem: --no-ri --no-rdoc gem install bundler rbenv rehash # ... # Install postgres etc -
johnrees revised this gist
Aug 4, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ hostname -F /etc/hostname dpkg-reconfigure tzdata # Install Rails Requirements w/ NGINX & NODE repo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties libssl-dev openssl libreadline-dev -y add-apt-repository ppa:nginx/stable add-apt-repository ppa:chris-lea/node.js -
johnrees revised this gist
Aug 4, 2013 . 1 changed file with 13 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,11 +12,8 @@ echo "{{HOSTNAME}}" > /etc/hostname hostname -F /etc/hostname dpkg-reconfigure tzdata # Install Rails Requirements w/ NGINX & NODE repo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev python-software-properties -y add-apt-repository ppa:nginx/stable add-apt-repository ppa:chris-lea/node.js @@ -40,19 +37,17 @@ su deployer # Setup GIT ssh git@github.com # Install rbenv git clone https://github.com/sstephenson/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile exec $SHELL -l # Install Ruby build git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv rehash rbenv install 2.0.0-p247 rbenv global 2.0.0-p247 # Check installation went OK ruby -v -
johnrees revised this gist
Dec 10, 2012 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -43,15 +43,16 @@ ssh git@github.com # Install Ruby (RBENV) as per http://bit.ly/yr6Sw6 curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash vi ~/.bash_profile export RBENV_ROOT="${HOME}/.rbenv" if [ -d "${RBENV_ROOT}" ]; then export PATH="${RBENV_ROOT}/bin:${PATH}" eval "$(rbenv init -)" fi alias b='bundle exec' source ~/.bash_profile rbenv bootstrap-ubuntu-12-04 rbenv install 1.9.3-p327 rbenv global 1.9.3-p327 # Check installation went OK ruby -v -
johnrees revised this gist
Aug 28, 2012 . 1 changed file with 18 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,36 +1,37 @@ # As root user sudo su # Update the OS apt-get update -y apt-get dist-upgrade -y apt-get upgrade -y # Setup Hostname & TimeZone echo "{{HOSTNAME}}" > /etc/hostname hostname -F /etc/hostname dpkg-reconfigure tzdata # Install Rails Requirements apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev -y # Install NGINX & NODE apt-get install python-software-properties -y add-apt-repository ppa:nginx/stable add-apt-repository ppa:chris-lea/node.js apt-get update apt-get install nginx nodejs -y sudo service nginx restart # Install Firewall apt-get install ufw -y ufw enable ufw allow 22 ufw allow 80 # Add Deployment User groupadd admin adduser deployer --ingroup admin su deployer @@ -48,9 +49,9 @@ vi ~/.bash_profile fi alias b='bundle exec' source ~/.bash_profile rbenv bootstrap-ubuntu-12-04 rbenv install 1.9.3-p194 rbenv global 1.9.3-p194 # Check installation went OK ruby -v @@ -59,4 +60,4 @@ ruby -v vim ~/.gemrc gem: --no-ri --no-rdoc gem install bundler rbenv rehash -
johnrees revised this gist
Jul 27, 2012 . 1 changed file with 14 additions and 49 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ # As root user # Update the OS apt-get update apt-get upgrade apt-get dist-upgrade # Setup Hostname & TimeZone echo "{{HOSTNAME}}" > /etc/hostname @@ -13,16 +13,16 @@ dpkg-reconfigure tzdata sudo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev # Install NGINX apt-get install python-software-properties add-apt-repository ppa:nginx/stable apt-get update apt-get install nginx sudo service nginx restart # Install NodeJS add-apt-repository ppa:chris-lea/node.js apt-get update apt-get install nodejs # Install Firewall apt-get install ufw @@ -31,38 +31,16 @@ ufw allow 22 ufw allow 80 # Add Deployment User adduser deployer --ingroup admin su deployer # ssh-copy-id keys to server # Setup GIT ssh git@github.com # Install Ruby (RBENV) as per http://bit.ly/yr6Sw6 curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash vi ~/.bash_profile if [[ -d $HOME/.rbenv ]]; then export PATH="$HOME/.rbenv/bin:$PATH" @@ -82,16 +60,3 @@ vim ~/.gemrc gem: --no-ri --no-rdoc gem install bundler rbenv rehash -
johnrees revised this gist
Mar 8, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -81,7 +81,7 @@ ruby -v vim ~/.gemrc gem: --no-ri --no-rdoc gem install bundler rbenv rehash # TODO add Varnish cache, mod GeoIP, *SQL, nginx settings (la $HOME/$APP/current/config/nginx.conf), unicorn settings (la $HOME/$APP/current/config/unicorn.rb), monit -
johnrees revised this gist
Mar 7, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,7 @@ vi ~/.bash_profile eval "$(rbenv init -)" fi alias b='bundle exec' source ~/.bash_profile rbenv bootstrap-ubuntu-10-04 rbenv install 1.9.3-p0 rbenv global 1.9.3-p0 -
johnrees revised this gist
Mar 6, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -82,7 +82,7 @@ vim ~/.gemrc gem install bundler # TODO add Varnish cache, mod GeoIP, *SQL, nginx settings (la $HOME/$APP/current/config/nginx.conf), unicorn settings (la $HOME/$APP/current/config/unicorn.rb), monit # NB mongo goes onto two seperate 64bit 11.* boxes as a replicated set -
johnrees created this gist
Mar 6, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,96 @@ # As root user # Update the OS sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade # Setup Hostname & TimeZone echo "{{HOSTNAME}}" > /etc/hostname hostname -F /etc/hostname dpkg-reconfigure tzdata # Install Rails Requirements sudo apt-get install build-essential zlib1g-dev curl git-core libgeoip-dev # Install NGINX sudo apt-get install python-software-properties sudo add-apt-repository ppa:nginx/stable sudo apt-get update sudo apt-get install nginx sudo service nginx restart # Install NodeJS sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs # Install Firewall apt-get install ufw ufw enable ufw allow 22 ufw allow 80 # Add Deployment User useradd -m -g staff -s /bin/bash deploy passwd deploy sudo vim /etc/sudoers (add %staff ALL=(ALL) ALL) # Setup Public Key Access mkdir -p ~/.ssh exit scp ~/.ssh/id_rsa.pub deploy@{{SERVER_IP}}:.ssh/authorized_keys2 # edit sshd_config to have the following settings sudo vi /etc/ssh/sshd_config RSAAuthentication yes PubkeyAuthentication yes ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no PermitRootLogin no # reload your ssh settings sudo /etc/init.d/ssh reload # Connect as Deployment User ssh deploy@{{SERVER_IP}} # Setup GIT ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub # copy this output and paste in your github keys ssh git@github.com git config --global user.name "{{YOUR NAME}}" git config --global user.email "{{YOUR EMAIL}}" # Install Ruby (RBENV) as per http://bit.ly/yr6Sw6 sudo curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash vi ~/.bash_profile if [[ -d $HOME/.rbenv ]]; then export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" fi alias b='bundle exec' rbenv bootstrap-ubuntu-10-04 rbenv install 1.9.3-p0 rbenv global 1.9.3-p0 # Check installation went OK ruby -v # Install Bundler vim ~/.gemrc gem: --no-ri --no-rdoc gem install bundler # TODO add Varnish, mod GeoIP, *sql, nginx settings, unicorn settings # NB mongo goes onto two seperate 64bit 11.* boxes as a replicated set # REDIS # # /etc/apt/sources.list # deb http://packages.dotdeb.org stable all # deb-src http://packages.dotdeb.org stable all # wget http://www.dotdeb.org/dotdeb.gpg # cat dotdeb.gpg | sudo apt-key add - # sudo aptitude update # sudo aptitude install redis-server