6月eos主网即将上线,eos版本迭代飞快,刚刚装好了eos3.0,4.0,4.1,4.2就出来了。 eos部署是一件极其耗时的操作,每次删掉重新安装就淡疼了。 升级的中心思想是删除build文件夹,然后git pull,然后重新build。
代码如下:
ubuntu@VM-0-7-ubuntu:~/eos$ rm -rf build/
ubuntu@VM-0-7-ubuntu:~/eos$ ls
circle.yml debian eos.doxygen.in HEADER mesh.dot README.md star.dot testnet.template
CMakeLists.txt Docker eosio_build.sh Jenkinsfile mesh.png ring.dot star.png tests
CMakeModules docs eos-logo.png libraries plugins ring.png testnet-diagrams.sh tools
contracts Doxyfile externals LICENSE.txt programs scripts testnet.md
ubuntu@VM-0-7-ubuntu:~/eos$ git submodule update --init --recursive
ubuntu@VM-0-7-ubuntu:~/eos$ git pull
remote: Counting objects: 28711, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 28711 (delta 3661), reused 3668 (delta 3656), pack- reused 25035
Receiving objects: 100% (28711/28711), 21.99 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (26670/26670), completed with 448 local objects.
From https://github.com/eosio/eos
create mode 100644 unittests/special_accounts_tests.cpp
create mode 100644 unittests/tic_tac_toe_tests.cpp
create mode 100644 unittests/wasm_tests.cpp
ubuntu@VM-0-7-ubuntu:~/eos$ ls
circle.yml debian eos.doxygen.in externals libraries plugins ring.png testnet-diagrams.sh tools
CMakeLists.txt Docker eosio_build.sh governance LICENSE.txt programs scripts testnet.md tutorials
CMakeModules docs eos-logo.png HEADER mesh.dot README.md star.dot testnet.template unittests
contracts Doxyfile EXCHANGE_README.md Jenkinsfile mesh.png ring.dot star.png tests
ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh
git submodules are not up to date.
Please run the command 'git submodule update --init --recursive'.
ubuntu@VM-0-7-ubuntu:~/eos$ git submodule update --init -- recursive
Submodule path 'externals/binaryen': checked out '579f3a099c286a45f58ea1ffc7bf671c415be0a6'
Submodule path 'libraries/appbase': checked out '50dc015b2f0e25c0cd01cf520245da23c0ed446b'
Submodule path 'libraries/chainbase': checked out 'b40a1ec99ee0eb16e28ee1c1a9577f1af7d48b84'
ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh
Beginning build version: 1.2
Mon May 28 17:00:36 UTC 2018
User: ubuntu
git head id: 07a6798584d053ed6061bd892879c6c886ba104e
Current branch: master
ARCHITECTURE: Linux
OS name: Ubuntu
OS Version: 16.04
CPU speed: 2394.454Mhz
CPU cores: 2
Physical Memory: 7855 Mgb
Disk install: /dev/vda1
Disk space total: 49G
Disk space available: 36G
然后 cd build/contracts/,在make
ubuntu@VM-0-7-ubuntu:~/eos$ cd build/contracts/
ubuntu@VM-0-7-ubuntu:~/eos/build/contracts$ make
进入到eos文件夹里在运行:
ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh
然后试试
ubuntu@VM-0-7-ubuntu:~/eos$ cd build/
ubuntu@VM-0-7-ubuntu:~/eos/build$ sudo make install
最后跑一下测试例子:
export PATH=${HOME}/opt/mongodb/bin:$PATH
/usr/bin/mongod -f /home/ubuntu/opt/mongodb/mongod.conf &
cd /home/ubuntu/eos/build; make test