Skip to content

Instantly share code, notes, and snippets.

@underdarkskies
Last active August 14, 2018 18:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save underdarkskies/6b918323e20584d60b37a03abcfa9e3d to your computer and use it in GitHub Desktop.
Save underdarkskies/6b918323e20584d60b37a03abcfa9e3d to your computer and use it in GitHub Desktop.
Multi-coin miner for Ubuntu 16.04
###From an Ubuntu 16.04 Instance with 20GB of HD space
###Update Ubuntu
sudo apt-get update
sudo apt-get -y upgrade
###Download Nvidia Software
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
mv cuda_8.0.61_375.26_linux-run cuda_8.0.61_375.26_linux.run
chmod +x cuda_8.0.61_375.26_linux.run
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda_8.0.61.2_linux-run
mv cuda_8.0.61.2_linux-run cuda_8.0.61.2_linux.run
chmod +x cuda_8.0.61.2_linux.run
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux
mv cuda_9.1.85_387.26_linux cuda_9.1.85_387.26_linux.run
chmod +x cuda_9.1.85_387.26_linux.run
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/1/cuda_9.1.85.1_linux
mv cuda_9.1.85.1_linux cuda_9.1.85.1_linux.run
chmod +x cuda_9.1.85.1_linux.run
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/2/cuda_9.1.85.2_linux
mv cuda_9.1.85.2_linux cuda_9.1.85.2_linux.run
chmod +x cuda_9.1.85.2_linux.run
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/3/cuda_9.1.85.3_linux
mv cuda_9.1.85.3_linux cuda_9.1.85.3_linux.run
chmod +x cuda_9.1.85.3_linux.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
wget http://us.download.nvidia.com/tesla/390.46/NVIDIA-Linux-x86_64-390.46.run
chmod +x NVIDIA-Linux-x86_64-390.46.run
@-OR-@
http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###Install prerequisites
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install python-dev freeglut3-dev libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev gcc make libcurl4-openssl-dev autoconf git screen libncurses5-dev opencl-headers build-essential protobuf-compiler libprotoc-dev libboost-all-dev libleveldb-dev hdf5-tools libhdf5-serial-dev libopencv-core-dev libopencv-highgui-dev libsnappy-dev libsnappy1v5 libatlas-base-dev cmake libstdc++6-4.9-dbg libgoogle-glog0v5 libgoogle-glog-dev libgflags-dev liblmdb-dev python-pip gfortran libjansson-dev uthash-dev autogen libtool pkg-config gcc-multilib dkms libxml2-dev libxslt1-dev zlib1g-dev linux-image-extra-virtual libopencv-dev python-numpy libssl-dev automake autotools-dev
sudo apt-get -y autoremove
###disable Ubuntu Graphics
sudo touch /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "blacklist lbm-nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "alias nouveau off" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo echo "alias lbm-nouveau off" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo touch /etc/modprobe.d/nouveau-kms.conf
sudo echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
sudo update-initramfs -u
###Reboot the Instance
sudo reboot
####Login again
sudo apt-get install linux-headers-`uname -r`
###Do not select the option to install the outdated driver included in the following cuda package, Do not select option to install samples
sudo ./cuda_9.1.85_387.26_linux.run
###Update Cuda
sudo ./cuda_9.1.85.1_linux.run
sudo ./cuda_9.1.85.2_linux.run
sudo ./cuda_9.1.85.3_linux.run
###Do not select the option to install the outdated driver included in the following cuda package, Do not select option to install samples
sudo ./cuda_8.0.61_375.26_linux.run
###Update Cuda
sudo ./cuda_8.0.61.2_linux.run
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###Install Nvidia V100 drivers
sudo ./NVIDIA-Linux-x86_64-390.46.run
@-OR-@
###Follow the instructions at this URL
http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
###setup paths and final dependencies
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
sudo ln -s /usr/local/cuda-9.1/lib64/libcudart.so /usr/lib/libcudart.so
sudo ln -s /usr/local/cuda-8.0/lib64/libcudart.so.8.0 /usr/lib/libcudart.so.8.0
sudo ln -s /usr/local/cuda-9.1/lib64/libcudart.so.9.1 /usr/lib/libcudart.so.9.1
###Install megatools dependencies
sudo apt-get -y install libglib2.0-dev libgirepository1.0-dev asciidoc
###Install megatools
wget https://megatools.megous.com/builds/megatools-1.9.98.tar.gz
tar -xzf megatools-1.9.98.tar.gz
cd megatools-1.9.98
./configure
make
sudo make install
###Test Driver framework
nvidia-smi
###Switch to cuda 9.1
sudo rm -rf /usr/local/cuda
sudo mkdir /usr/local/test
sudo ln -s /usr/local/cuda-9.1 /usr/local/test
sudo mv /usr/local/test/cuda-9.1 /usr/local/cuda
sudo rm -rf /usr/local/test
echo "export CUDA_PATH=/usr/local/cuda-9.1" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64" >> ~/.bashrc
echo "export PATH=$PATH:$CUDA_PATH/bin" >> ~/.bashrc
echo "export CFLAGS=-I$CUDA_PATH/include" >> ~/.bashrc
echo "export LDFLAGS=-L$CUDA_PATH/lib64" >> ~/.bashrc
source .bashrc
sudo rm -rf /usr/lib/libcudart.so
sudo ln -s /usr/local/cuda-9.1/lib64/libcudart.so /usr/lib/libcudart.so
###install CCminer(cuda 9.1)
git clone https://github.com/tpruvot/ccminer.git
cd ccminer
./build.sh
###install suprminer(cuda 9.1)
git clone https://github.com/ocminer/suprminer.git
cd suprminer
./build.sh
###install nevermore-miner(cuda 9.1)
git clone https://github.com/brian112358/nevermore-miner.git
cd nevermore-miner
./build.sh
###Install Enemy Miner(precompiled)
megadl 'https://mega.nz/#!ADxkjDKJ!h3gyL_Yc_ChGufgt1QOFE4mg01YLF3Cqv2nhhfVkN54'
unzip enemy-1.03.zip -d ./enemy
chmod +x ./enemy/ccminer
###Run suprminer
suprminer/ccminer -a x16r -o stratum+tcp://ravenminer.com:3666 -u RBprMALz4SmeR35FAaz8mk2Cefd6e7HHuj -p Supr,c=RVN
suprminer/ccminer -a x16s -o stratum+tcp://blockcruncher.com:3333 -u PAd2W6ZEmWGbMrgavzZNX8FFiHdm2nXfmb -p Supr,c=PGN
###Run enemy
enemy/ccminer -a x16r -o stratum+tcp://ravenminer.com:3666 -u RBprMALz4SmeR35FAaz8mk2Cefd6e7HHuj -p Enemy,c=RVN
###Run nevermore-miner
nevermore-miner/ccminer -a x16r -o stratum+tcp://ravenminer.com:3666 -u RBprMALz4SmeR35FAaz8mk2Cefd6e7HHuj -p nvmr,c=RVN
nevermore-miner/ccminer -a x16s -o stratum+tcp://blockcruncher.com:3333 -u PAd2W6ZEmWGbMrgavzZNX8FFiHdm2nXfmb -p nvmrs,c=PGN
###Run ccminer
ccminer/ccminer -a x16r -o stratum+tcp://ravenminer.com:3666 -u RBprMALz4SmeR35FAaz8mk2Cefd6e7HHuj -p 225,c=RVN
Feel free to mine to those addresses if you found this guide helpful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment