在CentOS上建立Truffle和OpenZeppelin的环境设置

搭建智能合约的环境通常使用Ubuntu为基础,但在CentOS上搭建环境时的注意事项。
如果已经安装了nodejs,请先将其卸载。

环境

CentOS 6.9版本

安装Node.js 9版本

curl --silent --location https://rpm.nodesource.com/setup_9.x | bash -
yum -u install nodejs

安装Truffle

npm install -g truffle
mkdir test_truffle
cd test_truffle/
truffle init

安装OpenZeppelin

npm init
npm install zeppelin-solidity

只要生成了 “/node_modules/zeppelin-solidity/contracts” 目录就表示成功。