git wget vim
https://www.cnblogs.com/hellojesson/p/11550638.html
wget http://cdn.npm.taobao.org/dist/python/3.7.4/Python-3.7.4.tgz
python 依赖
apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev
tar -zxvf Python-3.7.4.tgz
解压后,进入目录:
cd Python-3.7.4
建立本地安装目录:
mkdir -p /usr/local/python3
编译安装:
执行这步时,建议后边加上参数:--enable-optimizations 字面意思就是"开启优化",会自动安装pip3及优化配置,但是这会造成编译安装需要较长到时间,如果网络环境不稳定,或者着急使用python环境,可以不加该参数!!!
./configure --prefix=/usr/local/python3 --enable-optimizations
make #耐心等待
make install
---如果本地环境没有装python2,也不打算用python2,可以直接将链接指向写成/usr/bin/python,也是可以的,这样每次进入终端环境或者运行程序,直接输入python就可以,但是还是建议2和3区分开指向。
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python
#添加 pip3 的软链接
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip
pip install flask flask-restful uwsgi request
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
requirements.txt
attrdict
bumpversion<1,>=0.5.3
configobj
cytoolz
lru-dict
parsimonious
pycryptodome
requests
toolz
hypothesis>=3.6.1
argcomplete
py-solc
pymitter
asyncio
promise
上述包在运行时 可能会出现某些包不存在 在次pip install 相应包 可以解决
ln -s /usr/local/python3/bin/uwsgi /usr/bin/uwsgi
去服务器 ~/agencyB/sdk 找相应文件
scp root@47.113.221.169:/root/agencyB/sdk/sdk.crt ~/GeneralBlockchainFramework/contracts/bin/
scp root@47.113.221.169:/root/agencyB/sdk/sdk.key ~/GeneralBlockchainFramework/contracts/bin/
scp root@47.113.221.169:/root/agencyB/sdk/node.key ~/GeneralBlockchainFramework/contracts/bin/
scp root@47.113.221.169:/root/agencyB/sdk/node.crt ~/GeneralBlockchainFramework/contracts/bin/
scp root@47.113.221.169:/root/agencyB/sdk/ca.crt ~/GeneralBlockchainFramework/contracts/bin/
scp root@47.113.221.169:/root/agencyB/sdk/applicationContext.xml ~/GeneralBlockchainFramework/contracts/bin/
client.bcoserror.BcosException: init bcosclient failed, reason: start channelHandler Failed for [Errno 110] Connection timed out, host: 172.24.234.85, port: 20201 需要更改ip 与证书服务器同个ip 修改client_config.py
换源头
npm 换源
https://blog.csdn.net/tmaccs/article/details/101289284
从服务器拷贝 cp /usr/local/src/sdk.key ~/GeneralBlockchainFramework/contracts/bin/ cp /usr/local/src/sdk.crt ~/GeneralBlockchainFramework/contracts/bin/ cp /usr/local/src/node.crt ~/GeneralBlockchainFramework/contracts/bin/ cp /usr/local/src/node.key ~/GeneralBlockchainFramework/contracts/bin/ cp /usr/local/src/ca.crt ~/GeneralBlockchainFramework/contracts/bin/ cp /usr/local/src/applicationContext.xml ~/GeneralBlockchainFramework/contracts/bin/
export PYTHONPATH=$PYTHONPATH:/root/GeneralBlockchainFramework