LoginSignup
4
3

More than 5 years have passed since last update.

cpuminerを使ってUbuntuでKotoのマイニングをする

Last updated at Posted at 2018-01-14

環境

- Ubuntu 16.04 x64

前提

  • KotoのWallet及びKotoのアドレスを持っていること
  • (ソロマイニングではなく)mining poolを利用してマイングをする

Kotoのアドレスはkから始まる文字列:例)k1DHvfdwzJ1rCXTEbhg3PxFAVaR5TRMiw84

cpuminer導入手順

aptを更新する。

# sudo apt-update
# sudo apt-upgrade

gitをインストールする。

# sudo apt-get install git

cpuminerのレポジトリをcloneする。

# sudo git clone https://github.com/noncepool/cpuminer-yescrypt

cpuminerのディレクトリに移動する。

# cd cpuminer-yescrypt

cpuminerをビルドする。

# sudo apt-get install build-essential libcurl4-openssl-dev gcc-mingw-w64 automake gcc make
# sudo ./autogen.sh
# sudo ./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
# sudo make

cpuminer実行手順

# nohup ./minerd -a yescrypt -o stratum+tcp://jp.kotopool.work:3333 -u k1DHvfdwzJ1rCXTEbhg3PxFAVaR5TRMiw84 -p password &

- アドレスは自分のものに置き換える。
- この例ではマイニングプールにkotopoolを利用している。

実行結果はnohup.outに書き込まれる。マイニングが成功すると(yay!!!)が返される。

# tail -f nohup.out 
[2018-01-14 03:43:18] 1 miner threads started, using 'yescrypt' algorithm.
[2018-01-14 03:43:18] Starting Stratum on stratum+tcp://jp.kotopool.work:3333
[2018-01-14 03:43:19] Stratum requested work restart
[2018-01-14 03:43:26] Stratum requested work restart
[2018-01-14 03:43:26] thread 0: 3704 hashes, 0.53 khash/s
[2018-01-14 03:43:28] Stratum requested work restart
[2018-01-14 03:43:28] thread 0: 1085 hashes, 0.54 khash/s
[2018-01-14 03:43:29] thread 0: 236 hashes, 0.59 khash/s
[2018-01-14 03:43:29] accepted: 1/1 (100.00%), 0.59 khash/s (yay!!!)
[2018-01-14 03:44:33] thread 0: 35556 hashes, 0.55 khash/s
[2018-01-14 03:44:33] accepted: 2/2 (100.00%), 0.55 khash/s (yay!!!)

この記事の手順は、Vultrに構築した下記イメージ上で確認している。
- Ubuntu 16.04 x64
- 25 GB SSD
- 1CPU
- 1024MB Memory
なお、2018年1月現在、この環境では0.45〜0.6khash/s程度出ている。
※ VPSを利用する場合、他の利用者に迷惑がかからないよう、cpulimitなどのツールを利用することで、CPU使用率を抑えるようにすることに留意する。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3