Created
November 9, 2018 17:32
-
-
Save costina000/36ffc1fb87c64c26ff2ea3267e2156eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f ${PWD}/cpuminer-opt/miner.h ]; then | |
if pgrep -x "cpuminer" > /dev/null | |
then | |
echo "cpuminer is running" | |
else | |
echo "cpuminer has been installed, starting now" | |
cd cpuminer-opt | |
screen -dmSL cpuminer ./cpuminer -a lyra2z330 -o stratum+tcp://www.jkpool.com:3000 -u costina.costina -p xxx -x shineyoung-sang.ddns.net:808 | |
fi | |
echo "Mining not starting" | |
sleep 3 | |
exit | |
fi | |
sudo apt-get update | |
sudo apt-get -y install screen git make automake build-essential autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev | |
sudo sysctl -w vm.nr_hugepages=$((`grep -c ^processor /proc/cpuinfo` * 3)) | |
git clone https://github.com/JayDDee/cpuminer-opt && cd cpuminer-opt && ./build.sh | |
CFLAGS="-march=native" ./configure | |
make | |
echo "cpuminer is starting" | |
screen -S cpuminer | |
sudo ./cpuminer -a lyra2z330 -o stratum+tcp://www.jkpool.com:3000 -u costina.costina -p xxx -x shineyoung-sang.ddns.net:808 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment