install snapd
- ubuntu is pre-installed on 16.04.4 LTS (Xenial Xerus) or later.
$ snap version
snap 2.36.1
snapd 2.36.1
series 16
ubuntu 18.04
kernel 4.15.0-39-generic
$ sudo yum install epel-release
$ sudo yum install snapd
$ sudo systemctl enable --now snapd.socket
$ sudo ln -s /var/lib/snapd/snap /snap
Either logout and back in again, or restart your system, to ensure snap’s paths are updated correctly.
- install for the first time
$ sudo snap install loopchain
$ loopchain --help
- upgrade to new revision
$ sudo snap refresh loopchain
For the reliable installation, please visit: Downloading and Installing RabbitMQ
When you want to store data in an external storage, you can use /media
or /mnt
.
- First, you have to mount external storage to
/media
or/mnt
using fstab or manually. - Second, create directory for store your data. For example
/media/data
. If you run with normal user, you must change owner and group of/media/data
.
$ sudo mkdir /media/data
$ sudo chown userid.userid /media/data
- Third, mount your storage data directory to your home data directory.
$ sudo mount -obind /media/data $HOME/data
- see next section or copy configure files manually
$ cp -a /snap/loopchain/[rev]/conf /snap/loopchain/[rev]/scripts/* $HOME/data
skip Copy default configure files section. And you have to run loopchain in $HOME/data
- When loopchain is installed for the first time,
loopchain.init
should be executed.
$ loopchain.init [TARGET_DIR]
If not specified
TARGET_DIR
, defaultTARGET_DIR
is$HOME/snap/loopchain/common
- When upgrading to a new revision, make sure that
$HOME/snap/loopchain/current
points to upgraded revision. Otherwise,loopchain
orloopchain.init
command should be executed to update link.
$ sudo snap refresh loopchain
$ loopchain
If you have key(der or pem), see key convert
$ pip3 install tbears
$ cd $HOME/snap/loopchain/common
$ mkdir keys
$ tbears keystore keys/my_private.json
- sample configurations and documents
installed loopchain location : /snap/loopchain/current/
guides : /snap/loopchain/current/docs/
configurations : /snap/loopchain/current/conf/
scripts : /snap/loopchain/current/scripts/
In the
conf/citizen_{testnet or mainnet}.json
configuration file, change the following configuration value.
{
"PRIVATE_PASSWORD": "password", <==== NEED TO CHANGE
...
}
$ ./run_citizen_testnet.sh
$ ./run_citizen_mainnet.sh
$ ./stop_all.sh
$ rm -rf log
$ rm -rf .storage*
Convert der, pem to json keystore file. After convert key to json, you need to update the conf.
$ loopchain -o conf/citizen_mainnet.conf -k