没事儿干刚好体验一下。

环境:

# sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial




1、新安装系统,安装依赖包:

sudo apt-get install automake gcc git libssl-dev libcurl4-openssl-dev make

2、安装 Jansson (Jansson is a C library for encoding, decoding and manipulating JSON data.)

cd ~
wget http://www.digip.org/jansson/releases/jansson-2.10.tar.gz
tar zxvf jansson-2.10.tar.gz
cd jansson-2.10/
./configure # make
make check
sudo make install
sudo ln -s /usr/local/lib/libjansson.so.4 /usr/lib/libjansson.so.4
sudo ldconfig

3、安装 CPUMiner

cd ~ 
git clone https://github.com/LucasJones/cpuminer-multi 
cd cpuminer-multi/ 
./autogen.sh 
./configure CFLAGS="-march=native" 
make 
sudo make install 

4、查看 CPUMiner 是否安装成功

minerd -V  # minerd -a cryptonight -o stratum+tcp://POOL_ADDRESS:PORT -u YOUR_WALLET_ADDRESS -p x //开始挖矿