dogecoind在CentOS安裝參考

來源:互聯網
上載者:User

Compiling dogecoind on CentOS

There seems to be some collective difficulty installing altcoin programs on CentOS. This shouldn't come as a surprise to anybody who has used CentOS on even a semi-regular basis. Compiling from source can be frustrating in its own right, but doing so on Cent can often lead to experiencing new levels of Bij!

Dogecoin (?) is but one of the many open-source cryptocurrencies that have cropped up in this new era of electronic money. Doge is a fork of LiteCoin (arguably the second most traded cryptocurrency presently) and isscrypt based instead of beingsha based like Bitcoin. You may ask yourself... "Ok, but what does this all mean?" The high-level meaning is you can still actually mine Dogecoin with your CPU or Graphics Card. You don't have to go out and get a specialized mining asic to have a shot at mining your own doggy coins.

If you are still confused, I recommend watching the video below. It is very informative and will tell you everything you need to know about ?oge.

Or maybe reading the Wikipedia entry and the dogecoin site.

Now, without further delay... to the moon!

Headless Dogecoind on CentOS 6.5 x86_64

Dogecoind is the daemon program for Dogecoin. The daemon allows you to interact with the dogecoin blockchain to do many different things like create a wallet, send and receive ? and even mine for new coins. The daemon usually comes in two different, but functionally identical, forms; a headless interface known as dogecoind and a graphical interface commonly referred to asdogecoin-qt. This guide will cover installing the headless version system-wide.

Dependencies

I always recommend ensuring your existing packages are up to date before installing anything new. You can install available updates withyum. If there are no updates available theupdate will inform you of such and do nothing.

yum update

Now we will install the some of the dependencies required that do not need to be compiled from source.

yum install git automake gcc gcc-c++ make curl-devel zlib-devel bzip2-devel python-devel wgetecho '/usr/local/lib' > /etc/ld.so.conf.d/usr_local_lib.conf && /sbin/ldconfigecho '/usr/local/lib64' > /etc/ld.so.conf.d/usr_local_lib64.conf && /sbin/ldconfig
OpenSSL

The current version of OpenSSL in CentOS is 1.0.1e. This is actually pretty good for CentOS. It is only one release behind at the time of writing this. Unfortunately this versionwill not work with dogecoind. This is due to required components being excluded upstream with RedHat due to potential IP concerns. This crippled version of OpenSSL is the bane of many people trying to install many different modern programs on RHEL-Based distributions (such as CentOS). You can read all about it in thisbugzillaentry and the entries referenced within it. The version that comes with CentOS supports only two curves. The version that we are building from source supports 73.

Not caring about anything other than rolling in the ?oge; we will install the current version, in all its full-flavored glory, concurrently with the system version.

cd /usr/local/srcwget -qO- http://www.openssl.org/source/openssl-1.0.1f.tar.gz | tar xzvcd openssl-1.0.1f./config shared --prefix=/usr/local --openssldir=/usr/local/sslmake && make install
Boost

Boost is a collection of C++ libraries.

cd /usr/local/srcwget -qO- http://downloads.sourceforge.net/boost/boost_1_55_0.tar.bz2 | tar xjvcd boost_1_55_0/./bootstrap.sh --prefix=/usr/local./b2 install --with=all
BerkeleyDB

BerkeleyDB is a library that provides high-performance database functionality.

cd /usr/local/srcwget -qO- http://download.oracle.com/berkeley-db/db-5.1.19.tar.gz | tar xzvcd db-5.1.19/build_unix../dist/configure --prefix=/usr/local --enable-cxxmake && make install
Dogecoind

Again, dogecoind is the daemon used to interact with Dogecoin.

cd /usr/local/srcldconfigmkdir /usr/local/src/dogecoin-mastercd /usr/local/src/dogecoin-masterwget -qO- https://github.com/dogecoin/dogecoin/archive/master-1.5.tar.gz --no-check-certificate | tar xzv --strip-components 1 cd srcmake -f makefile.unix USE_UPNP=- BDB_LIB_PATH=/usr/local/lib OPENSSL_LIB_PATH=/usr/local/lib64

The system should now compile the dogecoind binary and place it in the current directory. You will most likely want tostrip debugging symbols out of the binary and move it somewhere in your$PATH. This allowsdogecoind to be easily executed without specifying the absolute path to the binary each time.

strip dogecoindcp -a dogecoind /usr/local/bin/
Configuring Dogecoind

It seems like 99% of the cryptocurrencies use the same style configuration file. Doge is nearly functionally identical to LiteCoin. It is generally safe to use litecoin documentation when looking upconfiguration variables.

< OPTIONAL > - If you do not have a regular, non-root, user then you can create one using theuseradd command. Remember to substituteusername for the actual username you wish to create.

useradd -m -s/bin/bash username

Now you will want to assume the identity of a non-privileged user. For example, the userdoge.

su - doge

Once you've assumed the identity of a non-privileged user you will want to rundogecoind.

dogecoind

You should be presented with text similar to:

Error: To use dogecoind, you must set a secure rpcpassword in the configuration file:/home/doge/.dogecoin/dogecoin.confIt is recommended you use the following random password:rpcuser=dogecoinrpcrpcpassword=<long random password>(you do not need to remember this password)The username and password MUST NOT be the same.If the file does not exist, create it with owner-readable-only file permissions.It is also recommended to set alertnotify so you are notified of problems;for example: alertnotify=echo %s | mail -s "Dogecoin Alert" admin@foo.com

The first run creates the required directory structure and puts necessary files in place within that structure.

$ ls -R .dogecoin.dogecoin:blocks  chainstate  db.log  debug.log  peers.dat  wallet.dat.dogecoin/blocks:blk00000.dat  index.dogecoin/blocks/index:000003.log  CURRENT  LOCK  LOG  MANIFEST-000002.dogecoin/chainstate:000003.log  CURRENT  LOCK  LOG  MANIFEST-000002

We will now fetch a basic configuration file and modify it to suit our needs.

cd ~/.dogecoinwget https://raw.github.com/dogecoin/dogecoin/master-1.5/release/dogecoin.conf

This file has nothing more than some current nodes in it so we will need to modify it some. Open~/.dogecoin/dogecoin.conf in your linux text editor of choice and add the following options:

daemon=1server=1rpcuser=dogecoinrpc1 (or any username you'd like)rpcpassword=<long random password>

There is a more complete list of available options and what they do in the Litecoin Documentation.

Additional Readinghttps://github.com/dogecoin/dogecoinhttp://dogecoin.com/get-startedhttp://howtodoge.com/

附上 centos-install.sh

#!/bin/bashif [ ! -x /usr/bin/wget ] ; then echo "for some silly reason, wget is not executable.  Please fix this (as root do chmod +x /usr/bin/wget) and try again" exitfiUSERNAME=`whoami`cd ~mkdir Dogecoincd Dogecoinmkdir Librariesmkdir Trunkmkdir Depscd Librarieswget -qO- http://downloads.sourceforge.net/boost/boost_1_55_0.tar.bz2 | tar xjvcd boost_1_55_0./bootstrap.sh./bjam --prefix=/home/$USERNAME/Dogecoin/Deps link=static runtime-link=static installcd ..wget -qO- http://www.openssl.org/source/openssl-1.0.0g.tar.gz | tar xzvcd openssl-1.0.0gif uname -a | grep -q x86_64 ; then ./Configure no-shared --prefix=/home/$USERNAME/Dogecoin/Deps --openssldir=/home/$USERNAME/Dogecoin/Deps/openssl linux-x86_64else ./Configure no-shared --prefix=/home/$USERNAME/Dogecoin/Deps --openssldir=/home/$USERNAME/Dogecoin/Deps/openssl linux-generic32fi#make dependmakemake installcd ..wget -qO- http://download.oracle.com/berkeley-db/db-5.1.19.tar.gz | tar xzvcd db-5.1.19/build_unix../dist/configure --prefix=/home/$USERNAME/Dogecoin/Deps/ --enable-cxxmakemake installcd ../..mkdir dogecoin-mastercd dogecoin-masterwget -qO- https://github.com/dogecoin/dogecoin/tarball/master-1.5 --no-check-certificate | tar xzv --strip-components 1cd src#cp -vap ~$USERNAME/makefile.new .cat /home/$USERNAME/makefile.new | sed s/kjj/$USERNAME/g > makefile.newmake -f makefile.new dogecoindcp -vap dogecoind /home/$USERNAME/cd ~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.