Skip to content

How to install Ethereum on ubuntu 16.04

TonyCai edited this page May 3, 2018 · 1 revision

Table of Contents

Install Source on MacOS

 cd go-ethereum/
 make all
 cd build/bin/
 vi ~/.bashrc
 export GOETHEREUM=/Users/tonycai/workspace/go-ethereum/build/bin
 export PATH=$PATH:$GOETHEREUM

Install Binary Package on Ubuntu

comandline

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ethereum
geth --help

process

tonycai@bee:~$ sudo apt-get update
Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]       
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [62.7 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [66.2 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [51.4 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [85.1 kB]
Hit:7 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                                                                                    
Get:8 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                                                                   
Get:9 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                                                                 
Get:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [710 kB]                                                        
Get:11 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [660 kB]                                                         
Get:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [308 kB]                                                 
Get:13 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [223 kB]                                                    
Get:14 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [580 kB]                                                    
Get:15 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [538 kB]                                                     
Get:16 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [190 kB]                                             
Get:17 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [259 kB]                                                
Get:18 http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,892 B]                                          
Get:19 http://cn.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,324 B]                                              
Get:20 http://cn.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [4,696 B]                                          
Fetched 4,054 kB in 15s (257 kB/s)                                                                                                            
Reading package lists... Done
tonycai@bee:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  cpp-5 fwupdate fwupdate-signed g++-5 gcc-5 gcc-5-base gnome-software gnome-software-common libasan2 libatomic1 libcc1-0 libcilkrts5
  libfwup0 libgcc-5-dev libgfortran3 libgomp1 libitm1 liblsan0 libmpx0 libquadmath0 libstdc++-5-dev libstdc++6 libtsan0 libubsan0
  linux-firmware ubuntu-software
26 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.3 MB of archives.
After this operation, 10.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.6 [131 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.6 [55.1 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.6 [27.4 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.6 [8,878 B]
Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.6 [264 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.6 [105 kB]                            
Get:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.6 [244 kB]                            
Get:8 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.6 [95.3 kB]                          
Get:9 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.6 [40.0 kB]                        
Get:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.6 [9,776 B]                           
Get:11 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.6 [7,681 kB]                            
Get:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.6 [38.8 kB]                          
Get:13 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.6 [8,329 kB]                            
Get:14 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.6 [8,646 kB]                            
Get:15 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.6 [2,241 kB]                     
Get:16 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.6 [1,427 kB]                  
Get:17 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgfortran3 amd64 5.4.0-6ubuntu1~16.04.6 [260 kB]                       
Get:18 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.6 [16.9 kB]                        
Get:19 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++6 amd64 5.4.0-6ubuntu1~16.04.6 [393 kB]                         
Get:20 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 fwupdate-signed amd64 1.11.3+0.5-2ubuntu7 [28.1 kB]                      
Get:21 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 fwupdate amd64 0.5-2ubuntu7 [34.3 kB]                                    
Get:22 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libfwup0 amd64 0.5-2ubuntu7 [13.4 kB]                                    
Get:23 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-software amd64 3.20.5-0ubuntu0.16.04.8 [11.7 kB]                  
Get:24 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gnome-software amd64 3.20.5-0ubuntu0.16.04.8 [240 kB]                    
Get:25 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gnome-software-common all 3.20.5-0ubuntu0.16.04.8 [2,520 kB]             
Get:26 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-firmware all 1.157.15 [45.5 MB]                                    
Fetched 78.3 MB in 5min 48s (225 kB/s)                                                                                                        
(Reading database ... 219011 files and directories currently installed.)
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../libgfortran3_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.6) ...
(Reading database ... 219011 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.6_amd64.deb ...
Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.6) over (5.4.0-6ubuntu1~16.04.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 219011 files and directories currently installed.)
Preparing to unpack .../fwupdate-signed_1.11.3+0.5-2ubuntu7_amd64.deb ...
Unpacking fwupdate-signed (1.11.3+0.5-2ubuntu7) over (1.11.1+0.5-2ubuntu5) ...
Preparing to unpack .../fwupdate_0.5-2ubuntu7_amd64.deb ...
Unpacking fwupdate (0.5-2ubuntu7) over (0.5-2ubuntu5) ...
Preparing to unpack .../libfwup0_0.5-2ubuntu7_amd64.deb ...
Unpacking libfwup0:amd64 (0.5-2ubuntu7) over (0.5-2ubuntu5) ...
Preparing to unpack .../ubuntu-software_3.20.5-0ubuntu0.16.04.8_amd64.deb ...
Unpacking ubuntu-software (3.20.5-0ubuntu0.16.04.8) over (3.20.5-0ubuntu0.16.04.7) ...
Preparing to unpack .../gnome-software_3.20.5-0ubuntu0.16.04.8_amd64.deb ...
Unpacking gnome-software (3.20.5-0ubuntu0.16.04.8) over (3.20.5-0ubuntu0.16.04.7) ...
Preparing to unpack .../gnome-software-common_3.20.5-0ubuntu0.16.04.8_all.deb ...
Unpacking gnome-software-common (3.20.5-0ubuntu0.16.04.8) over (3.20.5-0ubuntu0.16.04.7) ...
Preparing to unpack .../linux-firmware_1.157.15_all.deb ...
Unpacking linux-firmware (1.157.15) over (1.157.14) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.6) ...
Setting up libfwup0:amd64 (0.5-2ubuntu7) ...
Setting up fwupdate (0.5-2ubuntu7) ...
System not running in EFI mode, not installing to EFI system partition.
efibootmgr: EFI variables are not supported on this system.
Setting up fwupdate-signed (1.11.3+0.5-2ubuntu7) ...
System not running in EFI mode, not installing to EFI system partition.
Setting up gnome-software-common (3.20.5-0ubuntu0.16.04.8) ...
Setting up gnome-software (3.20.5-0ubuntu0.16.04.8) ...
Setting up ubuntu-software (3.20.5-0ubuntu0.16.04.8) ...
Setting up linux-firmware (1.157.15) ...
update-initramfs: Generating /boot/initrd.img-4.13.0-32-generic
W: Possible missing firmware /lib/firmware/amdgpu/raven_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_vcn.bin for module amdgpu
update-initramfs: Generating /boot/initrd.img-4.13.0-31-generic
W: Possible missing firmware /lib/firmware/amdgpu/raven_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_vcn.bin for module amdgpu
Processing triggers for libc-bin (2.23-0ubuntu10) ...
tonycai@bee:~$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
software-properties-common is already the newest version (0.96.20.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
tonycai@bee:~$ sudo add-apt-repository -y ppa:ethereum/ethereum
gpg: keyring `/tmp/tmp6e6ei13t/secring.gpg' created
gpg: keyring `/tmp/tmp6e6ei13t/pubring.gpg' created
gpg: requesting key 923F6CA9 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp6e6ei13t/trustdb.gpg: trustdb created
gpg: key 923F6CA9: public key "Launchpad PPA for Ethereum" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
tonycai@bee:~$ sudo apt-get update
Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                           
Hit:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease                  
Hit:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease                                          
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                 
Get:6 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial InRelease [17.5 kB]
Get:7 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 Packages [6,684 B]                                                  
Get:8 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main i386 Packages [6,696 B]                                                   
Get:9 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main Translation-en [3,072 B]                                                  
Fetched 34.0 kB in 24s (1,375 B/s)                                                                                                            
Reading package lists... Done
tonycai@bee:~$ sudo apt-get install ethereum
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
The following NEW packages will be installed:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 23.1 MB of archives.
After this operation, 79.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 abigen amd64 1.7.3+build11486+xenial [1,526 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 swarm amd64 2.1.6-1 [89.9 kB]                                                 
Get:3 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 bootnode amd64 1.7.3+build11486+xenial [4,099 kB]                   
Get:4 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 evm amd64 1.7.3+build11486+xenial [4,047 kB]                        
Get:5 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 geth amd64 1.7.3+build11486+xenial [5,822 kB]                       
Get:6 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 puppeth amd64 1.7.3+build11486+xenial [2,596 kB]                    
Get:7 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 rlpdump amd64 1.7.3+build11486+xenial [587 kB]                      
Get:8 http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 wnode amd64 1.7.3+build11486+xenial [4,316 kB]                      
Get:9 http://101.96.10.27/ppa.launchpad.net/ethereum/ethereum/ubuntu xenial/main amd64 ethereum amd64 1.7.3+build11486+xenial [1,546 B]       
Fetched 23.1 MB in 17min 0s (22.6 kB/s)                                                                                                       
Selecting previously unselected package swarm.
(Reading database ... 219029 files and directories currently installed.)
Preparing to unpack .../swarm_2.1.6-1_amd64.deb ...
Unpacking swarm (2.1.6-1) ...
Selecting previously unselected package abigen.
Preparing to unpack .../abigen_1.7.3+build11486+xenial_amd64.deb ...
Unpacking abigen (1.7.3+build11486+xenial) ...
Selecting previously unselected package bootnode.
Preparing to unpack .../bootnode_1.7.3+build11486+xenial_amd64.deb ...
Unpacking bootnode (1.7.3+build11486+xenial) ...
Selecting previously unselected package evm.
Preparing to unpack .../evm_1.7.3+build11486+xenial_amd64.deb ...
Unpacking evm (1.7.3+build11486+xenial) ...
Selecting previously unselected package geth.
Preparing to unpack .../geth_1.7.3+build11486+xenial_amd64.deb ...
Unpacking geth (1.7.3+build11486+xenial) ...
Selecting previously unselected package puppeth.
Preparing to unpack .../puppeth_1.7.3+build11486+xenial_amd64.deb ...
Unpacking puppeth (1.7.3+build11486+xenial) ...
Selecting previously unselected package rlpdump.
Preparing to unpack .../rlpdump_1.7.3+build11486+xenial_amd64.deb ...
Unpacking rlpdump (1.7.3+build11486+xenial) ...
Selecting previously unselected package wnode.
Preparing to unpack .../wnode_1.7.3+build11486+xenial_amd64.deb ...
Unpacking wnode (1.7.3+build11486+xenial) ...
Selecting previously unselected package ethereum.
Preparing to unpack .../ethereum_1.7.3+build11486+xenial_amd64.deb ...
Unpacking ethereum (1.7.3+build11486+xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up swarm (2.1.6-1) ...
Setting up abigen (1.7.3+build11486+xenial) ...
Setting up bootnode (1.7.3+build11486+xenial) ...
Setting up evm (1.7.3+build11486+xenial) ...
Setting up geth (1.7.3+build11486+xenial) ...
Setting up puppeth (1.7.3+build11486+xenial) ...
Setting up rlpdump (1.7.3+build11486+xenial) ...
Setting up wnode (1.7.3+build11486+xenial) ...
Setting up ethereum (1.7.3+build11486+xenial) ...

geth command manual

tonycai@bee:~$ geth --help
NAME:
   geth - the go-ethereum command line interface

   Copyright 2013-2017 The go-ethereum Authors

USAGE:
   geth [options] command [command options] [arguments...]
   
VERSION:
   1.7.3-stable-4bb3c89d
   
COMMANDS:
   account     Manage accounts
   attach      Start an interactive JavaScript environment (connect to node)
   bug         opens a window to report a bug on the geth repo
   console     Start an interactive JavaScript environment
   copydb      Create a local chain from a target chaindata folder
   dump        Dump a specific block from storage
   dumpconfig  Show configuration values
   export      Export blockchain into file
   import      Import a blockchain file
   init        Bootstrap and initialize a new genesis block
   js          Execute the specified JavaScript files
   license     Display license information
   makecache   Generate ethash verification cache (for testing)
   makedag     Generate ethash mining DAG (for testing)
   monitor     Monitor and visualize node metrics
   removedb    Remove blockchain and state databases
   version     Print version numbers
   wallet      Manage Ethereum presale wallets
   help, h     Shows a list of commands or help for one command
   
ETHEREUM OPTIONS:
  --config value                       TOML configuration file
  --datadir "/home/tonycai/.ethereum"  Data directory for the databases and keystore
  --keystore                           Directory for the keystore (default = inside the datadir)
  --nousb                              Disables monitoring for and managing USB hardware wallets
  --networkid value                    Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1)
  --testnet                            Ropsten network: pre-configured proof-of-work test network
  --rinkeby                            Rinkeby network: pre-configured proof-of-authority test network
  --syncmode "fast"                    Blockchain sync mode ("fast", "full", or "light")
  --ethstats value                     Reporting URL of a ethstats service (nodename:secret@host:port)
  --identity value                     Custom node name
  --lightserv value                    Maximum percentage of time allowed for serving LES requests (0-90) (default: 0)
  --lightpeers value                   Maximum number of LES client peers (default: 20)
  --lightkdf                           Reduce key-derivation RAM & CPU usage at some expense of KDF strength
  
DEVELOPER CHAIN OPTIONS:
  --dev               Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled
  --dev.period value  Block period to use in developer mode (0 = mine only if transaction pending) (default: 0)
  
ETHASH OPTIONS:
  --ethash.cachedir                        Directory to store the ethash verification caches (default = inside the datadir)
  --ethash.cachesinmem value               Number of recent ethash caches to keep in memory (16MB each) (default: 2)
  --ethash.cachesondisk value              Number of recent ethash caches to keep on disk (16MB each) (default: 3)
  --ethash.dagdir "/home/tonycai/.ethash"  Directory to store the ethash mining DAGs (default = inside home folder)
  --ethash.dagsinmem value                 Number of recent ethash mining DAGs to keep in memory (1+GB each) (default: 1)
  --ethash.dagsondisk value                Number of recent ethash mining DAGs to keep on disk (1+GB each) (default: 2)
  
TRANSACTION POOL OPTIONS:
  --txpool.nolocals            Disables price exemptions for locally submitted transactions
  --txpool.journal value       Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
  --txpool.rejournal value     Time interval to regenerate the local transaction journal (default: 1h0m0s)
  --txpool.pricelimit value    Minimum gas price limit to enforce for acceptance into the pool (default: 1)
  --txpool.pricebump value     Price bump percentage to replace an already existing transaction (default: 10)
  --txpool.accountslots value  Minimum number of executable transaction slots guaranteed per account (default: 16)
  --txpool.globalslots value   Maximum number of executable transaction slots for all accounts (default: 4096)
  --txpool.accountqueue value  Maximum number of non-executable transaction slots permitted per account (default: 64)
  --txpool.globalqueue value   Maximum number of non-executable transaction slots for all accounts (default: 1024)
  --txpool.lifetime value      Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
  
PERFORMANCE TUNING OPTIONS:
  --cache value            Megabytes of memory allocated to internal caching (min 16MB / database forced) (default: 128)
  --trie-cache-gens value  Number of trie node generations to keep in memory (default: 120)
  
ACCOUNT OPTIONS:
  --unlock value    Comma separated list of accounts to unlock
  --password value  Password file to use for non-interactive password input
  
API AND CONSOLE OPTIONS:
  --rpc                  Enable the HTTP-RPC server
  --rpcaddr value        HTTP-RPC server listening interface (default: "localhost")
  --rpcport value        HTTP-RPC server listening port (default: 8545)
  --rpcapi value         API's offered over the HTTP-RPC interface
  --ws                   Enable the WS-RPC server
  --wsaddr value         WS-RPC server listening interface (default: "localhost")
  --wsport value         WS-RPC server listening port (default: 8546)
  --wsapi value          API's offered over the WS-RPC interface
  --wsorigins value      Origins from which to accept websockets requests
  --ipcdisable           Disable the IPC-RPC server
  --ipcpath              Filename for IPC socket/pipe within the datadir (explicit paths escape it)
  --rpccorsdomain value  Comma separated list of domains from which to accept cross origin requests (browser enforced)
  --jspath loadScript    JavaScript root path for loadScript (default: ".")
  --exec value           Execute JavaScript statement
  --preload value        Comma separated list of JavaScript files to preload into the console
  
NETWORKING OPTIONS:
  --bootnodes value     Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
  --bootnodesv4 value   Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
  --bootnodesv5 value   Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
  --port value          Network listening port (default: 30303)
  --maxpeers value      Maximum number of network peers (network disabled if set to 0) (default: 25)
  --maxpendpeers value  Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
  --nat value           NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>) (default: "any")
  --nodiscover          Disables the peer discovery mechanism (manual peer addition)
  --v5disc              Enables the experimental RLPx V5 (Topic Discovery) mechanism
  --netrestrict value   Restricts network communication to the given IP networks (CIDR masks)
  --nodekey value       P2P node key file
  --nodekeyhex value    P2P node key as hex (for testing)
  
MINER OPTIONS:
  --mine                    Enable mining
  --minerthreads value      Number of CPU threads to use for mining (default: 4)
  --etherbase value         Public address for block mining rewards (default = first account created) (default: "0")
  --targetgaslimit value    Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388)
  --gasprice "18000000000"  Minimal gas price to accept for mining a transactions
  --extradata value         Block extra data set by the miner (default = client version)
  
GAS PRICE ORACLE OPTIONS:
  --gpoblocks value      Number of recent blocks to check for gas prices (default: 10)
  --gpopercentile value  Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 50)
  
VIRTUAL MACHINE OPTIONS:
  --vmdebug  Record information useful for VM and contract debugging
  
LOGGING AND DEBUGGING OPTIONS:
  --metrics                 Enable metrics collection and reporting
  --fakepow                 Disables proof-of-work verification
  --nocompaction            Disables db compaction after import
  --verbosity value         Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
  --vmodule value           Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)
  --backtrace value         Request a stack trace at a specific logging statement (e.g. "block.go:271")
  --debug                   Prepends log messages with call-site location (file and line number)
  --pprof                   Enable the pprof HTTP server
  --pprofaddr value         pprof HTTP server listening interface (default: "127.0.0.1")
  --pprofport value         pprof HTTP server listening port (default: 6060)
  --memprofilerate value    Turn on memory profiling with the given rate (default: 524288)
  --blockprofilerate value  Turn on block profiling with the given rate (default: 0)
  --cpuprofile value        Write CPU profile to the given file
  --trace value             Write execution trace to the given file
  
WHISPER (EXPERIMENTAL) OPTIONS:
  --shh                       Enable Whisper
  --shh.maxmessagesize value  Max message size accepted (default: 1048576)
  --shh.pow value             Minimum POW accepted (default: 0.2)
  
DEPRECATED OPTIONS:
  --fast   Enable fast syncing through state downloads
  --light  Enable light client mode
  
MISC OPTIONS:
  --help, -h  show help
  

COPYRIGHT:
   Copyright 2013-2017 The go-ethereum Authors

Init private ethereum

tonycai@bee:~/workspace/private-geth$ geth --datadir data0 init genesis.json
WARN [02-03|14:57:08] No etherbase set and no accounts found as default 
INFO [02-03|14:57:08] Allocated cache and file handles         database=/home/tonycai/workspace/private-geth/data0/geth/chaindata cache=16 handles=16
INFO [02-03|14:57:09] Writing custom genesis block 
INFO [02-03|14:57:09] Successfully wrote genesis state         database=chaindata                                                 hash=a0e580…a5e82e
INFO [02-03|14:57:09] Allocated cache and file handles         database=/home/tonycai/workspace/private-geth/data0/geth/lightchaindata cache=16 handles=16
INFO [02-03|14:57:09] Writing custom genesis block 
INFO [02-03|14:57:09] Successfully wrote genesis state         database=lightchaindata                                                 hash=a0e580…a5e82e

Geth New Account

tonycai@bee:~/workspace/private-geth/data0$ geth --datadir ./data0 --networkid 11 console
WARN [02-03|15:00:07] No etherbase set and no accounts found as default 
INFO [02-03|15:00:07] Starting peer-to-peer node               instance=Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9
INFO [02-03|15:00:07] Allocated cache and file handles         database=/home/tonycai/workspace/private-geth/data0/data0/geth/chaindata cache=128 handles=1024
INFO [02-03|15:00:07] Writing default main-net genesis block 
INFO [02-03|15:00:08] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Engine: ethash}"
INFO [02-03|15:00:08] Disk storage enabled for ethash caches   dir=/home/tonycai/workspace/private-geth/data0/data0/geth/ethash count=3
INFO [02-03|15:00:08] Disk storage enabled for ethash DAGs     dir=/home/tonycai/.ethash                                        count=2
INFO [02-03|15:00:08] Initialising Ethereum protocol           versions="[63 62]" network=11
INFO [02-03|15:00:08] Loaded most recent local header          number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [02-03|15:00:08] Loaded most recent local full block      number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [02-03|15:00:08] Loaded most recent local fast block      number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [02-03|15:00:08] Regenerated local transaction journal    transactions=0 accounts=0
INFO [02-03|15:00:08] Starting P2P networking 
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANConnectionDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANConnectionDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANConnectionDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
2018/02/03 15:00:10 ssdp: got unexpected search target result "urn:schemas-upnp-org:device:WANDevice:1"
INFO [02-03|15:00:10] UDP listener up                          self=enode://a61c77b744f86a23df6067310f09b28fa57f599c6f7778b0dc1e4f24208797e83ca2223aa72f5315b085f18bd71abdba38ccbd8dc5b156dac8c44a929883dfe5@[::]:30303
INFO [02-03|15:00:10] RLPx listener up                         self=enode://a61c77b744f86a23df6067310f09b28fa57f599c6f7778b0dc1e4f24208797e83ca2223aa72f5315b085f18bd71abdba38ccbd8dc5b156dac8c44a929883dfe5@[::]:30303
INFO [02-03|15:00:10] IPC endpoint opened: /home/tonycai/workspace/private-geth/data0/data0/geth.ipc 
Welcome to the Geth JavaScript console!

instance: Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9
 modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

> eth.accounts
[]
> personal.newAccount("123")
"0xcbd289cf17590b5e224efd2129fb203bd94331b8"

web3 Command

tonycai@bee:~/workspace/privateChain$ geth attach ./data1/geth.ipc
Welcome to the Geth JavaScript console!

instance: Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9
coinbase: 0xa1e986f88132edc7e952c293466fb6495e96d4ff
at block: 0 (Thu, 01 Jan 1970 08:00:00 CST)
 datadir: /home/tonycai/workspace/privateChain/data1
 modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0

> web3
{
  admin: {
    datadir: "/home/tonycai/workspace/privateChain/data1",
    nodeInfo: {
      enode: "enode://b6df662a6e5ab31adaf1fb1b29026a565aaeab7b412c91aa35341838e6ec020b527da18e594465b656b16e046d83f195f78ab7c7cfe80e9f4e101b8ab8195270@[::]:34031?discport=0",
      id: "b6df662a6e5ab31adaf1fb1b29026a565aaeab7b412c91aa35341838e6ec020b527da18e594465b656b16e046d83f195f78ab7c7cfe80e9f4e101b8ab8195270",
      ip: "::",
      listenAddr: "[::]:34031",
      name: "Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9",
      ports: {
        discovery: 0,
        listener: 34031
      },
      protocols: {
        eth: {...},
        shh: {...}
      }
    },
    peers: [],
    addPeer: function(),
    exportChain: function(),
    getDatadir: function(callback),
    getNodeInfo: function(callback),
    getPeers: function(callback),
    importChain: function(),
    removePeer: function(),
    sleep: function github.com/ethereum/go-ethereum/console.(*bridge).Sleep-fm(),
    sleepBlocks: function github.com/ethereum/go-ethereum/console.(*bridge).SleepBlocks-fm(),
    startRPC: function(),
    startWS: function(),
    stopRPC: function(),
    stopWS: function()
  },
  bzz: {
    hive: undefined,
    info: undefined,
    blockNetworkRead: function(),
    download: function(),
    get: function(),
    getHive: function(callback),
    getInfo: function(callback),
    modify: function(),
    put: function(),
    retrieve: function(),
    store: function(),
    swapEnabled: function(),
    syncEnabled: function(),
    upload: function()
  },
  clique: {
    proposals: {},
    discard: function(),
    getProposals: function(callback),
    getSigners: function(),
    getSignersAtHash: function(),
    getSnapshot: function(),
    getSnapshotAtHash: function(),
    propose: function()
  },
  currentProvider: {
    newAccount: function(),
    openWallet: function(),
    send: function github.com/ethereum/go-ethereum/console.(*bridge).Send-fm(),
    sendAsync: function github.com/ethereum/go-ethereum/console.(*bridge).Send-fm(),
    sign: function(),
    unlockAccount: function()
  },
  db: {
    getHex: function(),
    getString: function(),
    putHex: function(),
    putString: function()
  },
  debug: {
    backtraceAt: function(),
    blockProfile: function(),
    chaindbCompact: function(),
    chaindbProperty: function(),
    cpuProfile: function(),
    dumpBlock: function(),
    freeOSMemory: function(),
    gcStats: function(),
    getBadBlocks: function(),
    getBlockRlp: function(),
    getModifiedAccountsByHash: function(),
    getModifiedAccountsByNumber: function(),
    goTrace: function(),
    memStats: function(),
    metrics: function(),
    preimage: function(),
    printBlock: function(),
    seedHash: function(),
    setBlockProfileRate: function(),
    setGCPercent: function(),
    setHead: function(),
    stacks: function(),
    startCPUProfile: function(),
    startGoTrace: function(),
    stopCPUProfile: function(),
    stopGoTrace: function(),
    storageRangeAt: function(),
    traceBlock: function(),
    traceBlockByHash: function(),
    traceBlockByNumber: function(),
    traceBlockFromFile: function(),
    traceTransaction: function(),
    verbosity: function(),
    vmodule: function(),
    writeBlockProfile: function(),
    writeMemProfile: function()
  },
  eth: {
    accounts: ["0xa1e986f88132edc7e952c293466fb6495e96d4ff"],
    blockNumber: 0,
    coinbase: "0xa1e986f88132edc7e952c293466fb6495e96d4ff",
    compile: {
      lll: function(),
      serpent: function(),
      solidity: function()
    },
    defaultAccount: undefined,
    defaultBlock: "latest",
    gasPrice: 1,
    hashrate: 0,
    mining: true,
    pendingTransactions: [],
    protocolVersion: "0x3f",
    syncing: false,
    call: function(),
    contract: function(abi),
    estimateGas: function(),
    filter: function(options, callback, filterCreationErrorCallback),
    getAccounts: function(callback),
    getBalance: function(),
    getBlock: function(),
    getBlockNumber: function(callback),
    getBlockTransactionCount: function(),
    getBlockUncleCount: function(),
    getCode: function(),
    getCoinbase: function(callback),
    getCompilers: function(),
    getGasPrice: function(callback),
    getHashrate: function(callback),
    getMining: function(callback),
    getPendingTransactions: function(callback),
    getProtocolVersion: function(callback),
    getRawTransaction: function(),
    getRawTransactionFromBlock: function(),
    getStorageAt: function(),
    getSyncing: function(callback),
    getTransaction: function(),
    getTransactionCount: function(),
    getTransactionFromBlock: function(),
    getTransactionReceipt: function(),
    getUncle: function(),
    getWork: function(),
    iban: function(iban),
    icapNamereg: function(),
    isSyncing: function(callback),
    namereg: function(),
    resend: function(),
    sendIBANTransaction: function(),
    sendRawTransaction: function(),
    sendTransaction: function(),
    sign: function(),
    signTransaction: function(),
    submitTransaction: function(),
    submitWork: function()
  },
  isIBAN: undefined,
  miner: {
    getHashrate: function(),
    setEtherbase: function(),
    setExtra: function(),
    setGasPrice: function(),
    start: function(),
    stop: function()
  },
  net: {
    listening: true,
    peerCount: 0,
    version: "123",
    getListening: function(callback),
    getPeerCount: function(callback),
    getVersion: function(callback)
  },
  personal: {
    listAccounts: ["0xa1e986f88132edc7e952c293466fb6495e96d4ff"],
    listWallets: [{
        accounts: [...],
        status: "Unlocked",
        url: "keystore:///home/tonycai/workspace/privateChain/data1/keystore/UTC--2018-02-04T07-19-26.824696553Z--a1e986f88132edc7e952c293466fb6495e96d4ff"
    }],
    deriveAccount: function(),
    ecRecover: function(),
    getListAccounts: function(callback),
    getListWallets: function(callback),
    importRawKey: function(),
    lockAccount: function(),
    newAccount: function github.com/ethereum/go-ethereum/console.(*bridge).NewAccount-fm(),
    openWallet: function github.com/ethereum/go-ethereum/console.(*bridge).OpenWallet-fm(),
    sendTransaction: function(),
    sign: function github.com/ethereum/go-ethereum/console.(*bridge).Sign-fm(),
    unlockAccount: function github.com/ethereum/go-ethereum/console.(*bridge).UnlockAccount-fm()
  },
  providers: {
    HttpProvider: function(host, timeout, user, password),
    IpcProvider: function(path, net)
  },
  rpc: {
    modules: {
      admin: "1.0",
      clique: "1.0",
      debug: "1.0",
      eth: "1.0",
      miner: "1.0",
      net: "1.0",
      personal: "1.0",
      rpc: "1.0",
      shh: "1.0",
      txpool: "1.0",
      web3: "1.0"
    },
    getModules: function(callback)
  },
  settings: {
    defaultAccount: undefined,
    defaultBlock: "latest"
  },
  shh: {
    info: {
      maxMessageSize: 1048576,
      memory: 0,
      messages: 0,
      minPow: 0.2
    },
    version: 5,
    addPrivateKey: function(),
    addSymKey: function(),
    deleteKeyPair: function(),
    deleteSymKey: function(),
    generateSymKeyFromPassword: function(),
    getInfo: function(callback),
    getPrivateKey: function(),
    getPublicKey: function(),
    getSymKey: function(),
    getVersion: function(callback),
    hasKeyPair: function(),
    hasSymKey: function(),
    markTrustedPeer: function(),
    newKeyPair: function(),
    newMessageFilter: function(options, callback, filterCreationErrorCallback),
    newSymKey: function(),
    post: function(),
    setMaxMessageSize: function(),
    setMinPoW: function()
  },
  txpool: {
    content: {
      pending: {},
      queued: {}
    },
    inspect: {
      pending: {},
      queued: {}
    },
    status: {
      pending: 0,
      queued: 0
    },
    getContent: function(callback),
    getInspect: function(callback),
    getStatus: function(callback)
  },
  version: {
    api: "0.20.1",
    ethereum: "0x3f",
    network: "123",
    node: "Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9",
    whisper: "5.0",
    getEthereum: function(callback),
    getNetwork: function(callback),
    getNode: function(callback),
    getWhisper: function(callback)
  },
  BigNumber: function a(e,n),
  createBatch: function(),
  fromAscii: function(str),
  fromDecimal: function(value),
  fromICAP: function(icap),
  fromUtf8: function(str),
  fromWei: function(number, unit),
  isAddress: function(address),
  isChecksumAddress: function(address),
  isConnected: function(),
  padLeft: function(string, chars, sign),
  padRight: function(string, chars, sign),
  reset: function(keepIsSyncing),
  setProvider: function(provider),
  sha3: function(string, options),
  toAscii: function(hex),
  toBigNumber: function(number),
  toChecksumAddress: function(address),
  toDecimal: function(value),
  toHex: function(val),
  toUtf8: function(hex),
  toWei: function(number, unit)
}
> 

geth command

#!/bin/bash

geth --networkid 123 --dev --datadir data1 --rpc --rpcaddr 192.168.1.15 --rpcport 8989 --port 3000

# console
# $ geth attach ./data1/geth.ipc
# eth
# net
# admin
# miner
# personal
# txpool
# web3

View MyBalance

> web3.fromWei(eth.getBalance(eth.coinbase))
7790
> web3.fromWei(web3.eth.getBalance(web3.eth.coinbase));
8320
> 

Join Ethereum Network

  • 链接该节点的第二个方法:
 首先,用geth命令打开命令行钱包,然后新建一个终端窗口,输入命令 geth attach。
 然后,在新窗口中输入命令行  
 $ geth attach ./data1/geth.ipc
 > admin.addPeer("enode://91922b12115c067005c574844c6bbdb114eb262f90b6355cec89e13b483c3e4669c6d63ec66b6e3ca7a3a462d28edb3c659e9fa05ed4c7234524e582a8816743@120.27.164.92:13333")
 admin.removePeer('4ffbd0b6c6beb654e35992d4f9115091b6bd5eddc251acde9f477a78e3b766da521dfe1c2dfbaac11b752f0e34a467eb448ce26136a76d5257412f705fd21d7e') # peer ID

Mist - Eth Wallet

  • cd /Users/tonycai/Library/Ethereum
 geth attach ipc:geth.ipc

Parity

  • New Ethereum Parity client
  • Ethereum Wallet

CoinMarketCap

 代币市场排行榜
 CoinDesk - Leader in blockchain news.
 Ethereum token scan
mkr币交易平台:

https://gate.io/ (注册以后,进入USDT交易区查看)

makerdao项目介绍

mkr币是Maker系统的管理型代币和效用代币,用来支付借Dai的稳定费用以及参与管理系统。与Dai稳定货币不同,由于其独特的供给机制和在Maker平台上的作用,MKR的价值和整个系统的表现息息相关。去中心化稳定货币Dai在抵押贷款、杠杆交易、避险保值、国际汇款、供应链和政府公开记账方面都有关键的应用。DAI币和美元保持1:1锚定。

install solidity

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
 To try it out, visit https://remix.ethereum.org.
 brew update
 brew upgrade
 brew tap ethereum/ethereum
 brew install solidity
 brew linkapps solidity
  • uninstall
 brew unlink solidity
 # Install 0.4.8
 brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/77cce03da9f289e5a3ffe579840d3c5dc0a62717/solidity.rb
  • which solc
 /usr/local/bin/solc
$ /usr/local/bin/solc --version
solc, the solidity compiler commandline interface
Version: 0.4.19+commit.c4cbbb05.Darwin.appleclang

Remix

  • 是Remix,这是一个在线的Solidity编译器。
 http://remix.ethereum.org

References

 Geth在以太坊智能合约开发中最常用的工具(必备开发工具),一个多用途的命令行工具。
 熟悉Geth可以让我们有更好的效率,大家可收藏起来作为Geth命令用法手册。 本文主要是对geth help的翻译,基于最新的geth 1.7.3-stable版本。
 区块链学堂(8):Geth 基本命令
  Ubuntu下geth搭建私有链+部署智能合约+与合约交互笔记
 ubuntu系统搭建以太坊私有链
 JavaScript Console
 http://8btc.com/thread-29538-1-1.html

See Also