一、安装依赖
Go
下载Go压缩包到/usr/local
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz
设置$GOROOT
和$PATH
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
Gero
使用go get
安装go-sero
会连带安装依赖go-czero-import
go get github.com/sero-cash/go-sero
此步骤可能会遇到如下错误
# github.com/sero-cash/go-czero-import/keys
/usr/bin/ld: cannot find -lczero
collect2: error: ld returned 1 exit status
此错误可以忽略,不影响后续步骤。
Redis Server
sudo apt install redis-server
libgmpxx4ldbl
sudo apt-get install libgmpxx4ldbl
bower和ember
npm install -g bower
npm install -g ember-cli
二、下载矿池源码
go get github.com/sero-cash/mine-pool
直接编译
make linux-v3
或者
bash build/env.sh linux-v3 go install
会生成build/bin/mine-pool
可执行文件
$ ll build/bin/mine-pool
-rwxrwxr-x 1 ubuntu ubuntu 11248656 Feb 25 03:57 build/bin/mine-pool*
三、配置矿池
主要是sero节点和地址
配置完即可启动
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/go/src/github.com/sero-cash/go-czero-import/czero/lib
./build/bin/mine-pool config.json
配置详细信息参考 https://github.com/sero-cash/mine-pool#configuration
四、配置前端
cd www
npm install -g ember-cli@2.9.1
npm install -g bower
npm install
bower install
./build.sh
安装Ngnix
sudo apt install nginx
配置到api(upstream)和dist(静态目录)
upstream api {
server 127.0.0.1:8080;
}
location /api {
proxy_pass http://api;
}
网友评论