[VPS mining guide]Register your VPS through the following referral link to support this project:
Digitalocean:
https://www.digitalocean.com/?refcode=0881d086fee6VULTR:
http://www.vultr.com/?ref=6812659Through the referral link, Digitalocean gives free credit which allows free VPS service.
This guild covers VPS setting up, compiling cpuminer and running pool or solo mining.
1) Set up a VPS server.2) Get the login information from the email received (IP and password), typicallyssh root@IP
This is a command to ssh login the VPS. You'lll need to figure out ssh, for example,
http://www.putty.org/ for windows.
3) Once login, copy and paste the following commands (you can choose different username than magi)adduser magi
follow instructions to set up a user (
only need to create password)
/usr/sbin/visudo
edit this section (add line"magi ..."):
## User privilege specification
root ALL=(ALL:ALL) ALL
magi ALL=(ALL:ALL) ALL
4) Exit and ssh again with (i.e., regular user login rather prior root user)ssh magi@IP
5) Upgrade and install packages:sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git screen automake build-essential libboost-all-dev libdb5.1-dev libdb5.1++-dev libminiupnpc-dev libcurl4-openssl-dev libgmp-dev
(input your password if asking)
6) This is a need if you choose 512 M memory during VPS creationsudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
Turn on swap permanently by adding it to the fstab file:
sudo nano /etc/fstab
/swapfile none swap sw 0 0
DON'T do the following steps unless you know what they mean:
sudo swapon -s
sudo swapoff /swapfile
sudo rm /swapfile
7) Compile cpuminer (copy and past following command)cd
git clone https://github.com/noncepool/m7magi-cpuminer-v2
cd m7magi-cpuminer-v2
./autogen.sh
CFLAGS="-O3" ./configure
make
sudo cp minerd /usr/local/bin
(notice any errors, let me know if you stuck somewhere)
8-) Pool miningWe need put the miner a screen session so it will run even when we logout VPS:
screen -S magi
To use Nonce-pool:
minerd -o stratum+tcp://mine2.magi.nonce-pool.com:4090 -u
-p To use Suprnova pool:
minerd -o stratum+tcp://xmg.suprnova.cc:7128 -u
-p and are the worker and password you setup in the pool (check the pool website for info; ask me if you don't know how to set it up)
Press “CTRL+a” and then press “D” to detach from the screen session (get back to prior command line). Under regular command line you can check if the screen section is alive:
screen -ls
If you remember (i.e., magi), simply issue
screen -r magi
to back to the mining screen. You logout/login to check if the mining is still going on.
Press “CTRL+A+D”;
exit
ssh magi@IP
screen -r magi
Basically you're done pool mining!
If you interested to solo mining, please continue reading.
9) Compile and run Magi wallet
cd
git clone https://github.com/magi-project/magi
cd magi/src
make -f makefile.unix
Create a conf file which should be in the folder: ~/.magi (magi is the user we created)
(magi.conf is not necessary, unless you will sole mine; use more complicated pass as you like)
cd ~/.magi
emacs magi.conf
emacs is text edit tool, use any you like. save the following content:
daemon=1
server=1
rpcport=8232
rpcallowip=127.0.0.1
rpcuser=rpcuser
rpcpassword=rpcpass
cd ~/magi/src
./magid &
The last command runs the daemon.
10) Solo mining
./minerd --url http://127.0.0.1:8232 --user rpcuser --pass rpcpass --threads
8232 is rpcport, rpcuser and rpcpass are user and password you set in magi.conf
set to a number, matching with the threads of your needs.