자세한 내용은 xmr-stak git 참고 : https://github.com/fireice-uk/xmr-stak

1. 우선 필수 패키지를 설치
root@test-203:~# sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev git

2. 만약 CPU 채굴을 한다면 sysctl로 설정값을 변경하고 /etc/sysctl.conf에 아래 라인 추가
root@test-204:~# sysctl -w vm.nr_hugepages=128
root@test-204:~# vi /etc/sysctl.conf
vm.nr_hugepages = 128

3. Git으로 xmr-stak 패키지 clone
root@test-203:~# git clone https://github.com/fireice-uk/xmr-stak.git
Cloning into 'xmr-stak'…
remote: Enumerating objects: 131, done.
remote: Counting objects: 100% (131/131), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 7478 (delta 74), reused 120 (delta 72), pack-reused 7347
Receiving objects: 100% (7478/7478), 2.41 MiB | 34.00 KiB/s, done.
Resolving deltas: 100% (5395/5395), done.
Checking connectivity... done.

4. 개발자 수수료 0으로 변경
root@test-203:~# vi ~/xmr-stak/xmrstak/donate-level.hpp
# 뒤의 값을 0.0으로 변경
constexpr double fDevDonationLevel = 0.0; 

5. make 
root@test-203:~# cd ~/xmr-stak
root@test-203:~/xmr-stak# mkdir build
root@test-203:~/xmr-stak# cd build
# Nvidia 그래픽 카드로 채굴 시 -DCUDA_ENABLE=ON으로, AMD 그래픽 카드로 채굴 시 -DOpenCL_ENABLE=ON
# CPU 채굴 안할 경우 -DHWLOC_ENABLE=OFF 추가 Default는 ON
# 아래 예제는 CPU로만 채굴 시
root@test-203:~/xmr-stak/build# cmake -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: /root/xmr-stak/build

6. compile
root@test-203:~/xmr-stak/build# make install
Scanning dependencies of target xmr-stak-asm
[  3%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cryptonight_v8_main_loop.S.o
[  6%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cnR/CryptonightR_template.S.o
[  9%] Linking C static library bin/libxmr-stak-asm.a
[  9%] Built target xmr-stak-asm
Scanning dependencies of target xmr-stak-c
[ 12%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[ 15%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 18%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o
[ 21%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 24%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[ 27%] Linking C static library bin/libxmr-stak-c.a
[ 27%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 30%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 33%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 36%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 39%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o
[ 45%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 48%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 51%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 54%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_ssse3.cpp.o
[ 60%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_avx.cpp.o
[ 63%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 66%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 69%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 72%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 75%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 78%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 81%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 84%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/uac.cpp.o
[ 87%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 90%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 93%] Linking CXX static library bin/libxmr-stak-backend.a
[ 93%] Built target xmr-stak-backend
Scanning dependencies of target xmr-stak
[ 96%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o
[100%] Linking CXX executable bin/xmr-stak
[100%] Built target xmr-stak
Install the project...
-- Install configuration: "Release"
xmr-stak installed to folder 'bin'

7. complie된 xmr-stak을 수행해서 config 설정
root@test-203:~/xmr-stak/build# cd bin/
root@test-203:~/xmr-stak/build/bin# ./xmr-stak

Please enter:
- Do you want to use the HTTP interface?
Unlike the screen display, browser interface is not affected by the GPU lag.
If you don't want to use it, please enter 0, otherwise enter port number that the miner should listen on
# 원하는 포트를 넣으면 해당 포트로 채굴 모니터링이 가능하다. 0이면 모니터링 안함
0
Configuration stored in file 'config.txt'
Please enter:
- Please enter the currency that you want to mine:
    - aeon7
    - bbscoin
    - bittube
    - cryptonight
    - cryptonight_bittube2
    - cryptonight_masari
    - cryptonight_haven
    - cryptonight_heavy
    - cryptonight_lite
    - cryptonight_lite_v7
    - cryptonight_lite_v7_xor
    - cryptonight_r
    - cryptonight_superfast
    - cryptonight_turtle
    - cryptonight_v7
    - cryptonight_v8
    - cryptonight_v8_double
    - cryptonight_v8_half
    - cryptonight_v8_reversewaltz
    - cryptonight_v8_zelerius
    - cryptonight_v7_stellite
    - cryptonight_gpu
    - cryptonight_conceal
    - freehaven
    - graft
    - haven
    - lethean
    - masari
    - monero
    - qrl
    - ryo
    - stellite
    - turtlecoin
    - plenteum
    - zelerius
    - xcash

monero
- Pool address: e.g. pool.usxmrpool.com:3333
xmr-asia1.nanopool.org:14444
- Username (wallet address or pool login): # 채굴 Pool의 Username이나 xmr 지갑 주소를 넣으면 됨

- Password (mostly empty or x):
x
- Rig identifier for pool-side statistics (needs pool support). Can be empty:

- Does this pool port support TLS/SSL? Use no if unknown. (y/N)
N
- Do you want to use nicehash on this pool? (y/n)
n
- Do you want to use multiple pools? (y/n)
n
Pool configuration stored in file 'pools.txt'


'채굴' 카테고리의 다른 글

[채굴] Monero xmr-Stak CentOS 7 설치 방법  (0) 2019.01.03
xmr-Stak 이 버전 업 되면서 devtoolset 7 환경에서 컴파일이 된다.
아래와 같이 명령어 수행하면 컴파일 가능
sudo yum install centos-release-scl epel-release
sudo yum install cmake3 devtoolset-7-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make git
sudo scl enable devtoolset-7 bash
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
cmake3 -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF ..
make install


'채굴' 카테고리의 다른 글

[채굴] 모네로 (Monero) xmr-Stak Ubuntu 16.04 설치 방법  (0) 2019.03.12

+ Recent posts