LoginSignup
2

More than 5 years have passed since last update.

[メモ書き] GoをUbuntuにホストする [nginx, gvm, Martini, httprouter, redigo]

Posted at

バージョン

go: 1.4.2
ubuntu: 14.04

参考資料

サーバーの最初の諸々

は各自で

goをgvmで入れる

sudo apt-get install curl git mercurial make binutils bison gcc


bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)


source /home/deploy/.gvm/scripts/gvm


gvm install go1.4.2
gvm use go1.4.2 --default

go用のディレクトを作ってGOPATHを通す

cd ~
mkdir -p go/{bin,pkg,src}


echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.bashrc

ブツをclone

cd ~/go/src

git clone https://github.com/gogotanaka/goImpClickCounter

go get ...

Build

go build -o $GOPATH/bin/[app name] [app name].go

とりあえずRun

[app name] &

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2