Skip to content

Instantly share code, notes, and snippets.

@moderation
Last active October 3, 2016 22:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save moderation/4303332 to your computer and use it in GitHub Desktop.
Save moderation/4303332 to your computer and use it in GitHub Desktop.
Raspberry Pi tips including setting up Go and Node.js
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
@moderation
Copy link
Author

May need to look at the binaries - http://joshondesign.com/2013/10/23/noderpi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment