Add bash-syntax highlighting to code blocks.

pull/42/merge
juliusv 12 years ago
parent 22ea3059b0
commit 5caa2333ab

@ -6,42 +6,58 @@
First, create a `$HOME/mygo` directory and its src subdirectory: First, create a `$HOME/mygo` directory and its src subdirectory:
```bash
mkdir -p $HOME/mygo/src # create a place to put source code mkdir -p $HOME/mygo/src # create a place to put source code
```
Next, set it as the GOPATH. You should also add the bin subdirectory to your PATH environment variable so that you can run the commands therein without specifying their full path. To do this, add the following lines to `$HOME/.profile` (or equivalent): Next, set it as the GOPATH. You should also add the bin subdirectory to your PATH environment variable so that you can run the commands therein without specifying their full path. To do this, add the following lines to `$HOME/.profile` (or equivalent):
```bash
export GOPATH=$HOME/mygo export GOPATH=$HOME/mygo
export PATH=$PATH:$HOME/mygo/bin export PATH=$PATH:$HOME/mygo/bin
```
Now you can install Go: Now you can install Go:
```bash
brew install go brew install go
```
### Dependencies ### Dependencies
Install leveldb and protobuf dependencies: Install leveldb and protobuf dependencies:
```bash
brew install leveldb protobuf brew install leveldb protobuf
```
### Libraries ### Libraries
```bash
go get code.google.com/p/goprotobuf/{proto,protoc-gen-go} go get code.google.com/p/goprotobuf/{proto,protoc-gen-go}
go get github.com/jmhodges/levigo go get github.com/jmhodges/levigo
go get code.google.com/p/gorest go get code.google.com/p/gorest
go get github.com/matttproud/{prometheus,golang_instrumentation} go get github.com/matttproud/{prometheus,golang_instrumentation}
```
## Build ## Build
```bash
cd ${GOPATH}/src/github.com/matttproud/prometheus cd ${GOPATH}/src/github.com/matttproud/prometheus
make build make build
```
## Configure ## Configure
```bash
cp prometheus.conf.example prometheus.conf cp prometheus.conf.example prometheus.conf
```
## Run ## Run
```bash
./prometheus ./prometheus
```

Loading…
Cancel
Save