LoginSignup
1
0

More than 5 years have passed since last update.

centosでgolang + Revel 環境構築メモ

Last updated at Posted at 2017-07-22

goインストール

 $ yum install golang

ワークディレクトリ作成

 $ mkdir gocode
 $ mkdir gocode/{src,bin,pkg}

環境変数設定

 $ echo export GOROOT=/usr/lib/golang >> ~/.bash_profile
 $ echo export echo export GOPATH=/XXX/gocode(ワークディレクトリの絶対パス) >> ~/.bash_profile
 $ echo export PATH=$PATH:$GOROOT/bin:$GOPATH/bin >> ~/.bash_profile
 $ source ~/.bash_profile

revel インストール

$ go get github.com/revel/revel
$ go get github.com/revel/cmd/revel

revelのパスを通す

$ export PATH="$PATH:$GOPATH/bin"

GOPATHへ移動してrevel new

 $ revel new myapp

アプリサーバ起動

 $ revel run myapp

ブラウザから確認 localhost:9000

動作環境

centos7.2
go 1.7.4
Revel v0.18-dev

参考

http://qiita.com/kazusa-qooq/items/31db4dad2b44babecd05
http://qiita.com/futoase/items/8134bd96a5c950c497c7
https://github.com/revel/

1
0
0

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
1
0