Last active
October 3, 2016 22:43
-
-
Save moderation/4303332 to your computer and use it in GitHub Desktop.
Raspberry Pi tips including setting up Go and Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=10781 | |
Adjust your environment to include: | |
GOARM=5 | |
GOOS=linux | |
GOARCH=arm | |
GOPATH=<root for packages> | |
$ sudo apt-get install mercurial # get mercurial | |
$ sudo apt-get install git # for go get ... | |
$ hg clone -u tip https://code.google.com/p/go # fetch the repo (tip) | |
$ cd go/src | |
$ ./all.bash | |
$ ./make.bash | |
as an alternative to ./all.bash | |
http://dave.cheney.net/tag/go-golang-raspberrypi | |
Some info on Go environment variables: | |
http://golang.org/doc/install/source | |
.bash_profile from Macbook Pro | |
# Google Golang variables | |
export GOROOT=$HOME/Library/Go/go | |
export GOBIN=$GOROOT/bin | |
export GOARCH=amd64 | |
export GOOS=darwin | |
export GOPATH=$HOME/Library/Go/gocode | |
export PATH=$GOBIN:$PATH | |
# ---------------------------- | |
Node | |
https://github.com/nneves/Raspberrypi_NodeJS | |
sudo apt-get install build-essential libssl-dev | |
export NODE_VER=0.10.11 | |
curl http://nodejs.org/dist/v$NODE_VER/node-v$NODE_VER.tar.gz | tar xz | |
cd node-v$NODE_VER | |
./configure --shared-openssl --without-snapshot | |
time sudo make CFLAGS+=-O2 CXXFLAGS+=-O2 install | |
sudo make install | |
# ---------------------------- | |
nohup | |
Using nohup - http://stackoverflow.com/questions/4018154/node-js-as-a-background-service | |
nohup node spdy_proxy.js >> spdy_proxy.log | |
nohup ./sync ?? sync.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May need to look at the binaries - http://joshondesign.com/2013/10/23/noderpi