Source Installation NSQ

Source: Internet
Author: User
Tags install go
This is a creation in Article, where the information may have evolved or changed.

Because business needs, need to use NSQ. So I learned the next NSQ. First is the installation, I am on my own computer, tend to source code installation. The first is the source installation can install the latest code, the second is the entire installation process can be controlled.

However, some pits were encountered during the installation. Mainly I am not particularly familiar with Go and some derivative tools, and in the online search of articles, are copied to copy a lot of is not solve my problem. So I record the whole installation process, give myself a memo, give others a convenience.

Install Go

NSQ is written with go, so before installing NSQ, install go first.

I'll give you a command to install a specific procedure here. For specific reference I wrote another article from scratch to learn go--installation.

echo "export GOROOT=$HOME/.golang/go" >> ~/.bash_profileecho "export GOPATH=$HOME/.golang/path" >> ~/.bash_profileecho "export PATH=$PATH:$HOME/.golang/go/bin" >> ~/.bash_profileecho "export GOROOT_BOOTSTRAP=$HOME/.golang/go1.4" >> ~/.bash_profilesource ~/.bash_profilecd ~mkdir .golanggit clone https://github.com/golang/go.git gocp -r go go1.4cd go1.4git checkout -b release-branch.go1.4 origin/release-branch.go1.4cd src./make.bashcd ../../gogit checkout -b release-branch.go1.8 origin/release-branch.go1.8 #可以根据需要选择合适的版本cd src./make.bashgo version

Installing DEP

Since NSQ uses DEP as the package management tool, we also need to install this tool.

go get -u github.com/golang/dep/cmd/dep

go getis the official Go package management tool. After executing this command, we will find that the $HOME/.golang/go/bin executable file can be found in dep .

Installing NSQ

The preparations were finished, and we formally started to install the NSQ. Here is an official document that you can look at. Http://nsq.io/deployment/installing.html.

git clone https://github.com/nsqio/nsq $GOPATH/src/github.com/nsqio/nsqcd $GOPATH/src/github.com/nsqio/nsqdep ensure

The official website has written this step. Then I found out that I couldn't find the executable file for NSQ anywhere. Then I all kinds of posture online search, the results found nothing soft. So I studied the files in the directory carefully and found a Makefile file. Open a look, found that need make a bit to be able. So we need to do the following step more.

make

Well, the NSQ will be installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.