广告
返回顶部
首页 > 资讯 > 后端开发 > Python >Ubuntu Server 16.04.
  • 694
分享到

Ubuntu Server 16.04.

UbuntuServer 2023-01-31 05:01:32 694人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

依赖库安装   安装编译环境 apt-get -y install build-essential libtool autotools-dev \ automake autoconf pkg-config bsdmainutils pyt

依赖库安装

 

  • 安装编译环境
    apt-get -y install build-essential libtool autotools-dev \
    automake autoconf pkg-config bsdmainutils python3
  • 安装必备依赖库
    apt-get -y install libssl-dev libboost-all-dev libevent-dev
  • 安装钱包依赖库
    apt-get -y install libdb-dev libdb++-dev
  • 安装其他依赖库
    apt-get -y install libminiupnpc-dev libzMQ3-dev
  • 安装GUI依赖库
    apt-get -y install libQt5gui5 libqt5core5a libqt5dbus5 \
    qttools5-dev qttools5-dev-tools libprotobuf-dev \
    protobuf-compiler libqrencode-dev

    源代码编译

     

  • 下载源代码
    git clone https://GitHub.com/bitcoin/bitcoin.git
    cd bitcoin/
    git checkout -b v0.15.1 v0.15.1
  • 编译源代码
    ./autogen.sh
    ./configure --with-incompatible-bdb --prefix=/data/install/bitcoin
    #--with-incompatible-bdb为忽略libdb版本差异
    make
    make install
  • 其他编译选项
    #--disable-wallet不编译钱包
    #--without-gui不编译GUI

    编译完成后,安装目录下文件为:

    ls /data/install/bitcoin/bin/
    bench_bitcoin  bitcoin-cli  bitcoind  bitcoin-qt  bitcoin-tx  test_bitcoin  test_bitcoin-qt

    附官方文档:Https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
     
    g++: internal compiler error: Killed (program cc1plus)解决办法:

    dd if=/dev/zero of=/swapfile bs=64M count=16
    mkswap /swapfile
    swapon /swapfile
  • bitcoin-cli、bitcoind、bitcoin-qt区别
    bitcoin-qt,带GUI的完整节点。
    bitcoind,无GUI的完整节点。
    bitcoin-cli,使用bitcoin-cli访问JSON-rpc接口。

    启动bitcoind并加入比特币测试网络

     

  • 启动bitcoind
    cd /data/install/bitcoin/bin/
    ./bitcoind --daemon -testnet
    Bitcoin server starting
  • 钱包及数据目录
    cd ~/.bitcoin/testnet3/
    ls -l
    banlist.dat  bitcoind.pid  blocks  chainstate  database  db.log  debug.log  peers.dat  wallet.dat
  • 停止bitcoind
    ./bitcoin-cli -testnet stop
    Bitcoin server stopping

    bitcoin-cli访问jsON-RPC接口

     

  • 获取节点统计信息
    ./bitcoin-cli -testnet getinfo
    {
    "deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16",
    "version": 150100,
    "protocolversion": 70015,
    "walletversion": 139900,
    "balance": 0.00000000,
    "blocks": 531765,
    "timeoffset": 0,
    "connections": 0,
    "proxy": "",
    "difficulty": 858629.5213440134,
    "testnet": true,
    "keypoololdest": 1516255482,
    "keypoolsize": 2000,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "errors": ""
    }
  • 获取区块链信息
    ./bitcoin-cli -testnet getblockchaininfo
    {
    "chain": "test",
    "blocks": 721658,
    "headers": 1259495,
    "bestblockhash": "00000000000005c7be6d6a242e281756ea155ab248df12877c579439b3e9fcbe",
    "difficulty": 262144,
    "mediantime": 1456540510,
    "verificationprogress": 0.5614052534742976,
    "chainwork": "000000000000000000000000000000000000000000000007b2d3c70327f81d35",
    "pruned": false,
    "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    }, 
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    }, 
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
    ],
    "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    }
    }
    }
  • 获取挖矿信息
    ./bitcoin-cli -testnet getmininginfo
    {
    "blocks": 721883,
    "currentblockweight": 0,
    "currentblocktx": 0,
    "difficulty": 1,
    "errors": "",
    "networkhashps": 6860463578666.306,
    "pooledtx": 0,
    "chain": "test"
    }
  • 获取钱包信息
    ./bitcoin-cli -testnet getwalletinfo
    {
    "walletname": "wallet.dat",
    "walletversion": 139900,
    "balance": 0.00000000,
    "unconfirmed_balance": 0.00000000,
    "immature_balance": 0.00000000,
    "txcount": 0,
    "keypoololdest": 1516255482,
    "keypoolsize": 1000,
    "keypoolsize_hd_internal": 1000,
    "paytxfee": 0.00000000,
    "hdmasterkeyid": "1f264d1522573ed5b189940b4b80e60c1d8572e2"
    }
  • 获取区块信息
    ./bitcoin-cli -testnet getblock 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
    {
    "hash": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
    "confirmations": 723926,
    "strippedsize": 285,
    "size": 285,
    "weight": 1140,
    "height": 0,
    "version": 1,
    "versionHex": "00000001",
    "merkleroot": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
    "tx": [
    "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
    ],
    "time": 1296688602,
    "mediantime": 1296688602,
    "nonce": 414098458,
    "bits": "1d00ffff",
    "difficulty": 1,
    "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
    "nextblockhash": "00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206"
    }

    更多JSON-RPC接口使用方法见官方文档:https://bitcoin.org/en/developer-reference#bitcoin-core-apis

--结束END--

本文标题: Ubuntu Server 16.04.

本文链接: https://www.lsjlt.com/news/188504.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Ubuntu Server 16.04.
    依赖库安装   安装编译环境 apt-get -y install build-essential libtool autotools-dev \ automake autoconf pkg-config bsdmainutils pyt...
    99+
    2023-01-31
    Ubuntu Server
  • 在Ubuntu 16.04 Server上安装Zabbix的方法
    监控服务器 - 什么是 Zabbix Zabbix 是企业级开源分布式监控服务器解决方案。该软件能监控网络的不同参数以及服务器的完整性,还允许为任何事件配置基于电子邮件的警报。Zabbix 根据存储在数据库(例如 mys...
    99+
    2022-06-04
    Ubuntu Server安装Zabbix Ubuntu 16.04安装Zabbix
  • 在 Ubuntu 16.04 LTS
    最近 Python 3 发布了新版本 Python 3.6.0,好像又加入了不少黑魔法!~ 由于暂时不能使用 apt-get 的方式安装 Python 3.6,所以还是直接编译源码安装吧。 官网上提供了 Mac 和 Windows 上的安...
    99+
    2023-01-31
    Ubuntu LTS
  • Linux Ubuntu 16.04 p
      os.walk(top,topdown=True,onerror=None,followlinks=False)   os.walk()是python中内置(built-in)的目录树生成(directory tree generat...
    99+
    2023-01-30
    Linux Ubuntu
  • ubuntu 16.04 安装 pyth
    原文是环境:ubuntu14.04, python2.7本地环境:ubuntu16.04, python2.7转自 http://blog.csdn.net/heybob/article/details/52922645 =========...
    99+
    2023-01-31
    ubuntu pyth
  • UBUNTU 16.04怎么安装pgAdmin4
    今天小编给大家分享一下UBUNTU 16.04怎么安装pgAdmin4的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。pgAd...
    99+
    2023-06-28
  • Ubuntu 16.04怎么安装OrientDB
    本篇内容主要讲解“Ubuntu 16.04怎么安装OrientDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu 16.04怎么安装OrientDB”吧!OrientDB是一个开源N...
    99+
    2023-06-27
  • ubuntu 16.04下安装kubernetes1.6(二)
    4.3 安装etcd在master上安装etcd,本文对应的是192.168.100.20这台机器下载etcd安装包wget https://github.com/coreos/etcd/releases/download/v3.2.7/e...
    99+
    2023-06-04
  • Ubuntu 16.04的改变有哪些
    这期内容当中小编将会给大家带来有关Ubuntu 16.04的改变有哪些,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。Ubuntu 16.04 (代号Xenial Xerus,意为好客的非洲地松鼠)不久就将...
    99+
    2023-06-13
  • Ubuntu 16.04中怎么安装Concrete5
    这篇文章给大家介绍Ubuntu 16.04中怎么安装Concrete5,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。步骤1:安装Apache、MySQL和PHP以及其他依赖项Comcrete5在一键安装包上运行。您需要...
    99+
    2023-06-04
  • Ubuntu 16.04 安装后配置环
    安装l2tp-vpn拨号 注意先安装iproute_3.12.0-2_all.deb之后再安装xl2tpd_1.2.5+zju-1_amd64.deb安装好之后需要先配置sudo vpn-connect -c,然后输入学号@a和密码即可使...
    99+
    2023-01-31
    Ubuntu
  • ubuntu 16.04下如何安装kubernetes1.6
    这篇文章将为大家详细讲解有关ubuntu 16.04下如何安装kubernetes1.6,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。1 kubernetes 简介kubernetes是提供了一套组件来管...
    99+
    2023-06-04
  • Ubuntu 16.04 LTS有哪些更新
    本篇内容介绍了“Ubuntu 16.04 LTS有哪些更新”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!Canonical刚刚正式发布了Ub...
    99+
    2023-06-13
  • 如何在Ubuntu 16.04中安装RabbitMq
    如何在Ubuntu 16.04中安装RabbitMq ?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。准备工作一台服务器:Ubuntu Server 16.04....
    99+
    2023-06-13
  • 怎么在Ubuntu 16.04上安装OTRS
    这篇文章将为大家详细讲解有关怎么在Ubuntu 16.04上安装OTRS,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。OTRS ,即开源问题单(ticket)申请系统,是一个用于客户服务、帮助台和 IT ...
    99+
    2023-06-16
  • Ubuntu-16.04 部署 OpenStack Ocata<上>
    注:本文参照openstack官方文档部署,地址https://docs.openstack.org/。明明才10万字符,硬说超过20万,没办法,分篇。建议:配置时仔细核对,经多次实验,很多错误都是配置失误...
    99+
    2022-10-18
  • 入门系列之在Ubuntu 16.04上
    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由谢鸢 发表于云+社区专栏 介绍 TensorFlow是一款由Google构建的用于训练神经网络的开源机器学习软件。TensorFlow的神经网络以有状态数据流图的形式表...
    99+
    2023-01-31
    入门 系列之 Ubuntu
  • Ubuntu 16.04中怎么使用apt-fast
    这篇文章主要讲解了“Ubuntu 16.04中怎么使用apt-fast”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Ubuntu 16.04中怎么使用apt-fast”吧!Apt-fast ...
    99+
    2023-06-27
  • ubuntu 16.04下安装kubernetes 1.6之dashboard
    在前两篇文章中,我们介绍了在ubuntu 16.04环境下的kubernetes 1.6的安装。至此,kubernetes的master,minion端都已经安装好了,接下来我们需要用kubernetes部署一些应用,本文以kubernet...
    99+
    2023-06-04
  • 如何实现Ubuntu 16.04 安装QQ
    本篇内容介绍了“如何实现Ubuntu 16.04 安装QQ”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!首先,上一个系统的概图。再上一些装好...
    99+
    2023-06-13
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作