-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
30 lines (25 loc) · 824 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
########################################################
#
# Monero CPU Miner Installer script
#
########################################################
WALLET_ADDRESS=42WaLsGbVXA4xRtDw7JgZXPCQgB7ZqzPWUDHY3TiP6TM6vyWV1iMx3hdUo5CmR2eCqRh6MkHj7viJb2vJdsfY5rgCnmAfsP
CPU=$(cat /proc/cpuinfo | grep processor | wc -l)
[[ $CPU > 3 ]] && CPU=$(( CPU - 2 )) || CPU=1
################
# INSTALL
sudo apt-get install git libcurl4-openssl-dev build-essential libjansson-dev autotools-dev automake
git clone https://github.com/hyc/cpuminer-multi
cd cpuminer-multi
./autogen.sh
CFLAGS="-march=native" ./configure
make
PRGDIR=$(pwd)
##############
# RUN-SCRIPT
cat > ~/mine.sh << EOF
#!/bin/bash
cd $PRGDIR
sudo ./minerd -a cryptonight -o stratum+tcp://pool.minexmr.com:4444 -u $WALLET_ADDRESS -p x -t $CPU
EOF
chmod +x ~/mine.sh