Total Pageviews

Monday, 1 August 2016

server-bootstrap Scripts

Scripts that bootstrap your server with convenient configuration.

DEPRECATED: please take a look at Transmute: (and Ansible) for a more reliable server-management approach.
maintained by Limbo Peng (


  1. SSH into root@remoteip
  2. apt-get update && apt-get upgrade
  3. apt-get install git-core
  4. git clone
  5. cd server-bootstrap
  6. run ./boostrap <packagename> to install the package

Available packages

  • deps: install dependencies - this should be run first
  • mongodb: download and install MongoDB to /opt/mongodb (ATTENTION: it is for x64)
  • nginx: build and install Nginx from source - it will be installed to /opt/nginx
  • openvpn: install OpenVPN and set up the server
  • python: install pythonbrew and build Python 2.7.2 from source via pythonbrew (installed to home directory of the specified user)
  • ruby: install RVM and build Ruby 1.9.3 from source via RVM (installed to home directory of the specified user)
  • user: create user with sudo priviledge and copy necessary config files
  • vim: build and install Vim 7.3 from source

Ansible Playbook for Debian Server Setup.

With the help of Ansible, you can automate (almost) all the steps for setting up a server. No more adhoc (read: unreliable) bash scripts for server provisioning.
This playbook provides a convenient setup for a Debian server, which is mainly used for my personal server management.


  1. Ansible 1.5+
  2. Debian "wheezy" hosts


  1. targeted on Debian Linux
  2. offers some sane defaults:
    • unnecesasry packages (shipped with Debian) removed
    • APT sources switched to unstable (sid)
    • user created with sudo and SSH public key access
    • root login on SSH disabled
  3. installs and sets up packages:
    • fail2ban
    • nginx
    • nodejs
    • runit
    • shadowsocks
    • a few utils


  1. set up Ansible following instructions here
  2. git clone
  3. cp site.yml.tmpl site.yml and pick up things you need.
  4. define necessary vars in group_vars/{{ group }} or host_vars/{{ host }} (see group_vars/all and host_vars/host.tmpl for example)
  5. ansible-playbook site.yml and you're good to go!