Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
setup a new ubuntu server

new ubuntu server

# add a non-root user
sudo adduser <username> sudo
su <username>
# paste in your ssh key
# ssh-copy-id -i <username>@<host> 
sudo vi /etc/ssh/sshd_config
# set PasswordAuthentication no
sudo restart ssh
# update all outdated packages
sudo apt-get update
sudo apt-get -d dist-upgrade

# install pretzo
sudo apt-get install zsh
git clone --recursive "${ZDOTDIR:-$HOME}/.zprezto"
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^; do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
chsh -s /bin/zsh
vi .zpreztorc
# set the modules to
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt' \
  'syntax-highlighting' \
  'history-substring-search' \
  'git' \
  'history' \
  'ssh' \
vi .zshrc

# Customize to your needs...
# 256 colors
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
  export TERM='xterm-256color'
  export TERM='xterm-color'

# enable vi mode
set -o vi
# get node setup
sudo apt-get update
sudo apt-get install node
sudo apt-get install npm
sudo npm i -g nave
# no sudo for global installs!
sudo chown -R `whoami` ~/.npm; sudo chown -R `whoami` /usr/local/lib/node_modules 
# apt-get installs node as nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo nave usemain stable
sudo npm i -g npm

Install couchdb


Docker will keep couch running, even past restarts.

Install ssl

git clone bud

block non-ssl access

Config couch

  • you'll want to create an admin user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment