Skip to content

Instantly share code, notes, and snippets.

Embed
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
zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
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' \
  'tmux'
vi .zshrc
#add

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

# 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

via https://github.com/klaemo/docker-couchdb

Docker will keep couch running, even past restarts.

Install ssl

git clone git@github.com:Getable/ssl.git 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