wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/armhfp/os/Packages/c/crudini-0.9-3.fc28.noarch.rpm
git clone https://github.com/FISCO-BCOS/fisco-package-build-tool.git
export JAVA_HOME=/opt/jdk1.8.0_191
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[root@localhost ~]# cd /etc/yum.repos.d/ #进入yum配置文件目录
[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.backup #备份配置文件
[root@localhost ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo #下载下来的文件名为 CentOS6-Base-163.repo
[root@localhost ~]# yum clean all #清除Yum缓存
[root@localhost ~]# yum makecache #把服务器的包信息下载到本地电脑缓存起来
[root@localhost ~]# yum update #升级包同时也升级软件和系统内核
git clone https://gitee.com/djsoftc/fisco-package-build-tool.git
git clone https://gitee.com/djsoftc/FISCO-BCOS.git
sudo apt-get install zlib1g-dev
先查看下自己机器上的 OpenSSL 版本。
openssl version
cd /usr/local/src/
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar -zxvf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./config shared zlib
make && make install
#修改历史的OpenSSL文件设置备份
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
#设置软连接使其使用新的OpenSSL版本 刚刚安装的OpenSSL默认安装在/usr/local/ssl
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
#更新动态链接库数据
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig -v
我们再来看看 OpenSSL 版本信息.
openssl version
#OpenSSL 1.0.1g 7 Apr 2014
如果是 1.0.1g,说明你安装正确了
openssl-1.0.0s.tar.gz
root@dcedffd2ff06:/mydata/FISCO-BCOS/tool# babel-node accountManager.js
privKey : 0xb2acb7b9c03a7d6e096581cd96b8aad2ca2f6d1b090b4fa1c965f2c03e5d8d1c
pubKey : 0x7bb9e8572c6d3350cd0caabb768b40090da8db8f2df33fcc9400b2a2fc758d12356e0b83dca2f2f565979bb2094839f867154eb96cf7a8e10867428675f75440
address : 0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847
> key = ec.genKeyPair();
> pubPoint = key.getPublic();
> pub = pubPoint.encode('hex');
'0478536097b78f28e5781af958e73b45c6bb16ae092b94fb377e7e352e1922709ca5f714a603696e08fa40f19d6bccce8f65764fe0d6f17511ebe0fc20297e4be0'
curl http://127.0.0.1:9001/api/evidence/create -X POST -H "Content-Type:application/json" -d "'id':'dj1','hash':'hash','info':'testinfo'"
curl localhost:9001/api/evidence/create -X POST -d "id=dj2&hash=hash&info=testinfo"
200
curl localhost:9001/api/evidence/search/0x0000000000000000000000000000000000000000
20096.77
27933.93
{
"HttpProvider": "http://127.0.0.1:8545",
"ouputpath": "./output/",
"port": 9001,
"account": "0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847",
"accountPrivKey": "2c41fae8c2f579218f152878b8a82105631de5e0dce7a028cc609da3b84ad551",
"nodePrivKey": "0da067b431acda5b6379d8642553e48cc913740ad240d3d9e1d716ebad8a64d8",
"nodePubKeys": ["0478536097b78f28e5781af958e73b45c6bb16ae092b94fb377e7e352e1922709ca5f714a603696e08fa40f19d6bccce8f65764fe0d6f17511ebe0fc20297e4be0"]
}
[contract-receipt]: {"blockHash":"0x2965bcc419eb1fbdc8b3f3893354d6529369b2205b5882209de705ba431ae5ce","blockNumber":25,"contractAddress":"0x0000000000000000000000000000000000000000","cumulativeGasUsed":28312,"gasUsed":28312,"logs":[],"transactionHash":"0xad84172c59af899cf77a549494dbdcd3b1f912f3302c7e877217382f1dff310b","transactionIndex":0}
[root@def7d632e085 tool]# babel-node accountManager.js
RPC=http://0.0.0.0:8545
Ouputpath=./output/
privKey : 0x8d0b31d096ba3366d0e73095500df8bd0d0f45cd55cdeaaac91785a5ed9b6f52
pubKey : 0xd0c0e30da90aca222e8b5d556910efe09b0b32f7b136f23e5527a36738b8308b7548febb8bd619cc93266ae50a41a11be2b5e23f026d32ed11938d83a5fc09e7
address : 0x91094cdcd0e360190de089331c0bb874c8e9ceeb
pub = pubPoint.encode('hex');
'04aeb25133862cbe2749f1db051ef63a265361e1f1bd939ed0f85924d828a7f7f4e923a9a829ed14ca303ec7b1d28d67a8e5f5ac2de6b0bf4c122e2fed8e0565b5'
[root@def7d632e085 evidence]# babel-node role_reg1.js
RPC=http://0.0.0.0:8545
Ouputpath=./output/
EvidenceFactory contract-address:0x3f0aa2dca6677df153626fb08ff123c5a0b75f42
[private-key]:bcec428d5205abe0f0cc8a734083908d9eb8563e31f943d760786edf42ad67dd
[account]:0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3
[]
send transaction success: 0x7aea1d9b1a06b4cfca9ca3a363ad6bdf06cd6b698d9145e1382e6eefcedf6b0f
RES: success:{"blockHash":"0x29867b3c8790cc4d93f358fcf874463c15dc997abfc0b5b4f85db6979ba55fcf","blockNumber":5,"contractAddress":"0x0000000000000000000000000000000000000000","cumulativeGasUsed":22680,"gasUsed":22680,"logs":[],"transactionHash":"0x7aea1d9b1a06b4cfca9ca3a363ad6bdf06cd6b698d9145e1382e6eefcedf6b0f","transactionIndex":0}
curl localhost:9001/api/evidence/search/0x91094cdcd0e360190de089331c0bb874c8e9ceeb
0x34f1c74f4639c410546c118453b5f24c683856a66fa658d0cf0581f781985335
curl localhost:9001/api/evidence/create -X POST -d "id=dj2&hash=hash&info=testinfo"
2019-01-04 09:32:49: Block local:24, current:25
2019-01-04 09:32:49: local...24
2019-01-04 09:32:49: received newEvidenceEvent content:[]
5c2e9a4915394326a03a3e51efa09944
curl localhost:9001/api/evidence/create -X POST -d "id=5c2e9a4915394326a03a3e51efa09944&hash=a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc&info=testinfo"
2019-01-07 01:57:21: RES [POST]: /api/evidence/create, success:0x635dc3afe6f89dceb35ad1e57534ec91e638dabd
curl localhost:9001/api/evidence/search/0xd890b03bb61de07ba0784052cfe78295bbf95cc9
curl http://218.60.3.62/fisco/evidence/search/0xd890b03bb61de07ba0784052cfe78295bbf95cc9
REQ [POST]: /api/evidence/create:{"info":"{\"digest\": \"\\u5ba2\\u6237\\u59d3\\u540d:\\u674e\\u4fca;\\u624b\\u673a\\u53f7\\u7801:18652534524;\\u5408\\u540c\\u540d:\\u5b9e\\u7269\\u9ec4\\u91d1 \\u7b7e\\u7f72\\u65e5\\u671f:2017-02-29 14:23:11\", \"file\": \"PER-TZLC-TZLC-0002-201812260635467022.pdf\"}","hash":"a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc","id":"PER-TZLC-TZLC-0002-201812260635467022"}
REQ [POST]: /api/evidence/create:{"id":"5c2e9a4915394326a03
a3e51efa09944","hash":"a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf
78b90fc","info":"testinfo"}
curl localhost:9001/api/evidence/create -X POST -d "id=PER-TZLC-TZLC-0002-201812260635467022&hash=a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc&info={\"digest\": \"\\u5ba2\\u6237\\u59d3\\u540d:\\u674e\\u4fca;\\u624b\\u673a\\u53f7\\u7801:18652534524;\\u5408\\u540c\\u540d:\\u5b9e\\u7269\\u9ec4\\u91d1 \\u7b7e\\u7f72\\u65e5\\u671f:2017-02-29 14:23:11\", \"file\": \"PER-TZLC-TZLC-0002-201812260635467022.pdf\"}"
REQ [POST]: /api/evidence/create:{"id":"1234","hash":"a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc","info":"{\"digest\": \"\\u5ba2\\u6237\\u59d3\\u540d:\\u674e\\u4fca;\\u624b\\u673a\\u53f7\\u7801:18652534524;\\u5408\\u540c\\u540d:\\u5b9e\\u7269\\u9ec4\\u91d1 \\u7b7e\\u7f72\\u65e5\\u671f:2017-02-29 14:23:11\", \"file\": \"PER-TZLC-TZLC-0002-201812260635467022.pdf\"}"}
RPC=http://0.0.0.0:8545
Ouputpath=./output/
RPC=http://0.0.0.0:8545
Ouputpath=../tool/output/
EvidenceFactory contract-address:0x9216757a91607668cf8a7a38f8ae56206a6e9f6b
[private-key]:bcec428d5205abe0f0cc8a734083908d9eb8563e31f943d760786edf42ad67dd
[account]:0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3
[ '0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3' ]
send transaction success: 0x40fcd3683f1f4003fcdaf8a06d250c0aceb1e6be6bf6ad831870e50f4cdd289d
RES: success:{"blockHash":"0x39c4e627ae0504eb213f953d2d87abd0298ff43cbf90610dfdf4c52f7982c8a1","blockNumber":52,"contractAddress":"0x0000000000000000000000000000000000000000","cumulativeGasUsed":50320,"gasUsed":50320,"logs":[],"transactionHash":"0x40fcd3683f1f4003fcdaf8a06d250c0aceb1e6be6bf6ad831870e50f4cdd289d","transactionIndex":0}
RPC=http://0.0.0.0:8545
Ouputpath=./output/
RPC=http://0.0.0.0:8545
Ouputpath=../tool/output/
EvidenceFactory contract-address:0x9216757a91607668cf8a7a38f8ae56206a6e9f6b
[private-key]:bcec428d5205abe0f0cc8a734083908d9eb8563e31f943d760786edf42ad67dd
[account]:0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3
[ '0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3',
'0x9a222d6ca552a74aeb124994a5e0772ee8894a3c' ]
send transaction success: 0x483d5242fddf3dfa5fd9abfa315406d3e92a2b5d92ff66792dea374129819d0d
RES: success:{"blockHash":"0x703d132d897122488d08f0c534f68826ebe93832d9b88e9713d9addc3013073c","blockNumber":53,"contractAddress":"0x0000000000000000000000000000000000000000","cumulativeGasUsed":50933,"gasUsed":50933,"logs":[],"transactionHash":"0x483d5242fddf3dfa5fd9abfa315406d3e92a2b5d92ff66792dea374129819d0d","transactionIndex":0}
0x9216757a91607668cf8a7a38f8ae56206a6e9f6b
0x70d465a044a93c26e15a33fb322e861adc461c57
curl localhost:9001/api/evidence/search/0x70d465a044a93c26e15a33fb322e861adc461c57
0x70d465a044a93c26e15a33fb322e861adc461c57
0x9216757a91607668cf8a7a38f8ae56206a6e9f6b
lhost:9001/api/evidence/search/0x70d465a044a9
["","","",["1","0"],["0x746b1b752ada6b193cdfbd1a56d6c52ae607f10a6df780fa12cf3682b74bfcc8","0xe20eb0731c7401e27c5fb8e8d09848d6ce80c8bdf59d02baa6216ac8134b2b39"],["0xfad9474ba69b72c16f335409217e0602be6f1bf04037a9d9da4371552c6f5a47","0xc49138ca3a383f9a524226833a21acdf87ae041af193bd6ceb841cea80990291"],["0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847","0x9a222d6ca552a74aeb124994a5e0772ee8894a3c"]][root@def7d632e085 logs]#
curl localhost:9001/api/evidence/search/0x64495097e2e81c0f2baa3cc3301acf389f3e91fd
["","","",["1","0"],["0x746b1b752ada6b193cdfbd1a56d6c52ae607f10a6df780fa12cf3682b74bfcc8","0xe20eb0731c7401e27c5fb8e8d09848d6ce80c8bdf59d02baa6216ac8134b2b39"],["0xfad9474ba69b72c16f335409217e0602be6f1bf04037a9d9da4371552c6f5a47","0xc49138ca3a383f9a524226833a21acdf87ae041af193bd6ceb841cea80990291"],["0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847","0x9a222d6ca552a74aeb124994a5e0772ee8894a3c"]][root@def7d632e085 evidence]#
0x41ed8b1fde6d6a3863ed18c9970540fb40fbc1c8
0x64fa644d2a694681bd6addd6c5e36cccd8dcdde3
b61de07ba0784052cfe78295bbf95cc9lhost:9001/api/evidence/search/0xd890b03b
["","","",["0","1"],["0xe20eb0731c7401e27c5fb8e8d09848d6ce80c8bdf59d02baa6216ac8134b2b39","0x746b1b752ada6b193cdfbd1a56d6c52ae607f10a6df780fa12cf3682b74bfcc8"],["0xc49138ca3a383f9a524226833a21acdf87ae041af193bd6ceb841cea80990291","0xfad9474ba69b72c16f335409217e0602be6f1bf04037a9d9da4371552c6f5a47"],["0x9a222d6ca552a74aeb124994a5e0772ee8894a3c","0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847"]][root@def7d632e085 evidence]#
http://218.60.3.62/fisco/evidence/search/0x5d81398c0560d2f3380c7c1c734dbe66f5d24741
curl http://218.60.3.62/fisco/evidence/create -X POST -d "id=PER-TZLC-TZLC-0002-201812260635467022&hash=a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc&info={\"digest\": \"\\u5ba2\\u6237\\u59d3\\u540d:\\u674e\\u4fca;\\u624b\\u673a\\u53f7\\u7801:18652534524;\\u5408\\u540c\\u540d:\\u5b9e\\u7269\\u9ec4\\u91d1 \\u7b7e\\u7f72\\u65e5\\u671f:2017-02-29 14:23:11\", \"file\": \"PER-TZLC-TZLC-0002-201812260635467022.pdf\"}"
0xa22d69dcb13bda9c20ca20eb0c82fb551c3f28ed
verify
curl localhost:9001/api/evidence/verify/0x7cd5bb35f35655237e0f5048b063e6314792b0eb
["","","",["1","0"],["0x746b1b752ada6b193cdfbd1a56d6c52ae607f10a6df780fa12cf3682b74bfcc8","0xe20eb0731c7401e27c5fb8e8d09848d6ce80c8bdf59d02baa6216ac8134b2b39"],["0xfad9474ba69b72c16f335409217e0602be6f1bf04037a9d9da4371552c6f5a47","0xc49138ca3a383f9a524226833a21acdf87ae041af193bd6ceb841cea80990291"],["0xcf5ca1327740fb2ee2b5ff6a3e180fd074177847","0x9a222d6ca552a74aeb124994a5e0772ee8894a3c"]]}[root@def7d632e085 evidence]#
curl http://218.60.3.62/fisco/evidence/create -X POST -d "id=dj2&hash=hash&info=testinfo"
curl http://218.60.3.62/fisco/evidence/verify/0x7cd5bb35f35655237e0f5048b063e6314792b0eb
0x83e8aacdae325a26873c0fcf6828cb99ecda3876 0xba14da359e6845c77e77da5632fa9ccd452be2ad
curl localhost:9001/api/evidence/create -X POST -d "id=dj2&hash=a9b1d8b58c3882cd55110214e1605e08c9f2888f2f12c186a9981dfbf78b90fc&info=testinfo"
RPC=http://0.0.0.0:8545
Ouputpath=./output/
privKey : 0xec19015025f96f11284f5e0e38f75ffff86356466b5da2e382cddc4c126cdbfc
pubKey : 0xae14d738f6dc086d961e7ff49108d0bc5adb81955d08374619cf51851f2beb745bd08bbf570ae305b17456915c2df883b138b85e52c5e819edac678df44c6249
address : 0x91f312d2510243acb05e4f4120093a19ae0ae030
0x9a222d6ca552a74aeb124994a5e0772ee8894a3c
0x905fb8d08e63b85b9b50504ccf66ed11b7456d35
export N_PREFIX=/opt/node
export PATH=$N_PREFIX/bin:$PATH
---------------------------------------前置机服务---------------------------------------
首先安装epel扩展源:
sudo yum -y install epel-release
sudo yum -y install python-pip
Shell脚本报错:-bash: ./switch.sh: /bin/bash^M: bad interpreter: No such file or directory
vi :set ff=unix
No module named MYSQLdb 问题解决
yum install MySQL-python
mysql -u root -p
CREATE DATABASE evidence;
pip install paramiko