unomp莱特币矿池搭建
程序员文章站
2022-05-21 10:43:24
...
litecoin钱包安装
安装litecoin
sudo apt-get update
sudo apt-get upgrade
wget https://download.litecoin.org/litecoin-0.18.1/linux/litecoin-0.18.1-x86_64-linux-gnu.tar.gz
tar -zxvf litecoin-0.18.1-x86_64-linux-gnu.tar.gz
cp litecoin-0.18.1/bin/* /usr/bin
修改配置
mkdir ~/.litecoin
vim ~/.litecoin/litecoin.conf 添加如下内容
rpcuser=user
rpcpassword=123456
disablewallet=1
server=1
listen=1
discover=1
bind=0.0.0.0
daemon=1
txindex=1
rpcport=10332
port=10333
mininput=0.00000001
blockprioritysize=1
blockmaxsize=750000
mintxfee=0.00001000
minrelaytxfee=0.00001000
gen=0
启动litecoind,这里先使用测试网络testnet,区块数据写入文件夹/test_ltc_data中:
mkdir /test_ltc_data
litecoind -datadir=/test_ltc_data -testnet -daemon
矿池程序unomp安装
安装redis-server
apt-get install redis-server
安装node管理器
apt-get install build-essential libssl-dev
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
安装node:
注意:这里一定要安装0.10.25,不要安装高版本
nvm install 0.10.25
nvm use 0.10.25
git clone https://github.com/UNOMP/unified-node-open-mining-portal.git unomp
cd unomp
npm update
进入unomp,cp config.json.example config.json, 修改config.json
{
"logLevel": "debug",
"logColors": true,
"cliPort": 17117,
"clustering": {
"enabled": true,
"forks": "auto"
},
"defaultPoolConfigs": {
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"connectionTimeout": 600,
"emitInvalidBlockHashes": false,
"validateWorkerUsername": true,
"tcpProxyProtocol": false,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 500,
"purgeInterval": 300
},
"redis": { ## redis配置
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"password": ""
}
},
"website": {
"enabled": true,
"host": "0.0.0.0", ## 绑定ip
"siteTitle": "UNOMP Beta", ## 网站标题
"port": 80, ## 端口
"stratumHost": "pool.unomp.org",
"stats": {
"updateInterval": 60,
"historicalRetention": 43200,
"hashrateWindow": 300,
"graphColors": ["#058DC7", "#50B432", "#ED561B", "#DDDF00", "#24CBE5", "#64E572",
"#FF9655", "#FFF263", "#6AF9C4"]
},
"adminCenter": {
"enabled": true,
"password": "password" ## web网站密码
}
},
"redis": { ## redis连接
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"password": ""
},
"switching": {
"switch1": {
"enabled": false,
"algorithm": "sha256", ## 算法
"ports": {
"3333": {
"diff": 10, ## 难度
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch2": {
##算法2
},
"switch3": {
##算法3
}
},
"profitSwitch": {
"enabled": false,
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
"useBittrex": true
}
}
cd pool_configs
cp litecoin.json.example ltecoin.json
vim litecoin.json
{
"enabled": true,
"coin": "litecoin.json",
"auxes": [],
"address": "LN2aa2VnZZpgcd63A1CjL32Ag5utZqXcQ7", ## 莱特币地址,矿池挖到的币支付到这里
"rewardRecipients": {
"LN2aa2VnZZpgcd63A1CjL32Ag5utZqXcQ7": 0 ## 将0%的币奖励给这个地址
},
"paymentProcessing": {
"enabled": true,
"paymentInterval": 600,
"minimumPayment": 0.01,
"daemon": {
"host": "127.0.0.1",
"port": 10332,
"user": "root", ## litecoind配置文件中的rpcuser和rpcpassword
"password": "123456"
}
},
"ports": {
"3008": {
"diff": 8
},
"3032": {
"diff": 64,
"varDiff": {
"minDiff": 8,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
},
"3256": {
"diff": 256
}
},
"daemons": [
{
"host": "127.0.0.1",
"port": 10332, ## litecoind配置文件中的rpcport
"user": "root", ## litecoind配置文件中的rpcuser和rpcpassword
"password": "123456"
}
],
"p2p": {
"enabled": false,
"host": "127.0.0.1",
"port": 10333, ## litecoind配置文件中的port
"disableTransactions": false
},
"mposMode": {
"enabled": false,
"host": "127.0.0.1",
"port": 3306,
"user": "me",
"password": "mypass",
"database": "ltc",
"checkPassword": false,
"autoCreateWorker": false
}
}
启动服务:
node init.js
访问:
http://指定的ip
错误集锦:
npm update 报错 bignum相关错误可以尝试单独安装 npm i bignum
npm update 报错 multihashing 相关错误可以尝试单独安装 npm i multihashing
安装litecoin
sudo apt-get update
sudo apt-get upgrade
wget https://download.litecoin.org/litecoin-0.18.1/linux/litecoin-0.18.1-x86_64-linux-gnu.tar.gz
tar -zxvf litecoin-0.18.1-x86_64-linux-gnu.tar.gz
cp litecoin-0.18.1/bin/* /usr/bin
修改配置
mkdir ~/.litecoin
vim ~/.litecoin/litecoin.conf 添加如下内容
rpcuser=user
rpcpassword=123456
disablewallet=1
server=1
listen=1
discover=1
bind=0.0.0.0
daemon=1
txindex=1
rpcport=10332
port=10333
mininput=0.00000001
blockprioritysize=1
blockmaxsize=750000
mintxfee=0.00001000
minrelaytxfee=0.00001000
gen=0
启动litecoind,这里先使用测试网络testnet,区块数据写入文件夹/test_ltc_data中:
mkdir /test_ltc_data
litecoind -datadir=/test_ltc_data -testnet -daemon
矿池程序unomp安装
安装redis-server
apt-get install redis-server
安装node管理器
apt-get install build-essential libssl-dev
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
安装node:
注意:这里一定要安装0.10.25,不要安装高版本
nvm install 0.10.25
nvm use 0.10.25
git clone https://github.com/UNOMP/unified-node-open-mining-portal.git unomp
cd unomp
npm update
进入unomp,cp config.json.example config.json, 修改config.json
{
"logLevel": "debug",
"logColors": true,
"cliPort": 17117,
"clustering": {
"enabled": true,
"forks": "auto"
},
"defaultPoolConfigs": {
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"connectionTimeout": 600,
"emitInvalidBlockHashes": false,
"validateWorkerUsername": true,
"tcpProxyProtocol": false,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 500,
"purgeInterval": 300
},
"redis": { ## redis配置
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"password": ""
}
},
"website": {
"enabled": true,
"host": "0.0.0.0", ## 绑定ip
"siteTitle": "UNOMP Beta", ## 网站标题
"port": 80, ## 端口
"stratumHost": "pool.unomp.org",
"stats": {
"updateInterval": 60,
"historicalRetention": 43200,
"hashrateWindow": 300,
"graphColors": ["#058DC7", "#50B432", "#ED561B", "#DDDF00", "#24CBE5", "#64E572",
"#FF9655", "#FFF263", "#6AF9C4"]
},
"adminCenter": {
"enabled": true,
"password": "password" ## web网站密码
}
},
"redis": { ## redis连接
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"password": ""
},
"switching": {
"switch1": {
"enabled": false,
"algorithm": "sha256", ## 算法
"ports": {
"3333": {
"diff": 10, ## 难度
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch2": {
##算法2
},
"switch3": {
##算法3
}
},
"profitSwitch": {
"enabled": false,
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
"useBittrex": true
}
}
cd pool_configs
cp litecoin.json.example ltecoin.json
vim litecoin.json
{
"enabled": true,
"coin": "litecoin.json",
"auxes": [],
"address": "LN2aa2VnZZpgcd63A1CjL32Ag5utZqXcQ7", ## 莱特币地址,矿池挖到的币支付到这里
"rewardRecipients": {
"LN2aa2VnZZpgcd63A1CjL32Ag5utZqXcQ7": 0 ## 将0%的币奖励给这个地址
},
"paymentProcessing": {
"enabled": true,
"paymentInterval": 600,
"minimumPayment": 0.01,
"daemon": {
"host": "127.0.0.1",
"port": 10332,
"user": "root", ## litecoind配置文件中的rpcuser和rpcpassword
"password": "123456"
}
},
"ports": {
"3008": {
"diff": 8
},
"3032": {
"diff": 64,
"varDiff": {
"minDiff": 8,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
},
"3256": {
"diff": 256
}
},
"daemons": [
{
"host": "127.0.0.1",
"port": 10332, ## litecoind配置文件中的rpcport
"user": "root", ## litecoind配置文件中的rpcuser和rpcpassword
"password": "123456"
}
],
"p2p": {
"enabled": false,
"host": "127.0.0.1",
"port": 10333, ## litecoind配置文件中的port
"disableTransactions": false
},
"mposMode": {
"enabled": false,
"host": "127.0.0.1",
"port": 3306,
"user": "me",
"password": "mypass",
"database": "ltc",
"checkPassword": false,
"autoCreateWorker": false
}
}
启动服务:
node init.js
访问:
http://指定的ip
错误集锦:
npm update 报错 bignum相关错误可以尝试单独安装 npm i bignum
npm update 报错 multihashing 相关错误可以尝试单独安装 npm i multihashing