📜 ⬆️ ⬇️

Installing Emercoin blockchain with a web wallet on RedHat / CentOS 7 and Ubuntu 16.04

One of the modern technical mainstream is blockchain. In this article I will tell you how you can quickly deploy Emercoin blockchain on RedHat / CentOS 7 and Ubuntu 16.04 LTS.

1. Introduction


In this material we will proceed from the following:

2. Installing Emercoin packages


To begin, we need to connect the official Emercoin repository for use by your server, download and install the required packages, start the blockchain client and mark it for execution during the OS boot. For this, you need to run:

In RHEL / CentOS:
rpm -ivh http://download.emercoin.com/rhel/el7/RPMS/emercoin-release-1.0-1.el7.centos.noarch.rpm yum -y install emercoin emcssh emcweb systemctl restart emercoind httpd systemctl enable emercoind httpd 

In Ubuntu:
 apt-key adv --keyserver keyserver.ubuntu.com --recv B58C58F4 add-apt-repository 'deb [arch=amd64] http://download.emercoin.com/ubuntu xenial emercoin' apt update && apt install emercoin emcssh emcweb 

3. Download and manage blockchain


Immediately after the first launch of emercoind, the blockchain will begin downloading. This may take some time.
To view the current state of the blockchain, run the command:

 emc getinfo 

I draw your attention to the fact that the emc command can be executed by any user of the system who has the right to execute commands through sudo. Also, I want to note that the emercoind service may take up to 30 seconds to start. Accordingly, if you hurry to execute the emc command before emercoind is fully started, then you may have an error connecting to the service.
')
The result of the emc getinfo execution is the output of something like this:
 {
     "version": "v0.3.7.0-unk-beta",
     "protocolversion": 60005,
     "walletversion": 60000,
     "balance": 0.00000000
     "newmint": 0.00000000
     "stake": 0.00000000
     "blocks": 6532,
     "moneysupply": 26500634.19000000,
     "connections": 7,
     "proxy": "",
     "ip": "162.243.248.174",
     "difficulty": 66.44524799,
     "testnet": false,
     "keypoololdest": 1466865671,
     "keypoolsize": 101,
     paytxfee: 0.01000000
     "errors": "WARNING: Checkpoint is too old.
 }

Here you need to look at the “errors” line, which may indicate that, at the moment, the blockchain is too old (that is, not fully downloaded), but also at the “blocks” line, which indicates how many blocks have already been downloaded. your blockchain. At the time of this writing, the Emercoin blockchain numbered 173,444 blocks.

To manage the blockchain and your wallet through the console, you can use the help on the options of the emc command:
 emc help 

4. Web Wallet


In order to use a web wallet, you must have either an account created for it (login + password) or a personal SSL certificate. I will tell you how to use a personal SSL certificate another time. Now, we can create a web wallet user with the command:
 emcweb-user "UserName" "UserPassword" 

where, UserName and UserPassword are, of course, your login and password.

A web wallet can have only one account. Therefore, if you rerun the emcweb-user command, you will replace the previous user with a new one.

The next step we can in the browser go to the IP address of your server.
The browser will warn you that the site is not safe. This is normal and completely safe, because the web server certificate was automatically generated on your server when the emcweb package was installed. Therefore, such a warning browser should be ignored and continue to visit this resource (perhaps by adding this site to the exceptions, as required by Firefox, for example).



Select “Login via Login / Password” and enter the password with the password that you specified during the execution of the emcweb-user command:


We fall into the web wallet:


The web wallet interface is fairly simple and intuitive. For example, a section with information where you can see similar data obtained by running the emc getinfo command :


Known error: if the blockchain is not yet fully downloaded and you try to enter the "Manage Names" section, then there will be an error.

Successful use!

Source: https://habr.com/ru/post/304100/


All Articles