|
@@ -3,10 +3,12 @@ set -e
|
|
|
script_version="0.1b"
|
|
|
rdate="10/07/2018"
|
|
|
remote_folder="http://wareck.free.fr/openrig"
|
|
|
+cuda=8
|
|
|
|
|
|
#### OPTIONS ####
|
|
|
ETHMine="YES"
|
|
|
-GRIDV2="YES"
|
|
|
+CCminer="YES"
|
|
|
+XmrRig="YES"
|
|
|
|
|
|
swap_size="0" # 0/4/8/16 Go
|
|
|
|
|
@@ -37,8 +39,10 @@ echo -n -e " \e[97m\u255A"
|
|
|
for j in {1..40}; do echo -e -n "\u2550";done
|
|
|
echo -e -n "\u255D\e[0m"
|
|
|
echo
|
|
|
-
|
|
|
+echo -e "\e[97m +\e[91m Cuda toolkit v$cuda \e[0m\e[97m"
|
|
|
if [ $ETHMine = "YES" ]; then echo -e "\e[97m +\e[91m Etherminer \e[0m\e[97m";fi
|
|
|
+if [ $CCminer = "YES" ]; then echo -e "\e[97m +\e[91m CCminer \e[0m\e[97m";fi
|
|
|
+if [ $XmrRig = "YES" ]; then echo -e "\e[97m +\e[91m XMR_Rig \e[0m\e[97m";fi
|
|
|
echo -e "\e[97m +\e[91m Claymore dualminer $claymore_dual_v\e[0m\e[97m"
|
|
|
#echo -e "\e[97m +\e[91m Claymore zcash $claymore_zcash_v\e[0m\e[97m"
|
|
|
#echo -e "\e[97m +\e[91m Claymore xmr $claymore_xmr_v\e[0m\e[97m"
|
|
@@ -48,21 +52,26 @@ sleep 4
|
|
|
sed -i -e "s/# set const/set const/g" /etc/nanorc
|
|
|
|
|
|
echo -e "\n\e[95mExpand Disk :\e[0m"
|
|
|
-myDrive=`df -h | grep /dev/sd | awk ' { print $1 }'`
|
|
|
-myDrive1=`df -h | grep /dev/sd | awk ' { print $1 }'| cut -c -8`
|
|
|
-echo "My drive :$myDrive"
|
|
|
-echo "My drive1:$myDrive1"
|
|
|
-sudo growpart $myDrive 1 |true
|
|
|
-sudo resize2fs $myDrive1 |true
|
|
|
+sudo growpart `df -h | grep /dev/sd | awk ' { print $1 }'| cut -c -8` 1 |true
|
|
|
+sudo resize2fs `df -h | grep /dev/sd | awk ' { print $1 }'` |true
|
|
|
echo -e "\e[97mDone !\e[0m"
|
|
|
|
|
|
echo -e "\n\e[95mSystem Update :\e[0m"
|
|
|
sudo apt-get update
|
|
|
-#sudo add-apt-repository -y ppa:ethereum/ethereum -y
|
|
|
-#sudo apt-get update
|
|
|
+sudo add-apt-repository -y ppa:ethereum/ethereum -y
|
|
|
+sudo apt-get update
|
|
|
sudo apt install ethereum git screen htop curl ntp pv git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev \
|
|
|
-build-essential libcurl4-gnutls-dev libboost-all-dev libgmp-dev \
|
|
|
+build-essential libcurl4-gnutls-dev libgmp-dev \
|
|
|
libreadline-dev libmicrohttpd-dev libjansson-dev libgmp-dev libssl-dev unzip python-nfqueue python-scapy -y
|
|
|
+if [ $CCminer = "YES" ]
|
|
|
+then
|
|
|
+sudo apt-get install libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev build-essential -y
|
|
|
+fi
|
|
|
+if [ $XmrRig = "YES" ]
|
|
|
+then
|
|
|
+sudo apt-get install git build-essential cmake libuv1-dev libmicrohttpd-dev -y
|
|
|
+fi
|
|
|
+
|
|
|
cd ~
|
|
|
sleep 5
|
|
|
sudo sed -i -e "s/quiet splash/text/g" /etc/default/grub
|
|
@@ -75,21 +84,20 @@ sudo add-apt-repository ppa:graphics-drivers/ppa -y
|
|
|
sudo apt-get update
|
|
|
sudo apt-get install nvidia-375 -y
|
|
|
cd /tmp
|
|
|
-wget -c https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64.deb
|
|
|
-sudo dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64.deb
|
|
|
-sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
|
|
|
+if [ $cuda = "9" ]
|
|
|
+then
|
|
|
+wget -c http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.2.148-1_amd64.deb
|
|
|
+sudo dpkg -i cuda-repo-ubuntu1604_9.2.148-1_amd64.deb
|
|
|
+sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
|
|
|
+fi
|
|
|
+if [ $cuda ="8" ]
|
|
|
+then
|
|
|
+wget -c https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
|
|
|
+sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
|
|
|
+fi
|
|
|
sudo apt-get update
|
|
|
-sudo apt-get install cuda
|
|
|
-exit
|
|
|
+sudo apt-get install cuda -y
|
|
|
|
|
|
-echo -e "\n\e[95mInstall AMD Drivers :\e[0m"
|
|
|
-mkdir /home/work/tempo |true
|
|
|
-cd /home/work/tempo
|
|
|
-curl -f http://wareck.free.fr/grinder/drivers/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 | tar xvj
|
|
|
-#curl -sf http://wareck.free.fr/grinder/drivers/amdgpu-pro-17.50-511655.tar.xz | tar xvJ
|
|
|
-curl -sf http://wareck.free.fr/grinder/drivers/amdgpu-pro-18.20-606296.tar.xz | tar xvJ
|
|
|
-#cd amdgpu-pro-17.50-511655
|
|
|
-cd amdgpu-pro-18.20-606296
|
|
|
|
|
|
echo -e "\n\e[95mInstall Claymore Miners :\e[0m"
|
|
|
cd /home/work/
|
|
@@ -122,6 +130,43 @@ ln -s cpp_ethminer/build/ethminer/ethminer ethminer | true
|
|
|
fi
|
|
|
echo -e "\e[97mDone !\e[0m"
|
|
|
|
|
|
+if [ $CCminer = "YES" ]
|
|
|
+then
|
|
|
+echo -e "\n\e[95mInstall ccminer :\e[0m"
|
|
|
+cd ~
|
|
|
+if [ ! -d ccminer ]
|
|
|
+then
|
|
|
+git clone https://github.com/tpruvot/ccminer.git
|
|
|
+else
|
|
|
+cd ccminer
|
|
|
+git pull
|
|
|
+cd ~
|
|
|
+fi
|
|
|
+cd ccminer
|
|
|
+sudo sed -i -e "s/#nvcc_ARCH += -gencode=arch=compute_61,code=/nvcc_ARCH += -gencode=arch=compute_61,code=/g" Makefile.am
|
|
|
+sudo sed -i -e "s/nvcc_ARCH += -gencode=arch=compute_50,code/#nvcc_ARCH += -gencode=arch=compute_51,code/g" Makefile.am
|
|
|
+./build.sh
|
|
|
+cd ~
|
|
|
+fi
|
|
|
+if [ $XmrRig = "YES" ]
|
|
|
+then
|
|
|
+echo -e "\n\e[95mInstall XMRig :\e[0m"
|
|
|
+cd ~
|
|
|
+if [ ! -d xmrig ]
|
|
|
+then
|
|
|
+git clone https://github.com/xmrig/xmrig.git
|
|
|
+cd xmrig
|
|
|
+mkdir build
|
|
|
+else
|
|
|
+cd xmrig
|
|
|
+git pull
|
|
|
+cd ~
|
|
|
+fi
|
|
|
+cd xmrig
|
|
|
+cd build
|
|
|
+cmake ..
|
|
|
+make
|
|
|
+fi
|
|
|
|
|
|
echo -e "\n\e[95mDownloading NoFees Patch:\e[0m"
|
|
|
cd ~
|