131월/22

ubuntu golang

sudo apt-get install golang-go 또는 1. go tarball 다운로드 wget https://dl.google.com/go/go1.17.6.linux-amd64.tar.gz 2. tarball 체크섬 sha256sum go1.17.6.linux-amd64.tar.gz 확인 231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2 3. 추출 sudo tar -C /usr/local -xvf go1.17.6.linux-amd64.tar.gz 4. path 설정 #~/.profile export GOROOT=/usr/local/go export GOPATH=$HOME/go export GOBIN=$GOPATH/bin export PATH=$GOROOT/bin:$GOBIN:$PATH shell 세션 로드 source ~/.profile 5. 설치 확인 go version 6. workspace는 기본적으로 $HOME/go mkdir ~/go 7. mvc편리하게 revel 설치ㄱㄱ go get github.com/revel/revel go get github.com/revel/cmd/revel go get github.com/bradfitz/gomemcache/memcache go get github.com/garyburd/redigo/redis go get github.com/patrickmn/go-cache 8. 테스트 revel run -a project