参考链接
https://bitcointalk.org/index.php?topic=35812.msg442140#msg442140
rpm方式
rpm -ivh http://linux.ringingliberty.com/bitcoin/el6/x86_64/bitcoin-release-1-6.noarch.rpm
yum install bitcoin-server
CentOS5参考
Ok let‘s get this tutorial section started off with one. Now mind you I didn‘t write this tutorial, it was writen by "Michael Erwin Steurer" and posted on the otherbitcoin
forum. Problem is it was hard to find and it‘s in PDF format, don‘t like that myself ha ha
So I am going to post it here to get the tutorials section up and running. Plus, I also fixed a problem someone on the other forum was having with gthread not being installed and working, I will post that at the end of the tutorial.
Now I HAVE tested this myself just 10 minutes ago on a CentOS 5.5 system with the most recent of everything, including the most recent download ofbitcoin.
So it works. Let‘s start:
We keep everything in our home directory under ~/Bitcoin/. We do not make any changes
to system parameters or system libraries and therefore no root privileges are required.
That above statement was from the original, root priviledges WILL be required if you have the problem with gthread, which most VPS machines should have. This is because you will have to install gthread using yum, so root is needed
in this case or sudo power.
bitcoinforums.net/styles/default/xenforo/gradients/category-23px-light.png); PADDING-BOTTOM: 10px; MARGIN: 0px; PADDING-TOP: 10px; FONT-STYLE: italic; BACKGROUND-COLOR: rgb(255,244,229); background-clip: initial; border-top-left-radius: 4px 4px; border-top-right-radius: 4px 4px; border-bottom-right-radius: 4px 4px; border-bottom-left-radius: 4px 4px; background-origin: initial"># mkdir Bitcoin
# cd Bitcoin
# mkdir Libraries
# mkdir Trunk
# mkdir Deps
# cd Libararies
# tar -xzvf boost_1_46_1.tar.gz
# cd boost_1_46_1
# ./bootstrap.sh
# ./bjam --prefix=../../Deps link=static runtime-link=static install
# tar -xzvf openssl-1.0.0d.tar.gz
# cd openssl-1.0.0d
# uname -a
x86_64 x86_64 x86_64 GNU/Linux
i686 i686 i386 GNU/Linux
# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl linux-x86_64
# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl linux-generic32
# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl
make && make install
# tar -xzvf db-5.1.19.tar.gz
# cd db-5.1.19
# cd build_unix
# ../dist/configure --prefix=~/Bitcoin/Deps/ --enable-cxx
# make && make install
# git clone https://github.com/bitcoin/bitcoin.git Trunk
# cd ~/Bitcoin/Trunk
# wget sf_link
# tar -xf bitcoin*
# cd bitcoin-0.3.23/src
#begin
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
CXX=g++
DEPSDIR=/root/Bitcoin/Deps
INCLUDEPATHS= -I"$(DEPSDIR)/include"
LIBPATHS= -L"$(DEPSDIR)/lib"
WXINCLUDEPATHS=$(shell wx-config --cxxflags)
WXLIBS=$(shell wx-config --libs)
USE_UPNP=
DEFS= -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
LIBS= -dead_strip \
-Wl,-Bstatic \
$(DEPSDIR)/lib/libdb_cxx-5.1.a \
-mtl $(DEPSDIR)/lib/libboost_system.a \
-mtl $(DEPSDIR)/lib/libboost_thread.a \
-mtl $(DEPSDIR)/lib/libboost_filesystem.a \
-mtl $(DEPSDIR)/lib/libboost_program_options.a \
$(DEPSDIR)/lib/libdb_cxx.a \
$(DEPSDIR)/lib/libssl.a \
$(DEPSDIR)/lib/libcrypto.a \
-l ssl \
-l crypto \
-Wl,-Bdynamic \
-l gthread-2.0 \
-l z \
-l dl
ifdef USE_UPNP
LIBS += -l miniupnpc
DEFS += -DUSE_UPNP=$(USE_UPNP)
endif
DEBUGFLAGS=-g -D__WXDEBUG__
CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h \
util.h key.h bignum.h base58.h script.h \
db.h net.h irc.h main.h rpc.h uibase.h \
ui.h noui.h init.h
OBJS= obj/util.o \
obj/script.o \
obj/db.o \
obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o \
cryptopp/obj/sha.o \
cryptopp/obj/cpu.o
all: bitcoind
obj/%.o: %.cpp $(HEADERS)
$(CXX) -c $(CXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
cryptopp/obj/%.o: cryptopp/%.cpp
$(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
bitcoin: $(OBJS) obj/ui.o obj/uibase.o
$(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
obj/nogui/%.o: %.cpp $(HEADERS)
$(CXX) -c $(CXXFLAGS) -o $@ $<
bitcoind: $(OBJSbj/%=obj/nogui/%)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
clean:
-rm -f obj/*.o
-rm -f obj/nogui/*.o
-rm -f cryptopp/obj/*.o
-rm -f headers.h.gch
-rm -f bitcoin
-rm -f bitcoind
#end
make -f makefile.centos bitcoind
cannot find -lgthread-2.0
yum install glib2-devel.i386
Bitcoind在CentOS6.4安装参考,布布扣,bubuko.com
原文:http://blog.csdn.net/expleeve/article/details/25567607