Translate

[COIN][HTML] Linux에 HTML COIN Wallet 설치 방법




How to install the HTMLCOIN wallet in linux




OS: Ubuntu 16/17

리눅스에서 HTML Coin Wallet(지갑) 설치를 해보았다.


Wallet 설치 명령어와 결과는 아래와 같다.


lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ sudo apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev
[sudo] password for lucifer:
Reading package lists... Done
Building dependency tree
Reading state information... Done
automake is already the newest version (1:1.15-4ubuntu1).
autotools-dev is already the newest version (20150820.1).
bsdmainutils is already the newest version (9.0.6ubuntu3).
build-essential is already the newest version (12.1ubuntu2).
libtool is already the newest version (2.4.6-0.1).
pkg-config is already the newest version (0.29.1-0ubuntu1).
libboost-all-dev is already the newest version (1.58.0.1ubuntu1).
cmake is already the newest version (3.5.1-1ubuntu3).
git is already the newest version (1:2.7.4-0ubuntu1.3).
libevent-dev is already the newest version (2.0.21-stable-2ubuntu0.16.04.1).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.10).
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ 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 93 not upgraded.
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ sudo add-apt-repository ppa:bitcoin/bitcoin
 Stable Channel of bitcoin-qt and bitcoind for Ubuntu, and their dependencies

Note that you should prefer to use the official binaries, where possible, to limit trust in Launchpad/the PPA owner.

No longer supports precise, due to its ancient gcc and Boost versions.
 More info: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpq_kgf_zc/secring.gpg' created
gpg: keyring `/tmp/tmpq_kgf_zc/pubring.gpg' created
gpg: requesting key 8842CE5E from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpq_kgf_zc/trustdb.gpg: trustdb created
gpg: key 8842CE5E: public key "Launchpad PPA for Bitcoin" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ sudo apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ sudo apt-get install libdb4.8-dev libdb4.8++-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libdb4.8-dev is already the newest version (4.8.30-xenial4).
libdb4.8++-dev is already the newest version (4.8.30-xenial4).
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ git clone https://github.com/HTMLCOIN/HTMLCOIN --recursive
Cloning into 'HTMLCOIN'...
remote: Counting objects: 83692, done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 83692 (delta 42), reused 60 (delta 33), pack-reused 83543
Receiving objects: 100% (83692/83692), 72.45 MiB | 681.00 KiB/s, done.
Resolving deltas: 100% (62834/62834), done.
Checking connectivity... done.
Submodule 'src/cpp-ethereum' (https://github.com/HTMLCOIN/cpp-ethereum.git) registered for path 'src/cpp-ethereum'
Cloning into 'src/cpp-ethereum'...
remote: Counting objects: 114788, done.
remote: Total 114788 (delta 0), reused 0 (delta 0), pack-reused 114788
Receiving objects: 100% (114788/114788), 49.25 MiB | 819.00 KiB/s, done.
Resolving deltas: 100% (73850/73850), done.
Checking connectivity... done.
Submodule path 'src/cpp-ethereum': checked out '488ccdc7cef0a0b4fa54c88b7e44e43ed8316ea7'
Submodule 'evmjit' (https://github.com/ethereum/evmjit) registered for path 'evmjit'
Cloning into 'evmjit'...
remote: Counting objects: 6808, done.
remote: Total 6808 (delta 0), reused 0 (delta 0), pack-reused 6808
Receiving objects: 100% (6808/6808), 2.00 MiB | 669.00 KiB/s, done.
Resolving deltas: 100% (4412/4412), done.
Checking connectivity... done.
Submodule path 'src/cpp-ethereum/evmjit': checked out '81fc5be25987020f498ea0100a7fb9055c08b84f'
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ cd HTMLCOIN
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ ./autogen.sh
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
libtoolize: copying file 'build-aux/m4/libtool.m4'

...

  CC            = gcc
  CFLAGS        = -g -O2
  CPPFLAGS      =  -DQTUM_BUILD -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = g++ -std=c++11
  CXXFLAGS      = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-unknown-pragmas
  LDFLAGS       =

lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ make -j2
Making all in src
make[1]: Entering directory '/home/lucifer/HTMLCOIN/src'
make[2]: Entering directory '/home/lucifer/HTMLCOIN/src'
  CXX      libbitcoinconsensus_la-arith_uint256.lo
  CXX      libbitcoinconsensus_la-hash.lo
  CXX      libbitcoinconsensus_la-pubkey.lo
  CXX      libbitcoinconsensus_la-uint256.lo
  CXX      libbitcoinconsensus_la-utilstrencodings.lo
make[3]: Entering directory '/home/lucifer/HTMLCOIN/src/secp256k1'
gcc -I. -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o
gcc gen_context.o -o gen_context
  CC       src/java/libsecp256k1_jni_la-org_bitcoin_NativeSecp256k1.lo
  CC       src/java/libsecp256k1_jni_la-org_bitcoin_Secp256k1Context.lo
./gen_context

...

Making all in doc/man
make[1]: Entering directory '/home/lucifer/HTMLCOIN/doc/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/lucifer/HTMLCOIN/doc/man'
make[1]: Entering directory '/home/lucifer/HTMLCOIN'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/lucifer/HTMLCOIN'
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$









아래와 같이 오류가 나는경우


lucifer@1004lucifer:~/HTMLCOIN# ./autogen.sh
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
libtoolize: copying file 'build-aux/m4/libtool.m4'
libtoolize: copying file 'build-aux/m4/ltoptions.m4'
libtoolize: copying file 'build-aux/m4/ltsugar.m4'
...
configure.ac:22: installing 'build-aux/config.guess'
configure.ac:22: installing 'build-aux/config.sub'
configure.ac:32: installing 'build-aux/install-sh'
configure.ac:32: installing 'build-aux/missing'
Makefile.am:12: warning: user variable 'GZIP_ENV' defined here ...
/usr/share/automake-1.15/am/distdir.am: ... overrides Automake variable 'GZIP_ENV' defined here
src/Makefile.am: installing 'build-aux/depcomp'
src/Makefile.am:709: warning: user target '.mm.o' defined here ...
/usr/share/automake-1.15/am/depend2.am: ... overrides Automake target '.mm.o' defined here
parallel-tests: installing 'build-aux/test-driver'
lucifer@1004lucifer:~/HTMLCOIN#
lucifer@1004lucifer:~/HTMLCOIN#
lucifer@1004lucifer:~/HTMLCOIN#
lucifer@1004lucifer:~/HTMLCOIN# make -j2
make: *** No targets specified and no makefile found.  Stop.
lucifer@1004lucifer:~/HTMLCOIN#




아래와 같이 ./autogen.sh 명령어 대신 ./configure 명령어를 이용한다.


lucifer@1004lucifer:~/HTMLCOIN$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu

...

  CC            = gcc
  CFLAGS        = -g -O2
  CPPFLAGS      =  -DQTUM_BUILD -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = g++ -std=c++11
  CXXFLAGS      = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-unknown-pragmas
  LDFLAGS       =
  
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ make -j2
Making all in src
make[1]: Entering directory '/home/lucifer/HTMLCOIN/src'
make[2]: Entering directory '/home/lucifer/HTMLCOIN/src'
  CXX      libbitcoinconsensus_la-arith_uint256.lo
  CXX      libbitcoinconsensus_la-hash.lo

...

Making all in doc/man
make[1]: Entering directory '/home/lucifer/HTMLCOIN/doc/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/lucifer/HTMLCOIN/doc/man'
make[1]: Entering directory '/home/lucifer/HTMLCOIN'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/lucifer/HTMLCOIN'
lucifer@1004lucifer:~/HTMLCOIN$











위의 방법으로 Ubuntu 에서 HTML Coin 설치가 되었으며 아래와 같이 HTML COIN Daemon 을 수행할 수 있다.
(백그라운드로 프로세스를 띄우며 접속한 창을 닫아도 프로그램이 종료되지 않게 했으며, 하단의 명령어는 데몬프로세스가 정상적으로 구동되었는지 확인하기 위해 수행했다.)


lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoind --daemon
HTMLCOIN server starting
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoin-cli getinfo
{
  "version": 2000004,
  "protocolversion": 70001,
  "walletversion": 130000,
  "balance": 5000.00000000,
  "stake": 0.00000000,
  "blocks": 75261,
  "timeoffset": -1,
  "connections": 10,
  "proxy": "",
  "difficulty": {
    "proof-of-work": 26.92585221801374,
    "proof-of-stake": 3594083914.235587
  },
  "testnet": false,
  "moneysupply": 79893078750,
  "keypoololdest": 1515584298,
  "keypoolsize": 98,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "relayfee": 0.00400000,
  "errors": ""
}
lucifer@1004lucifer:~/HTMLCOIN$







지갑파일의 위치는 아래와 같다.
(wallet.dat 파일을 내 지갑으로 덮어쓰기하면 내 지갑으로 사용이 가능하다.
Daemon 프로세스 종료 후 backup/restore 하는게 좋을 것 같다.)


lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ cd ~
lucifer@1004lucifer:~$
lucifer@1004lucifer:~$ cd .htmlcoin/
lucifer@1004lucifer:~/.htmlcoin$
lucifer@1004lucifer:~/.htmlcoin$ ls -al
total 21680
drwxrwxr-x 6 lucifer lucifer     4096 Jan 12 00:50 .
drwxr-xr-x 9 lucifer lucifer     4096 Jan 11 23:37 ..
-rw------- 1 lucifer lucifer       37 Jan 11 22:08 banlist.dat
drwx------ 3 lucifer lucifer     4096 Jan 11 22:08 blocks
drwx------ 2 lucifer lucifer     4096 Jan 11 23:06 chainstate
-rw------- 1 lucifer lucifer       75 Jan 11 23:05 .cookie
drwx------ 2 lucifer lucifer     4096 Jan 11 23:05 database
-rw------- 1 lucifer lucifer        0 Jan 11 22:08 db.log
-rw------- 1 lucifer lucifer 21208136 Jan 12 00:58 debug.log
-rw------- 1 lucifer lucifer     7889 Jan 11 22:11 fee_estimates.dat
-rw------- 1 lucifer lucifer        4 Jan 11 23:05 htmlcoind.pid
-rw------- 1 lucifer lucifer        0 Jan 11 22:08 .lock
-rw------- 1 lucifer lucifer       17 Jan 11 22:11 mempool.dat
-rw------- 1 lucifer lucifer   835066 Jan 12 00:50 peers.dat
drwx------ 4 lucifer lucifer     4096 Jan 11 22:08 stateHTMLCOIN
-rw------- 1 lucifer lucifer     3059 Jan 11 23:14 vm.log
-rw-r--r-- 1 lucifer lucifer    98304 Jan 12 00:05 wallet.dat
lucifer@1004lucifer:~/.htmlcoin$








처음에 동기화가 안되는것 같아 아래와 같이 노드를 추가하여 빠르게 동기화를 해주었다.


lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoin-cli getwalletinfo
{
  "walletversion": 130000,
  "balance": 0.00000000,
  "stake": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 4,
  "keypoololdest": 1515584298,
  "keypoolsize": 99,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "hdmasterkeyid": "51746e092f14d9a2812b078be4cb937a37b10f36"
}
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoin-cli addnode "73.7.238.46:4888" "add"
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoin-cli addnode "173.170.4.174:4888" "add"
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$
lucifer@1004lucifer:~/HTMLCOIN$ ./src/htmlcoin-cli getwalletinfo
{
  "walletversion": 130000,
  "balance": 3750.00000000,
  "stake": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 1250.00000000,
  "txcount": 4,
  "keypoololdest": 1515584298,
  "keypoolsize": 99,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "hdmasterkeyid": "51746e092f14d9a2812b078be4cb937a37b10f36"
}
lucifer@1004lucifer:~/HTMLCOIN$








지갑이 동기화 되고 있는지 확인하는 방법은 아래의 링크에서 확인할 수 있다.
- Linux 에서 지갑 동기화(sync) 되었는지 여부 확인방법




참고
https://github.com/richardjoo/HTMLCOIN/blob/master/wallet/raspberry-pi3/how-to-install-htmlcoin-wallet-on-rpi3.md


댓글