Skip to content

Instantly share code, notes, and snippets.

@ansonl
Last active August 29, 2015 14:05
Show Gist options
  • Save ansonl/08ac0019dc65b4c8e6cc to your computer and use it in GitHub Desktop.
Save ansonl/08ac0019dc65b4c8e6cc to your computer and use it in GitHub Desktop.
Lobbyist Lookup setup script
#!/bin/sh
#setup Go lang
cd ~
wget http://golang.org/dl/go1.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.3.linux-amd64.tar.gz
mkdir $HOME/go
#set envvars
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PORT=80
mkdir -p $GOPATH/src/github.com/ansonl
#install git, hg, htop
sudo apt-get install git mercurial htop
#clone lobbyist-lookup
cd go/src/github.com/ansonl
git clone https://github.com/ansonl/lobbyist-lookup
#build and run
cd lobbyist-lookup
go get
sudo setcap 'cap_net_bind_service=+ep' /home/$USER/go/bin/lobbyist-lookup
nohup lobbyist-lookup &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment