Jangtoo avatar

POLIS masternode setting 방법 (Linux)

papaman

Published: 09 Jan 2018 › Updated: 09 Jan 2018POLIS masternode setting 방법 (Linux)

POLIS masternode setting 방법 (Linux)

POLIS masternode setting 방법 : Linux 편

지난번 POLIS masternode window setting
https://steemit.com/masternode/@papaman/polis-masternode-setting-window
에 이어서 Linux setting법입니다.

VPS 설정

linux 세팅에는 24시간 내내 켜져있고 고정 ip를 가진 피씨가 필요한데
일반 사람이 이런 피씨를 운영하긴 어려우니 vps를 이용합니다.
https://vultr.com
저는 이곳을 사용하는데 많은 분들이 여기를 사용하는 것 같습니다.
매월 5달러에 서버 하나를 운영 가능합니다.
여기서 JAPAN , Ubuntu 16.04 서버 를 사용합니다.
IPv6 선택해서 사용중입니다.

alt

여기서 본인의 IP를 확인할 수 있습니다.

Linux 설정

먼저 putty나 mobaterm같은 프로그램을 이용해서 위에서 얻은 서버 주소에 접속합니다.

id는 root 이고
비번은 passward ***** 눈깔표시 다음에 있는 버튼을 눌러서 복사하면 됩니다.

접속 후

 adduser masternode && adduser masternode sudo 
이 명령어를 입력합니다. 비번입력을 해야 합니다. 완료되면 masternode 라는 id를 가진 계정을 만들고 권한을 주게 된 것입니다.

이제 아래 명령어로 masternode로 로그인 해봅시다.

 su masternode 
비번 입력까지 하면 이제 아래 창이 masternode@vultre: 이런식으로 되어있을 것입니다.

아래 명령어로 홈디렉토리로 이동합니다.

 cd ~/ 

자 이제 아래 명령어를 한번에 복사해서 붙여넣기 합니다.
실행을 하다가 중간에 window wallet 설정 글에서 확인한 private keyvps ip를 입력하라고 나옵니다.
또 중간에 계속 물어보는 것에 yes를 입력합니다.
(제 기억엔 swap 설정도 있었는데 그것도 yes하고 아마 2G로 설정하면 될겁니다, 입력창 왼쪽에 기본 값이 다 나와요)

 wget https://raw.githubusercontent.com/digitalmine/Guide/master/install_masternode.sh && chmod +x install_masternode.sh && ./install_masternode.sh 

masternode의 비번을 입력하는 과정도 있을 것입니다.
모든 과정이 끝나면
alt

위 이미지와 같은 결과를 얻을 수 있습니다.

이제 아래 명령어를 입력하면 편집창이 뜹니다.

 sudo nano /etc/monit/monitrc 

그럼 쭉 끝까지 내려서 마지막에

### added on setup for polisd
set httpd port 2812
use address localhost # only accept connection from localhost 
allow localhost # allow localhost to connect to the server
###
### polisd process control
check process polisd with pidfile /home/masternode/.poliscore/polisd.pid
start program = "/home/masternode/polis_node.sh start" with timeout 60 seconds
stop program = "/home/masternode/polis_node.sh stop" 

이 내용을 붙여 넣습니다.
그리고는 저장하고 나갑니다.
(ctrl+o 누른다음에 엔터 치고 ctrl+x 누르면 됩니다)

아래 명령어를 차례대로 실행하면

 sudo monit reload 
  sudo monit start polisd 

끝입니다.

 sudo monit status 
이 명령어로 잘 돌아가는 지 확인이 가능합니다. running이라고 되어있으면 돌아가는 겁니다. 명령어 치고 시간이 약간 지나가 running을 확인 할 수 있습니다.
polis-cli getinfo  
이 명령어를 이용해 1편에서 말씀드린 block number를 체크합니다. https://explorer.polispay.org/ 이 사이트를 이용해서 가장 최근에 생성된 block 번호와

alt

그림에서 보이는 getinfo의 결과 block의 번호가 같은지 확인합니다.
window wallet과는 별개로 linux wallet의 block 번호는 아주 중요합니다.
이 번호가 안 맞는다는 건 마스터노드가 제대로 동작 안한다는 이야기이고 그럼 보상을 못받습니다.

확인해볼 것

Linux 서버 설정을 마치고 sentinel폴더 아래 sentinel.conf 파일을 열어서
세번 째 줄의 값이

 polis_conf=/home/masternode/.poliscore/polis.conf 
이렇게 설정이 되어있는지 확인하세요 값이 잘못되어있던 것으로 기억합니다.

Window wallet setting part 2

자 이제 마지막입니다.
window wallet 에
Tool -> Debug consol 로 들어가서

 masternode output  
을 입력하면
{
    "12345678xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx": "0"
} 
이런 메지시가 나올겁니다. 왼쪽에 긴 숫자가 **txid** 오른쪽에 0 아니면 1 값이 **vout**입니다.

C:\Users\AppData\Roaming\polisCore
들어가보면 masternode.conf가 존재합니다.
파일을 열어서 아래와 같이 적습니다.
순서는
마스터노드이름 IP:port privatekey txid vout
순서로 한칸씩 띄어서 적으면 됩니다.

mn1 1.2.3.4:24126 3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 12345678xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0 

자 이제 파일을 저장하고 닫으시고
윈도우 월렛을 시작하세요

그리고 masternode tap에 가보면
alt
자신의 마스터 노드를 확인할 수 있습니다.
아래 start all을 눌러서 마스터 노드를 시작하세요
보통은 Watchdog_expired가 뜨는데 시간이 좀 지나면 ENABLED로 변합니다.
그러면 이제 마스터 노드 보상을 받을 준비가 다 된것입니다.

https://masternodes.online/currencies/POLIS/
여기 들어가보면 평균 보상받는 시간이 나와있습니다.
보통 첫 보상은 이것보단 더 걸리는 거 같더라구요.

Leave POLIS masternode setting 방법 (Linux) to:

Written by

Read more #polis posts


Best Posts From Jangtoo

We have not curated any of papaman's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Jangtoo