Bitcoind在CentOS6.4安装参考

参考链接

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

Libraries

Boost, Get the Library from here:

http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.tar.gz

put it into the directory ~/Bitcoin/Libraries/ and execute the following commands (write the parameters for the bjam command in one line).

There was an error in the prefix line below, I removed it, the author had an extra Bitcoin/ in there.

# 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

OpenSSL, Get the Library from here:

http://www.openssl.org/source/openssl-1.0.0d.tar.gz

And put it into the directory ~/Bitcoin/Libraries/, extract it and determine the system architecture.

# tar -xzvf openssl-1.0.0d.tar.gz

# cd openssl-1.0.0d

# uname -a

If the ouput of the last command contains

x86_64 x86_64 x86_64 GNU/Linux

you have a 64-bit computer architecture and if it contains

i686 i686 i386 GNU/Linux

you have a 32-bit computer architecture.

Execute one of the following ./Con gure commands according to the architecture

64-bit architecture

# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl linux-x86_64

32-bit architecture

# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl linux-generic32

Get a list with all supported architectures

# ./Configure --prefix=~/Bitcoin/Deps --openssldir=~/Bitcoin/Deps/openssl

Finally, compile and install.

make && make install

Berkeley DB, Get the Library from here:

http://freshmeat.net/projects/berkeleydb

And put it into the directory ~/Bitcoin/Libraries/ and compile it

# 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

Bitcoin

Get the BitCoin sources from the webpage or check it out from the Git repository and put

it into the directory ~/Bitcoin/Trunk/

# git clone https://github.com/bitcoin/bitcoin.git Trunk

That was the GIT command, now you can download also from here:

BitCoin homepage:

http://www.bitcoin.org/

BitCoin GIT:

https://github.com/bitcoin/bitcoin

Or SourceForge page, you want to download the latest version and the src version to compile your self:

http://sourceforge.net/projects/bitcoin/files/Bitcoin/

I personally got mine from the SF page

To download and compile from SF, use wget, issue these commands:

# cd ~/Bitcoin/Trunk

# wget sf_link

# tar -xf bitcoin*

# cd bitcoin-0.3.23/src

Replace sf_link with your download link and 0.3.23 with the version you downloaded.

Create a new fille ~/Bitcoin/Trunk/makefi le.centos and add the lines as follows.

#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 [email protected] $<

cryptopp/obj/%.o: cryptopp/%.cpp

$(CXX) -c $(CXXFLAGS) -O3 -o [email protected] $<

bitcoin: $(OBJS) obj/ui.o obj/uibase.o

$(CXX) $(CXXFLAGS) -o [email protected] $(LIBPATHS) $^ $(WXLIBS) $(LIBS)

obj/nogui/%.o: %.cpp $(HEADERS)

$(CXX) -c $(CXXFLAGS) -o [email protected] $<

bitcoind: $(OBJSbj/%=obj/nogui/%)

$(CXX) $(CXXFLAGS) -o [email protected] $^ $(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

The spaces that you see are not spaces, they are TABS, one single tab to be exact since make is picky about this make sure you use tabs not spaces.

Change the Value DEPSDIR according to your Deps/ directory.

Finally, compile the sources in the ~/Bitcoin/Trunk directory. This also depends on where you extracted the files from the source file to and from, you want to be in the SRC directory if you downloaded from SF instead of GIT.

make -f makefile.centos bitcoind

Now for those of you with this error when you make:

cannot find -lgthread-2.0

You need to install glib2-devel, that is the LIB that contains gthread for CentOS, you can do this issueing this command as root or sudo:

yum install glib2-devel.i386

For that you might need the extras repositories from CentOS, you can find instructions on how to install the extra repos here:

http://wiki.centos.org/AdditionalResources/Repositories/RPMForge

Bitcoind在CentOS6.4安装参考

时间: 2024-10-08 11:06:35

Bitcoind在CentOS6.4安装参考的相关文章

如何在CentOS6上安装Python2.7和Python3.3

原文来自http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/,个人觉得对在linux安装新版本Python是很有参考意义,因而转载,原文是英文的,本人简单翻译下,大家看懂即可,有不妥的地方请留言. 如何在CentOS 6上同时安装Python 2.7和Python 3.3 本文将介绍如何在CentOS 6上安装Python 2.7和3.3.下面以Python 2.7.6和Python 3.3.5为例进行说明,但本人实

CentOS-6.5安装配置JDK-7

安装说明 系统环境:centos-6.5 安装方式:rpm安装 软件:jdk-7-linux-x64.rpm 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html 注:rpm,gz文件区别 初接解Linux的朋友一定对软件的安装特别头疼,同样都是for Linux,但RPM.tar.gz.DEB包还是有很大区别的,这种区别很有可能使你的安装过程进行不下去.那我

centos6.5安装和配置cobbler

Cobbler介绍 Cobbler 是一个系统启动服务(boot server),可以通过网络启动(PXE)的方式用来快速安装.重装物理服务器和虚拟机,支持安装不同的 Linux 发行版和 Windows.该工具使用python开发,小巧轻便(才15k行代码),使用简单的命令即可完成PXE网络安装环境的配置,同时还可以管理 DHCP,DNS,以及yum包镜像. Cobbler 使用命令行方式管理,也提供了基于 Web 的界面管理工具(cobbler-web),还提供了API接口,可以方便二次开发

CentOS-6.5安装配置Tomcat-7

https://my.oschina.net/u/593517/blog/304483 http://blog.csdn.net/lgh0824/article/details/51194116 摘要: CentOS-6.5安装配置Tomcat-7 安装说明 安装环境:CentOS-6.3安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz下载地址:http://tomcat.apache.org/download-70.cgi 安装前提 系统必须已经安装配置了JDK

Centos6.6安装之后调优

Centos6.6安装后优化方案 转至元数据结尾 创建: 王红立 于 九月 24, 2015 转至元数据起始 1.系统安装后,启动网卡.默认为DHCP方式获取IP.实际环境中需要更改为static.配置信息如下: DEVICE=eth0 #网卡设备名称 HWADDR=00:50:56:AF:11:2A#物理地址 TYPE=Ethernet #网络类型为以太网模式 UUID=cc82ce85-9098-4a34-b534-d7fb3e7dda27 #通用唯一识别码 ONBOOT=yes #是否启动

Centos6.4安装opennebula

Centos6.4安装opennebula #安装163源 http://mirrors.163.com/.help/CentOS6-Base-163.repo #安装epel源 wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm yum localinstall epel-* #验证查看是否安装成功: yum repolist #安装numpy(需要python-devel) 地址:h

CentOS6.5安装MySql、Apache、PHP

一.安装MySql 1.卸载CentOS自带的MySql 获取root权限先,卸载CentOS自带的MySql yum remove mysql 2.安装cmake 下载cmake wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz 安装 cd cmake-2.8.5 ./configure --prefix=/usr/local/cmake make make install 3.安装MySql 下载mysql.tar.gz包,这里用

初始saltstack在之CentOS6上安装Saltstack

系统环境: [[email protected]_server home]# ifconfig eth0 | grep "inet addr:" | awk -F: '{print $2}' | awk '{print $1}'     192.168.100.228     [[email protected]_server home]# cat /etc/redhat-release      CentOS release 6.3 (Final)     [[email prote

Centos6.5安装及简单配置nginx

Centos6.5安装及简单配置nginx 一.准备事项 (1) 因为nginx需要访问80端口所以请先关闭或者开放防火墙端口,和selinux. 参考命令 关闭防火墙: [[email protected] ~]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT [[email protected] ~]# service iptables save 关闭selinux: [[email protected] ~]# setenforce 0 [[e