Primecoiner's Social & News about Primecoin XPM mining, Primecoin XPM wiki, and Find Answers To Questions|Saturday, April 19, 2014
You are here: Home » Primecoin Mining » Linux Primecoin XPM » HP6 Linux Installation Instructions

HP6 Linux Installation Instructions 


This is HP6 install instructions for Ubu 13.04 and CentOS. These instructions were provided by the creator of the same build:  Full credit goes to: mikaelh  – he built both the installation and instruction guides. Original High Performance thread found here. (Note: this is his address as you can see in the thread found here

Step 1. Installing the required dependencies

Using apt-get with latest Ubuntu 13.04:

sudo apt-get install -y build-essential m4 libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev

The ‘sudo’ command requires you to type the password for the current user. If you don’t have sudo working, you need to manually switch to root with ‘su’ before running those commands.

Warning: If you have installed a specific version such as libdb5.3++-dev before, then don’t install the meta-package libdb++-dev which may pull a different version.

Alternative for CentOS users:

su -c 'yum install gcc-c++ m4 openssl-devel db4-devel boost-devel'

Step 2. Compiling GMP

Latest version supports all the new CPUs

rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
tar xjvf gmp-5.1.2.tar.bz2
cd gmp-5.1.2
./configure --enable-cxx
sudo make install

The configure script will attempt to automatically detect the host CPU and enable the best optimizations for it.
Step 2b. Compiling OpenSSL (for CentOS users)
This step is only required if you’re using CentOS. Red Hat has removed support for elliptic curve cryptography from the OpenSSL it supplies.

rm -rf openssl-1.0.1e.tar.gz openssl-1.0.1e
tar xzvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config shared --prefix=/usr/local --libdir=lib
sudo make install

Step 2c. Compiling miniupnpc (for CentOS users)

rm -rf miniupnpc-1.6.20120509.tar.gz
tar xzvf miniupnpc-1.6.20120509.tar.gz
cd miniupnpc-1.6.20120509
sudo INSTALLPREFIX=/usr/local make install

Step 3. Compiling primecoind

rm -rf primecoin-0.1.1-hp6.tar.bz2 primecoin-0.1.1-hp6
wget -O primecoin-0.1.1-hp6.tar.bz2
tar xjvf primecoin-0.1.1-hp6.tar.bz2
cd primecoin-0.1.1-hp6/src
sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' makefile.unix
sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' makefile.unix
sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' makefile.unix
make -f makefile.unix
strip primecoind
sudo cp -f primecoind /usr/local/bin/

The last line will install the primecoind binary to /usr/local/bin.
CentOS users: Use the following ‘make’ command instead:

make -f makefile.unix BOOST_LIB_SUFFIX=-mt

Step 4. Configuration
Create a configuration file

mkdir -p .primecoin
echo 'server=1
sievesize=1000000' > .primecoin/primecoin.conf
sed -i -e "s/SOME_SECURE_PASSWORD/`< /dev/urandom tr -cd '[:alnum:]' | head -c32`/" .primecoin/primecoin.conf

You may optinally customize the configuration file. The last line puts a random password in the configuration file automatically, so you don’t need to change anything if you’re only sending RPC commands from localhost. Type these commands to create an auto-restart

echo '#!/bin/bash
export PATH="/usr/local/bin:$PATH"
killall --older-than 10s -q run-primecoind primecoind
function background_loop
        while :; do
                primecoind >/dev/null 2>&1
                sleep 1
background_loop &' > run-primecoind
chmod +x run-primecoind

CentOS users may want to remove the ‘killall’ command from this script because the version that comes with CentOS does not support the –older-than option.
And for convenience, create a stopping script:

echo '#!/bin/bash
killall -q run-primecoind
primecoind stop' > stop-primecoind
chmod +x stop-primecoind

Step 5. Starting mining
Simply type the following to start mining:


It will take a while for it to sync up with the network. The script will continue running in the background, automatically restarting primecoind if it crashes.
Step 6. Monitoring the progress
Checking that the primecoind process is runnning:

ps xuf |grep primecoind

RPC commands can be sent to the daemon like this:

primecoind getprimespersec
primecoind listtransactions
primecoind getinfo
primecoind getmininginfo
primecoind getdifficulty

Any combination of these can be used with the ‘watch’ command like this:

watch 'primecoind getinfo && primecoind listtransactions'

Press Ctrl + C to terminate the watch command.
You can also look at the output in debug.log

grep primemeter ~/.primecoin/debug.log

If you want to see those in real-time, try this:

tail -f ~/.primecoin/debug.log |grep primemeter

Step 7. Stopping mining
Run the stop script:


Found this article helpful? if you feel so inclined, please take a moment to tip me @  Donate

please ;)

Primecoin (XPM) Address: AKmYynHQnJmjgoXo2MwVbhyk9iTYWLujet

Bitcoin (BTC) Address: 18LhZCPFeLEJCSxp8R7xvusNxw6KNvevRe

Litecoin (LTC) Address: LV7BLtew5hiyvkB1BiU58jJCAvrDZvJRmu

About the author: Money Over Everything

Science DUDE

2 Responses to HP6 Linux Installation Instructions

  1. Josh

    I’m running ubuntu 13.04 32bit @ digitalocean vps (1 core CPU). I did exactly as it’s described here but my pps is very low.. :( any ideas?

    • jimmo

      It might be that you are using a low sievesize ? 2000000 shows more pps. try that by adding it to your /.primecoin/primecoin.conf (use nano ~/.primecoin/primecoin.conf) and add sievesize=2000000


Add a Comment