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 » CentOS – Auto Install Servers

CentOS – Auto Install Servers 

money

Start Mining Bitcoin on DirectPool.net(Giving Back to the community)

Start Mining Primecoin on a Trusted, Notable, and Reliable Server (Pay 4 Use)
primecoin mining servers

Want to find out how to setup CENTOS Servers on Auto Pilot to start Primecoin XPM mining? Perfect, here is instructions on this page to get started.

Steps to copy the shell script:
1) Open a file for writing

vi build-primecoind-centos.sh

2) Press ‘i’ to enter edit mode, and paste the large snippet below:

#!/bin/sh

echo 'NOTICE: Switching to /root directory…'
cd /root

echo 'NOTICE: Installing dependencies via yum…'
yum -y install gcc-c++ m4 openssl-devel db4-devel boost-devel wget git ntp
yum -y groupinstall "Development Tools"

echo 'Configuring and starting NTPd...'
chkconfig ntpd on
ntpdate 0.pool.ntp.org
service ntpd start

echo 'NOTICE: Clearing work environment…'
rm -rf gmp-5.1.2.tar.bz2 gmp-5.1.2
rm -rf openssl-1.0.1e.tar.gz openssl-1.0.1e
rm -rf primecoin-0.1.1-hp8.tar.bz2 primecoin-0.1.1-hp8
rm -rf miniupnpc-1.6.20120509.tar.gz

echo 'NOTICE: Downloading OpenSSL 1.0.1e...'
wget ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1e.tar.gz
tar xzvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
echo 'NOTICE: Configuring OpenSSL 1.0.1e...'
./config shared --prefix=/usr/local --libdir=lib
echo 'NOTICE: Compiling OpenSSL 1.0.1e...'
make
echo 'NOTICE: Installing OpenSSL 1.0.1e…'
make install

cd /root
echo 'NOTICE: Downloading GMP 5.1.2…'
wget http://mirrors.kernel.org/gnu/gmp/gmp-5.1.2.tar.bz2
tar xjvf gmp-5.1.2.tar.bz2
cd gmp-5.1.2
echo 'NOTICE: Configuring GMP 5.1.2…'
./configure --enable-cxx
echo 'NOTICE: Compiling GMP 5.1.2…'
make
echo 'NOTICE: Installing GMP 5.1.2…'
make install

cd /root
echo 'NOTICE: Downloading miniupnpc 1.6.2…'
wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.20120509.tar.gz -O  miniupnpc-1.6.20120509.tar.gz
tar xzvf miniupnpc-1.6.20120509.tar.gz
cd miniupnpc-1.6.20120509
echo 'NOTICE: Compiling miniupnpc 1.6.2…'
make
echo 'NOTICE: Installing miniupnpc 1.6.2…'
INSTALLPREFIX=/usr/local make install

cd /root
echo 'NOTICE: Downloading XPM -hp8…'
wget http://sourceforge.net/projects/primecoin-hp/files/0.1.1-hp8/primecoin-0.1.1-hp8.tar.bz2/download -O primecoin-0.1.1-hp8.tar.bz2
tar xjvf primecoin-0.1.1-hp8.tar.bz2
cd primecoin-0.1.1-hp8/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
echo 'NOTICE: Compiling XPM -hp8…'
make -f makefile.unix BOOST_LIB_SUFFIX=-mt
echo 'NOTICE: Installing XPM -hp8…'
strip primecoind
cp -f primecoind /usr/local/bin/

cd /root
echo 'NOTICE: Writing configuration for XPM -hp8…'
mkdir -p .primecoin
echo 'server=1
gen=1
rpcallowip=127.0.0.1
rpcuser=primecoinrpc
rpcpassword=SOME_SECURE_PASSWORD
sievesize=1000000' > .primecoin/primecoin.conf
sed -i -e "s/SOME_SECURE_PASSWORD/`< /dev/urandom tr -cd '[:alnum:]' | head -c32`/" .primecoin/primecoin.conf

echo 'NOTICE: Finished'

3) Save and exit Vim by pressing ESC, then typing ‘:x’ (without quotes) and pressing Enter.

4) set the shell script as executable, and run it (as root).

chmod +x build-primecoind-centos.sh
./build-primecoind-centos.sh

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

Start Mining Bitcoin on DirectPool.net(Giving Back to the community)

Start Mining Primecoin on a Trusted, Notable, and Reliable Server (Pay 4 Use)
primecoin mining servers

About the author: Money Over Everything

Science DUDE

2 Responses to CentOS – Auto Install Servers

  1. Doron A.

    Tnx for the script! :)

    I ran it on my centos6 machine
    and it got some trubles getting C++

    “No package gcc-c++ available.

    What can I do?

     
    • jimmo

      You need to find the latest GCC builds for you. Should be available. What machine do you have and who is the host provider?

       

Add a Comment