[Wallet compiling & VPS mining guide]Please follow this guide to compile Linux version. There was some issues in static linked wallet; I'll make some tests and upload the files.Note: Berkeley DB v4.8.30.NC (http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz) is recommended. See:
https://bitcointalk.org/index.php?topic=735170.msg11416220#msg11416220Register 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 wallet compiling, VPS setting up, compiling cpuminer and running pool or solo mining.
If you only want to compile wallet, please read steps #5 and #9. If you want to create a new user, take a look at #3.1) Set up a VPS server.2) Get the login information from the email received (IP and password), typicallyThis 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)follow instructions to set up a user (
only need to create password)
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)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 libssl-dev
To compile Qt wallet:
sudo apt-get install qt-sdk qt5-qmake libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev-tools qt5-default
(input your password once asking)
6) This is needed if you choose 512 M memory during VPS creation (
normally you don't need to do this if you're compiling using personal computer)
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:
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/magi-project/wolf-m7m-cpuminer-V2
cd m7magi-cpuminer-v2
I recommend the following minerd source which allows adjusting CPU usage.
cd
git clone https://github.com/magi-project/m-cpuminer-legacy-v2
cd m-cpuminer-legacy-v2
./autogen.sh
CFLAGS="-O3 -march=native" ./configure
make
sudo cp minerd /usr/local/bin
(notice any errors, let me know if you stuck somewhere)
8-) Pool miningNotice the following is to run general minerd. If you want to use m-cpuminer-legacy, add the "-e" option as follows:minerdlegacy -o stratum+tcp://pool_url:pool_port -u pool_user.worker -p password -t thread_numbers -e cpu_efficiency
We need put the miner a screen session so it will run even when we logout VPS:
To use Nonce-pool:
minerd -o stratum+tcp://mine2.magi.nonce-pool.com:4090 -u <username> -p <password>
To use Suprnova pool:
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:
If you remember (i.e., magi), simply issue
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! [screen shot]
If you interested to solo mining, please continue reading.
9) Compile and run Magi walletgit clone https://github.com/magi-project/magi
To compile daemon (this is the only one needed for VPS mining)
cd magi/src
make -f makefile.unix
To compile Qt wallet
The above commands are enough to compile the walle. Please read relevant documents, if you want to add options to qmake.
magi.conf is the configuration file to set up various parameters, for example nodes in order to successfully sync the network. Usually you don't need it. The following steps are to set up the conf file.
The magi.conf file should be in the folder: ~/.magi (for windows, browse into folder %appdata%\magi) (if the folder .magi or magi is not there, you can simply create it, or simply run the daemon or Qt wallet, it will be automatically created)
(magi.conf is also needed if you do sole mining; notice you can use any username and password for rpcuser and rpcpassword)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
If you need network nodes or can get the wallet sync work, add the following into magi.conf:
addnode=104.128.225.215
addnode=216.189.144.213
addnode=162.245.217.165
addnode=104.131.57.65
addnode=104.131.42.100
To run the daemon (don't do this if you want to use Qt wallet),
10) Solo mining
./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.
sudo apt-get install build-essential libcurl4-openssl-dev automake autoconf git openssl libgmp-dev screen
git clone https://github.com/magi-project/m-cpuminer-legacy-v2
./autogen.sh && CFLAGS="-O3 -march=native" ./configure && make
screen -S mining
./minerd -o stratum+tcp://stratum1.suchpool.pw:3333 -u magi.u -p p -e 90
screen -r mining