搭建EOS环境

1、Ubuntu 18.04 下安装eosio

wget https://github.com/eosio/eos/releases/download/v1.4.4/eosio_1.4.4-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio_1.4.4--ubuntu-.04_amd64.deb

  在~目录下创建 contracts 目录。

2、启动钱包。

keosd &

  启动成功的话,可以看见下面的输出。

info  --26T06::24.789 thread-  wallet_plugin.cpp:          plugin_initialize    ] initializing wallet plugin
info --26T06::24.795 thread- http_plugin.cpp: add_handler ] add api url: /v1/keosd/stop
info --26T06::24.796 thread- wallet_api_plugin.cpp: plugin_startup ] starting wallet_api_plugin
info --26T06::24.796 thread- http_plugin.cpp: add_handler ] add api url: /v1/wallet/create
info --26T06::24.796 thread- http_plugin.cpp: add_handler ] add api url: /v1/wallet/create_key
info --26T06::24.796 thread- http_plugin.cpp: add_handler ] add api url: /v1/wallet/get_public_keys

3、启动nodeos

nodeos -e -p eosio \
--plugin eosio::producer_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::http_plugin \
-d /home/ubuntu/contracts/eosio/data \
--config-dir /home/ubuntu/contracts/eosio/config \
--access-control-allow-origin=* \
--contracts-console \
--http-validate-host=false \
—filter-on=‘*’ >> nodeos.log >& &

These settings accomplish the following:

  1. Using a work directory for blockchain data and configuration in eosio directory under the development directory. Here we use eosio/data and eosio/config respectively

  2. Run the Nodeos. This command loads all the basic plugins, set the server address, enable CORS and add some contract debugging and logging.

  3. Enable CORS with no restrictions (*)

  通过以下命令检验是否成功运行nodeos

tail -f nodeos.log

  如果有以下输出,则成功了。

1929001ms thread-   producer_plugin.cpp:       block_production_loo ] Produced block 0000366974ce4e2a... # @ --23T16::09.000 signed by eosio [trxs: , lib: , confirmed: ]
1929502ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366aea085023... # @ --23T16::09.500 signed by eosio [trxs: , lib: , confirmed: ]
1930002ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366b7f074fdd... # @ --23T16::10.000 signed by eosio [trxs: , lib: , confirmed: ]
1930501ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366cd8222adb... # @ --23T16::10.500 signed by eosio [trxs: , lib: , confirmed: ]
1931002ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366d5c1ec38d... # @ --23T16::11.000 signed by eosio [trxs: , lib: , confirmed: ]
1931501ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366e45c1f235... # @ --23T16::11.500 signed by eosio [trxs: , lib: , confirmed: ]
1932001ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000366f98adb324... # @ --23T16::12.000 signed by eosio [trxs: , lib: , confirmed: ]
1932501ms thread- producer_plugin.cpp: block_production_loo ] Produced block 00003670a0f01daa... # @ --23T16::12.500 signed by eosio [trxs: , lib: , confirmed: ]
1933001ms thread- producer_plugin.cpp: block_production_loo ] Produced block 00003671e8b36e1e... # @ --23T16::13.000 signed by eosio [trxs: , lib: , confirmed: ]
1933501ms thread- producer_plugin.cpp: block_production_loo ] Produced block 0000367257fe1623... # @ --23T16::13.500 signed by eosio [trxs: , lib: , confirmed: ]

4、使用cleos查看钱包

cleos wallet list

  你应该看见如下输出:

Wallets:
[]

5、可以查看 ~/contracts/eosio/config/config.ini 文件,可以看到默认nodeos端口为8888.

  

  cleos默认通过localhost:8888来连接nodeos。

  可以通过http来发起请求来测试这个端口。

curl http://localhost:7777/v1/chain/get_info

参考:

1、https://developers.eos.io/eosio-home/docs/setting-up-your-environment

2、https://developers.eos.io/eosio-home/docs/getting-the-software

搭建EOS环境的更多相关文章

  1. EOS智能合约开发(一):EOS环境搭建和启动节点

    EOS和以太坊很像,EOS很明确的说明它就是一个区块链的操作系统,BM在博客中也是说过的. 可以这样比喻,EOS就相当于内置激励系统的Windows/Linux/MacOS,这是它的一个定位. 包括以 ...

  2. Flume1 初识Flume和虚拟机搭建Flume环境

    前言:       工作中需要同步日志到hdfs,以前是找运维用rsync做同步,现在一般是用flume同步数据到hdfs.以前为了工作简单看个flume的一些东西,今天下午有时间自己利用虚拟机搭建了 ...

  3. 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展

    上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...

  4. 搭建LNAMP环境(二)- 源码安装Nginx1.10

    上一篇:搭建LNAMP环境(一)- 源码安装MySQL5.6 1.yum安装编译nginx需要的包 yum -y install pcre pcre-devel zlib zlib-devel ope ...

  5. 搭建LNAMP环境(一)- 源码安装MySQL5.6

    1.yum安装编译mysql需要的包 yum -y install gcc-c++ make cmake bison-devel ncurses-devel perl 2.为mysql创建一个新的用户 ...

  6. Linux 14.04lts 环境下搭建交叉编译环境arm-linux-gcc-4.5.1

    交叉编译工具链是为了编译.链接.处理和调试跨平台体系结构的程序代码,在该环境下编译出嵌入式Linux系统所需要的操作系统.应用程序等,然后再上传到目标板上. 首 先要明确gcc 和arm-linux- ...

  7. GJM : Unity3D HIAR -【 快速入门 】 二、搭建开发环境

    感谢您的阅读.喜欢的.有用的就请大哥大嫂们高抬贵手"推荐一下"吧!你的精神支持是博主强大的写作动力以及转载收藏动力.欢迎转载! 版权声明:本文原创发表于 [请点击连接前往] ,未经 ...

  8. Mac下maven工程的创建,并搭建SSH环境

    最近项目有用到maven,就特地学了一下.maven的一句话攻略就是,项目托管.帮你解决各种项目琐事:清理,导包....等等. 首先先到apach官网去下载一个maven的包,http://maven ...

  9. maven实战(01)_搭建开发环境

    一 下载maven 在maven官网上可下载maven:http://maven.apache.org/download.cgi 下载好后,解压.我的解压到了:D:\maven\apache-mave ...

随机推荐

  1. Codeforces 215D. Hot Days(贪心)

    题意 有nnn个地区和mmm个学生,在第iii个地区时,车上有kik_iki​个学生,车内温度(当前城市的温度tit_iti​+当前车上的学生kik_iki​)不能超过TiT_iTi​,否则,赔偿每个 ...

  2. python txt文件常用读写操作

    文件的打开的两种方式 f = open("data.txt","r") #设置文件对象 f.close() #关闭文件 #为了方便,避免忘记close掉这个文件 ...

  3. how to tell gcc with c99 enable

    just copy the make file here. CC = gccCFLAGS = -Wall -std=c99OUTFILE = outputfileOBJS = source.oSRCS ...

  4. python学习路程1

    常用的转义字符还有: \n 表示换行 \t 表示一个制表符 \\ 表示 \ 字符本身 任务 请将下面两行内容用Python的字符串表示并打印出来: Python was started in 1989 ...

  5. css 样式控制文本过长实现省略号

    css 样式控制文本过长实现省略号 .topicTitle{ text-overflow: ellipsis; max-width: 75%; overflow: hidden; white-spac ...

  6. 学Python的原因

    先立个旗,不学会誓不为人!!!!!!!!!!! 一直以来总是三天打鱼,两天晒网的学习,但是在体制内混久了发现,失去了很多的东西,得到的确极其有限,总感觉这样的生活会失去意义. 寻找生活的激情,重新发现 ...

  7. Filedset

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  8. MII、GMII、RMII、SGMII、XGMII 接口区别

    MII即媒体独立接口,也叫介质无关接口.它是IEEE-802.3定义的以太网行业标准.它包括一个数据接口,以及一个MAC和PHY之间的管理接口(图1). 数据接口包括分别用于发送器和接收器的两条独立信 ...

  9. Java笔记Spring(三)

    spring-beans和spring-context 一.注解 1.自定义一个注解 @Target({ElementType.METHOD}) @Retention(RetentionPolicy. ...

  10. 【阿里云服务器】外网无法访问tomcat下部署的项目

    问题提出:在ESC实例上部署了jdk和tomcat(略,上云了,上云了),启动tomct后,内网可以访问8080端口,外网无法访问8080. 系统环境:winsdow 2008 企业版 解决方案: 在 ...