Create your digital currency (3)--Publish Unix Installer _ Bitcoin

Source: Internet
Author: User
Tags file copy

Let's say we've built the bitcoin operating environment, whether you're changing the bitcoin source or creating your own cottage currency, we all want our programs to be released so that we can install them on other Linux, share them with friends or install new wallet nodes instead of rebuilding the environment. I did not find the relevant release of the tutorial, so I did one, is still in the experimental phase, only on their own several servers installed successfully, the other is not sure. Record, lest oneself forget, also hope to be helpful to everybody. Prerequisites you have compiled and executed $ make install can successfully run clients in any location, including BITCOIND/BITCOIN-CLI/BITCOIN-QT, and so on. Check Program Dependencies Library

Enter your bitcoind location, either in the source directory Src/bitcoind or under/usr/local/bin. Then execute the LDD command to view all dependent libraries:

$ cd/usr/local/bin
$ ldd./bitcoind

The result of my output is probably this:

    Linux-vdso.so.1 =>  (0x00007ffef67f2000)
    libm.so.6 =>/usr/local/lib/libm.so.6 (0x00007fc1c1925000)
    libgcc_s.so.1 =>/usr/local/lib/libgcc_s.so.1 (0x00007fc1c170e000)
    libpthread.so.0 => /libpthread.so.0 (0x00007fc1c14ef000)
    libc.so.6 =>/usr/local/lib/libc.so.6 (0x00007fc1c1128000)
    Librt.so.1 =>/usr/local/lib/librt.so.1 (0x00007fc1c0f20000)
    libdl.so.2 =>-/usr/local/lib/libdl.so.2 ( 0x00007fc1c0d1b000)
    libevent_core-2.0.so.5 =>/usr/local/lib/libevent_core-2.0.so.5 (0x00007fc1c0af0000)
    /lib64/ld-linux-x86-64.so.2 (0x000056228d338000)

Different compilation environment This side of the display of the content is not the same, according to their own line. The next step is to copy all the dependent libraries and prepare a folder for my example:

$ makedir Mbc-0.120-release-for-unix
$ cd Mbc-0.120-release-for-unix
$ makedir lib

Copy all the files in the/usr/local/lib/to Lib, you can also write a script to add to the makefile, but now manually solve the handle, anyway, as long as you use the same computer to compile, the runtime will not change. Copy compile-complete program

When you execute make install, the execution is already generated in/usr/local/, so we simply copy the program to the Mbc-0.120-release-for-unix folder we have prepared. We first add bin, include two files in the Mbc-0.120-release-for-unix, and then copy the related files in/usr/local/bin,/usr/local/include,/usr/local/lib to the corresponding folder, roughly including:

/usr/local/bin/bitcoind
/usr/local/bin/bitcoin-cli
/usr/local/bin/bitcoin-qt
(and all the others will pass the exam. You can also pick a useful test for you)
/usr/local/include/bitcoinconsensus.h
/usr/local/lib/pkgconfig
/usr/local/lib/ Libbitcoinconsensus.*
(currently Lib should include the content of/usr/local/lib and our first step in the Library of dependence)

We now have a release package that contains Bin, include, Lib three files. Write Makefile Setup program

In fact, you can also do not write makefile, cover the package to install the server under the/usr/local/can also. Below is my makefile, write Hin simple, welcome everybody to perfect together:

Install:
  cp-rf./bin/*/usr/local/bin/; 
  Cp-rf./include/*/usr/local/include/;
  Cp-i./lib/*/usr/local/lib/;
  @echo file copy Complete ...
  Ldconfig; #更新一下共享库的链接, let the system identify the library we added
  @echo Shared library links complete ...
  @echo installation was successful.

So now the release package is complete.

Copy to Server, execute

$ sudo make install

and use

$ bitcoind-daemon

See if the installation is successful.
Complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.