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 characters
| # Log into your VPS and enter the provided password when prompted. | |
| ssh root@[YOUR VPS IP] | |
| # Update the system. This will take a little while to complete. | |
| apt-get update | |
| apt-get safe-upgrade | |
| # Install essential build tools, git, tmux, vim, and fail2ban. | |
| apt-get install build-essential git tmux vim fail2ban |
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 characters
| # Create our pair users | |
| # You'll want to substitude your own usernames for dave and dayton | |
| adduser dave | |
| adduser dayton | |
| # Add them to the sudo group | |
| usermod -a -G sudo dave | |
| usermod -a -G sudo dayton |
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 characters
| # Copy your shh key to the server | |
| scp ~/.ssh/id_rsa.pub dave@198.199.xx.x: | |
| # Login to your account | |
| ssh dave@198.199.xx.x | |
| # Enable ssh access using your rsa key | |
| mkdir .ssh | |
| mv id_rsa.pub .ssh/authorized_keys |
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 characters
| # Install wemux | |
| sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux | |
| sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux | |
| sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf | |
| # Change the host_list value to your pair usernames (change to your usernames) | |
| sudo vim /usr/local/etc/wemux.conf | |
| host_list=(dave dayton) | |
| # Save and quit (:wq) |
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 characters
| # Launch a shared tmux session. | |
| wemux |
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 characters
| { | |
| "Statement": [ | |
| { | |
| "Action": "s3:*", | |
| "Effect": "Allow", | |
| "Resource": [ | |
| "arn:aws:s3:::project-name", | |
| "arn:aws:s3:::project-name/*" | |
| ] | |
| } |
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 characters
| sudo apt-get install libevent-dev python-all-dev daemontools lzop pv postgresql-client python-pip | |
| sudo pip install wal-e | |
| # There's an issue with Ubuntu 14.04 and wall-e where you need to upgrade six. | |
| # Not sure why. | |
| sudo pip install --upgrade six | |
| # Replace access_key and secret_access_key with your AWS keys. | |
| # Replace project-name with your bucket name. | |
| sudo mkdir -p /etc/wal-e.d/env |
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 characters
| # WAL-E Backups | |
| # Goes in the bottom of your postgresql.conf | |
| wal_level = archive | |
| archive_mode = on | |
| archive_command = 'envdir /etc/wal-e.d/env /usr/local/bin/wal-e wal-push %p' | |
| archive_timeout = 60 |
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 characters
| sudo vi /etc/postgresql/9.3/main/postgresql.conf |
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 characters
| sudo service postgresql restart |