Register your VPS through the following referral link to support this project:
Digitalocean: https://www.digitalocean.com/?refcode=42a47829b9e0
Through 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), typically
Code:
ssh 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)
Code:
adduser magi
follow instructions to set up a user (only need to create password)
Code:
/usr/sbin/visudo
edit this section (add line"magi ..."):
Quote
## 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)
Code:
ssh magi@IP
5) Upgrade and install packages:
Code:
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 creation
Code:
sudo 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:
Code:
sudo nano /etc/fstab
/swapfile none swap sw 0 0
DON'T do the following steps unless you know what they mean:
Code:
sudo swapon -s
sudo swapoff /swapfile
sudo rm /swapfile
7) Compile cpuminer (copy and past following command)
Code:
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 mining
We need put the miner a screen session so it will run even when we logout VPS:
Code:
screen -S magi
To use Nonce-pool:
Code:
minerd -o stratum+tcp://mine2.magi.nonce-pool.com:4090 -u <username> -p <password>
To use Suprnova pool:
Code:
minerd -o stratum+tcp://xmg.suprnova.cc:7128 -u <username> -p <password>
<username> and <password> 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:
Code:
screen -ls
If you remember (i.e., magi), simply issue
Code:
screen -r magi
to back to the mining screen. You logout/login to check if the mining is still going on.
Quote
Press “CTRL+A+D”;
Code:
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
Code:
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)
Code:
cd ~/.magi
emacs magi.conf
emacs is text edit tool, use any you like. save the following content:
Quote
daemon=1
server=1
rpcport=8232
rpcallowip=127.0.0.1
rpcuser=rpcuser
rpcpassword=rpcpass
Code:
cd ~/magi/src
./magid &
The last command runs the daemon.
10) Solo mining
Code:
./minerd --url http://127.0.0.1:8232 --user rpcuser --pass rpcpass --threads <number of threads>
8232 is rpcport, rpcuser and rpcpass are user and password you set in magi.conf
set <number of threads> to a number, matching with the threads of your needs.