1. Checking OS
Currently, OS supports Ubuntu 18.04, CentOS 7.
Copy ~ # cat /etc/os-release
NAME = "Ubuntu"
VERSION = "18.04.4 LTS (Bionic Beaver)"
~ # apt-get update && \
apt-get -y install sudo
~ # sudo apt update
~ # sudo apt upgrade
~ # sudo apt install jq curl wget vim tar openssh-server net-tools -y
# if it already installed it automatically skips
2. Checking HOME folder
Copy ~ # export | grep HOME
declare -x HOME = "/home/omnione" | declare -x HOME = "/root"
# in case, HOME="/root"
~ # usermod -d /home/omnione < UserName >
3. Install Java and check
Copy ~ # sudo apt install openjdk-8-jdk
~ # java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)( build 1.8.0_232-b09 )
OpenJDK 64-Bit Server VM (AdoptOpenJDK)( build 25.232-b09, mixed mode )
4. Install eosio/eosio.cdt
Copy ~ # mkdir install
~ # cd install
# eosio
~ /install# git clone --recursive [source URL]
Check installation
Copy ~ /install# nodeos -v
v2.0.5
~ /install# keosd -v
v2.0.5
~ /install# cleos version client
v2.0.5
~ /install# whereis nodeos
nodeos: /usr/bin/nodeos
~ /install# ls -al /usr/bin/nodeos
lrwxrwxrwx 1 root root 29 Apr 21 18:08 /usr/bin/nodeos - > ../opt/eosio/2.0.5/bin/nodeos
5. Install Contract
Copy ~ # cd ~
~ # git clone --recursive [source URL]
~ # cd ./eosio.contract/
~ eosio.contracts# ./build.sh
~ eosio.contracts# cd ./build/contracts/
~ eosio.contracts/build/contracts# pwd
/home/omnione/eosio.contracts/build/contracts
Addresses from pwd command are used to deploy the contact in the next step.
6. create Wallet and executing Wallet(keosd)
Wallet create
Copy # cleos wallet create --to-console
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5Kewn9L76X8Fpd....................t42S9XCw2"
Save the Wallet's password separately -> "PW5Kewn9L76X8Fpd....................t42S9XCw2"
Check Wallet open and List
Copy # wallet open
~ # cleos wallet open
# wallet list
~ # cleos wallet list
Wallets:
[
"default"
]
Check Wallet folder
Copy # wallet 폴더 확인
~ # ls -al $HOME/eosio-wallet
total 16
drwxr-xr-x 2 root root 4096 Jul 13 06:10 .
drwx------ 1 root root 4096 Jul 13 06:10 ..
-rw-r--r-- 1 root root 2900 Jul 10 05:42 config.ini
-rw------- 1 root root 439 Jul 10 05:45 default.wallet
Execute keosd
Copy ~ # pkill keosd # 실행중인 keosd 중지 후 실행
~ # keosd wallet open
~ # cleos wallet unlock --password PW123...XYZ
Check Wallet
Copy # wallet open 확인 (default, 별(*) 표시가 있어야 합니다.)
~ # cleos wallet list
Wallets:
[
"default *"
]
7. import Private Key to the executed Wallet
-> Script file / command (TBD)
Copy ~ # cleos wallet import --private-key privateKey1Ddhs..................AM6KU2rdWSkA
imported private key for: EOS7WD2KwZLof..................KUzJyePLFqGNknytq
~ # cleos wallet import --private-key privateKey2FdSF..................df6KU2reTXas
imported private key for: EOS5jtZK8qVAC..................kv1pTmyaoe24McGMv
Key check
Copy ~ # cleos wallet private_keys --password PW5Jw8uKkk..........Ty97VN7oDHsrg
[
[
"EOS7WD2KwZLof..................KUzJyePLFqGNknytq" ,
"privateKey1Ddhs..................AM6KU2rdWSkA"
],[
"EOS5jtZK8qVAC..................kv1pTmyaoe24McGMv" ,
"privateKey2FdSF..................df6KU2reTXas"
]
]