最近看了不少区块链的资料,汇总了一下,大家感兴趣的话,可以看下
1、区块链私链搭建资料汇总
https://blockchain.neohope.cc
2、一些区块链项目的白皮书
https://github.com/neohope/blockchaindocs
I'm here to learn and share.
1、安装go等必须的软件
brew install go
2、设置gopaht环境变量
export gopath=PAHT_TO_GOPATH #然后在gopath下创建下面的目录 PAHT_TO_GOPATH/src/github.com/ipfs/ #设置必要的代理信息 export http_proxy=xxxx:xx export https_proxy=xxxx:xx export no_proxy="localhost, 127.0.0.1, 192.168.99.100, 根据你自己的实际情况进行处理"
3、下载源码
cd PAHT_TO_GOPATH/src/github.com/ipfs/ git clone https://github.com/ipfs/go-ipfs.git
4、编译go-ipfs
cd go-ipfs make
会发现,gx无法获取所需的文件,原来是gx不会默认读取代理配置
5、下载gx代码
#然后在gopath下创建下面的目录 PAHT_TO_GOPATH/src/github.com/whyrusleeping/ cd PAHT_TO_GOPATH/src/github.com/whyrusleeping/ git clone https://github.com/whyrusleeping/gx.git git clone https://github.com/whyrusleeping/gx-go.git cd PAHT_TO_GOPATH/src/github.com/ipfs/ git clone https://github.com/ipfs/go-ipfs-api.git
6、修改go-ipfs-api代码,在文件shell.go中,增加一行代码
func NewShell(url string) *Shell { c := &gohttp.Client{ Transport: &gohttp.Transport{ Proxy: gohttp.ProxyFromEnvironment, //请增加这一行 DisableKeepAlives: true, }, } return NewShellWithClient(url, c) }
7、编译gx及gx-go
cd PAHT_TO_GOPATH/src/github.com/whyrusleeping/gx make cd PAHT_TO_GOPATH/src/github.com/whyrusleeping/gx-go make
8、用编译好的go及go-gx替换PAHT_TO_GOPATH/src/github.com/ipfs/go-ipfs/bin目录下对应的文件
9、编译ipfs
cd PAHT_TO_GOPATH/src/github.com/ipfs/go-ipfs make
1、安装go等必须的软件
brew install go
2、设置gopaht环境变量
export gopath=PAHT_TO_GOPATH #然后在gopath下创建下面的目录 PAHT_TO_GOPATH/src/github.com/ethereum/ #设置必要的代理信息 export http_proxy=xxxx:xx export https_proxy=xxxx:xx export no_proxy="localhost, 127.0.0.1, 192.168.99.100, 根据你自己的实际情况进行处理"
3、下载源码
cd PAHT_TO_GOPATH/src/github.com/ethereum/ git clone https://github.com/ethereum/go-ethereum.git
4、编译
cd go-ethereum make geth
1、安装docker、go等必须的软件
brew install docker dokcer-machine go brew install gnu-tar --with-default-names brew install libtool
2、开启dokcer deamon环境
docker-machine create forfabric eval $(docker-machine env forfabric)
3、设置gopaht环境变量
export gopath=PAHT_TO_GOPATH #然后在gopath下创建下面的目录 PAHT_TO_GOPATH/src/github.com/hyperledger/ #设置必要的代理信息 export http_proxy=xxxx:xx export https_proxy=xxxx:xx export no_proxy="localhost, 127.0.0.1, 192.168.99.100, 根据你自己的实际情况进行处理"
4、下载源码
cd PAHT_TO_GOPATH/src/github.com/hyperledger/ git clone https://github.com/hyperledger/fabric.git
5、编译gotolls
cd fabric make gotools
6、编译native
make native