FISCO-BCOS installation
Source address: https://github.com/FISCO-BCOS/FISCO-BCOS
environment
1.1 Machine configuration
configure | Minimum configuration | Recommended configuration |
---|---|---|
CPU | 1.5GHz | 2.4GHz |
RAM | 1GB | 4GB |
core | 2 cores | 4 Nuclear |
bandwidth | 1Mb | 5Mb |
operating system | CentOS (7.2 64-bit) or Ubuntu (16.04 64-bit) |
1.2 Deployment software environment
1.2.1 Dependency Package Installation
#Centos 安装依赖包
sudo yum install -y git openssl openssl-devel deltarpm cmake3
#Ubuntu 安装依赖包
sudo apt-get -y install git openssl libssl-dev libkrb5-dev cmake
1.2.2 Node environment installation
We install node's version manager - nvm
#curl
sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
# 或wegt的方式(二选一即可)
sudo wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
After running the script, you need to do source ~/.bashrc
it before you can use nvm
#查看nvm版本(当前最新版本为0.33.8)
nvm --version
#当前最新Lts版本8.9.4
sudo nvm install 8.9.4
# 安装完毕可以进行查看
nvm ls
#安装npm相关包
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
sudo cnpm install -g babel-cli babel-preset-es2017 ethereum-console
echo '{ "presets": ["es2017"] }' > ~/.babelrc
1.3 Source code compilation and installation
1.3.1 Pull the source code
Install in the newly created mydata directory
#生成mydata目录
sudo mkdir -p /mydata
sudo chmod 777 /mydata
cd /mydata
#拉取源码
git clone https://github.com/FISCO-BCOS/FISCO-BCOS.git
1.3.2 Install the contract-only compiler of FISCO-BCOS
#切换到源码根目录
cd FISCO-BCOS
sudo cp fisco-solc /usr/bin/fisco-solc
sudo chmod +x /usr/bin/fisco-solc
1.3.3 Pull and compile dependencies
#在源码FISCO-BCOS目录中
sudo chmod +x scripts/install_deps.sh
sudo ./scripts/install_deps.sh
1.3.4 Start compiling & installing
#新建build目录
mkdir -p build
cd build/
#Centos下运行 (注意末尾的..)
cmake3 -DEVMJIT=OFF -DTESTS=OFF -DMINIUPNPC=OFF ..
#Ubuntu下运行 (注意末尾的..)
cmake -DEVMJIT=OFF -DTESTS=OFF -DMINIUPNPC=OFF ..
#进行编译
sudo make
#若编译成功,则生成build/eth/fisco-bcos。
sudo make install
So far, fisco-bcos has been successfully compiled and installed