修改apt源

  修改/etc/apt/sources.list,换来国内的163源,下载会越来越快和安居一些。

# vim /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

  再调用apt-get update更新index。

安装PoD

  官网(http://pod.gsi.de)下载源码,这里下载应用的是3.16本子的源码:pod.gsi.de/releases/pod/3.16/PoD-3.16-Source.tar.gz。借使总是失效,可自行检索。解压源码压缩包后,并跻身源码目录:

安装ROOT

  binary安装:https://root.cern.ch/content/release-60606。选拔相应的OS系统一编写译包。解压并将其移动至/opt目录下:

# tar zxvf root_v6.06.06.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
# mv root /opt

  再将ROOT相关布置写入开始化文件,这里在/etc/profile.d/root.sh末尾插手以下语句:

export ROOTSYS=/opt/root
export PATH=$PATH:$ROOTSYS/bin
source $ROOTSYS/bin/thisroot.sh

  source /etc/profile.d/root.sh让配置生效。运维命令root
-b测量试验root是还是不是能健康运作:

#root -b
root: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory

  贫乏libXpm库,运行apt-get install
libxpm4指令安装。安装时有望会唤起贫乏安装包,那和地点的源index有涉嫌,要求先向远端源同步后(运行apt-get
update命令),再设置xpm包。安装成功。

# apt-get install libxpm4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libxpm4
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 37.0 kB of archives.
……

  再一次运营root -b命令来测量试验,再一次报错。

# root -b
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
    echo | LC_ALL=C c++  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-missing-field-initializers  -fPIC -fvisibility-inlines-hidden -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-unused-local-typedefs -O2 -DNDEBUG -xc++ -E -v - 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | grep -E "(c|g)\+\+"
results in
results in
with exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include <new>

  贫乏C++的new包,那个报错极有希望是未安装c++引起的,因为ROOT及别的组件都以接纳C++编写的。由此需求安装gcc和gcc-c++。

# apt-get install gcc
……
# apt-get install g++
……

  运转root -b命令,终于不负职务,未报错。

-DWITH_BLACKHOLE_STORAGE_ENGINE=1\

安装XRootD

  安吹牛RootD有二种艺术,通过ROOT源码包中的本子安装,大概直接从官方网站下载源码安装。

配备绸缪

布署打算

cp support-files/mysql.server

安装cmake

  直接通过apt-get安装的cmake在安装ROOT组件时会出现难点,所以这里提出源码安装,作者这里运用的是2.8.8本子。官方网址下载地址:

- 解压:tar xvf cmake-2.8.8.tar.gz
- 进入解压目录:cd cmake-2.8.8
- ./bootstrap
- make
- make install

修改apt源

  修改/etc/apt/sources.list,换到国内的163源,下载会越来越快和牢固性一些。

# vim /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

  再调用apt-get update更新index。

组成ROOT集群

  运行pod-server
start,待其下载wn_bins目录后,若无出现谬误,会油然则生如下结果:

# pod-server start
Starting PoD server...
updating xproofd configuration file...
starting xproofd...
starting PoD agent...
preparing PoD worker package...
selecting pre-compiled bins to be added to worker package...
PoD worker package: /root/.PoD/wrk/PoDWorker.sh
------------------------
XPROOFD [1809] port: 21001
PoD agent [1848] port: 22002
PROOF connection string: root@mac00000102030a.hostname.com:21001

  使用上述全体办法,搭建多个服务器意况,进而搭建一套具备一个server和八个client的小集群。ROOT服务器之间又多样简报方式,这里,大家选取最轻便易行直接的ssh格局。首先,两台服务器需求树立ssh登入互信,进而完成ssh登陆免密码。搭建方法可知:。
  之后,选拔个中服务器A作为server,服务器B作为client(worker)。在server上,编辑/root/pod_ssh.cfg文件,内容如下:

@bash_begin@
    . /etc/profile.d/root.sh
@bash_end@

r1, root@109.105.115.249,,/tmp/test, 2

  前三行是ssh到client之后,需求举办的本子文件,这里就是在各client上进行下ROOT系统的参数配置,设置情形变量等。第五行则是探望client的布置,每种client都对应一行,因为大家这里唯有二个client,所以就唯有一行。这一行的格式是:

1

2

3

4

5

client独一识别符,不可重复

用户名@ip或者hostname

ssh参数,可认为空

client端工作目录

企望的client端worker个数,可以为空

  然后,在server端执行pod-ssh -c /root/pod_ssh.cfg submit
–debug来确立集群。呈现如下,则注脚server端成功:

# pod-ssh -c /root/pod_ssh.cfg submit --debug
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh config contains an inline shell script. It will be injected it into wrk. package
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   inline shell script is found and will be added to the package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   There are 5 threads in the tread-pool.
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PoD workers: 1
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PROOF workers: 2
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Workers list:
**  [Mon, 29 Aug 2016 10:40:18 +0800]   [r1] with 2 workers at root@109.105.115.249:/tmp/test/r1
r1  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh-submit-worker is started for root@109.105.115.249 (dir: /tmp/test/r1, nworkers: 2, sshopt: )
**  [Mon, 29 Aug 2016 10:40:19 +0800]   
*******************
Successfully processed tasks: 1
Failed tasks: 0
*******************

  我们再登陆client端,走入/root/pod_ssh.cfg中装置的client端专门的工作目录专业目录。

# ls
libboost_filesystem-mt.so.5       libpod_protocol.so       PoD.cfg            PoDWorker.sh                              proof.conf       user_worker_env.sh  xpd.log
libboost_program_options-mt.so.5  libproof_status_file.so  pod-user-defaults  pod-wrk-bin-3.16-Darwin-universal.tar.gz  server_info.cfg  version
libboost_system-mt.so.5           libSSHTunnel.so          PoDWorker.lock     pod-wrk-bin-3.16-Linux-amd64.tar.gz       ssh-tunnel       xpd.cf
libboost_thread-mt.so.5           pod-agent                PoDWorker.pid      pod-wrk-bin-3.16-Linux-x86.tar.gz         ssh_worker.log   xpd.cf.bup

  可知,都以一些库、配置文件和日志等。我们临时首要关切日志文件ssh_worker.log,日志末尾呈现如下,则意味完全成功:

***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start pod-agent (1 out of 3)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start and detect xproofd (1 out of 10)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       trying to use XPROOF port: 21002
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting xproofd...
***     [Mon, 29 Aug 2016 10:44:48 +0800]       xproofd is running. pid=[2794] port=[21002]
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting pod-agent...

安排意况变量:

PoD安装最终一步

  相关配置写入伊始化文件,这里能够承接步向/etc/profile.d/root.sh的最终:

source /root/PoD/3.16/PoD_env.sh

  source /etc/profile.d/root.sh让配置生效。运转pod-server
start,若是是首先次运维,会下载相关组件wn_bins目录到/root/PoD/3.16/bin/。假若服务器并未有访谈外网的权柄,能够行使设想机搭建以上全数手续,下载wn_bins目录。无论怎么OS,下载的wn_bins目录都以平等的,能够一向拷贝。

安装XRootD

  安夸口RootD有三种艺术,通过ROOT源码包中的本子安装,大概间接从官方网站下载源码安装。

修改apt源

  修改/etc/apt/sources.list,换来国内的163源,下载会更加快和稳固性一些。

# vim /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

  再调用apt-get update更新index。

[mysqld]

make命令

  运营make命令,又报错了。

/usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
     TIME_UTC=1

  这么些是boost1.5版本以下的多个固有bug,变量么命名重复了。修改起来非常的粗略,张开/usr/include/boost/thread/xtime.hpp,将23行和71行的TIME_UTC都修改为TIME_UTC_就可以,也正是说保险未有重命名。
  再一次运转make命令,再一次提示错误。

/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h:88:13: error: 'uint16_t' does not name a type
             uint16_t xpdPort() const

  看起来是编写翻译时不认知uint16_t这些别称,修改很简短,头文件包涵就可以。在/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h中的第19行加入#include
。具体插入的地点或许因PoD代码版本分歧而有一点点差别,但有C或然C++基础的人应有很轻易能找到适当的职位。
  再一次运营make命令,终于圆满通过。

组成ROOT集群

  运维pod-server
start,待其下载wn_bins目录后,若无出现错误,会现出如下结果:

# pod-server start
Starting PoD server...
updating xproofd configuration file...
starting xproofd...
starting PoD agent...
preparing PoD worker package...
selecting pre-compiled bins to be added to worker package...
PoD worker package: /root/.PoD/wrk/PoDWorker.sh
------------------------
XPROOFD [1809] port: 21001
PoD agent [1848] port: 22002
PROOF connection string: root@mac00000102030a.hostname.com:21001

  使用上述全体办法,搭建四个服务器碰到,从而搭建一套具备三个server和二个client的小集群。ROOT服务器之间又多样简报方式,这里,大家使用最简易直接的ssh方式。首先,两台服务器需求树立ssh登陆互信,进而完毕ssh登入免密码。搭建方法可知:。
  之后,选用当中服务器A作为server,服务器B作为client(worker)。在server上,编辑/root/pod_ssh.cfg文件,内容如下:

@bash_begin@
    . /etc/profile.d/root.sh
@bash_end@

r1, root@109.105.115.249,,/tmp/test, 2

  前三行是ssh到client之后,要求进行的本子文件,这里正是在各client上进行下ROOT系统的参数配置,设置意况变量等。第五行则是会见client的布署,每一个client都对应一行,因为我们这里独有二个client,所以就唯有一行。这一行的格式是:

1

2

3

4

5

client独一识别符,不可重复

用户名@ip或者hostname

ssh参数,可感到空

client端专门的学业目录

期望的client端worker个数,可认为空

  然后,在server端执行pod-ssh -c /root/pod_ssh.cfg submit
–debug来树立集群。展现如下,则表达server端成功:

# pod-ssh -c /root/pod_ssh.cfg submit --debug
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh config contains an inline shell script. It will be injected it into wrk. package
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   inline shell script is found and will be added to the package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   There are 5 threads in the tread-pool.
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PoD workers: 1
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PROOF workers: 2
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Workers list:
**  [Mon, 29 Aug 2016 10:40:18 +0800]   [r1] with 2 workers at root@109.105.115.249:/tmp/test/r1
r1  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh-submit-worker is started for root@109.105.115.249 (dir: /tmp/test/r1, nworkers: 2, sshopt: )
**  [Mon, 29 Aug 2016 10:40:19 +0800]   
*******************
Successfully processed tasks: 1
Failed tasks: 0
*******************

  我们再登入client端,步向/root/pod_ssh.cfg中安装的client端职业目录专门的学问目录。

# ls
libboost_filesystem-mt.so.5       libpod_protocol.so       PoD.cfg            PoDWorker.sh                              proof.conf       user_worker_env.sh  xpd.log
libboost_program_options-mt.so.5  libproof_status_file.so  pod-user-defaults  pod-wrk-bin-3.16-Darwin-universal.tar.gz  server_info.cfg  version
libboost_system-mt.so.5           libSSHTunnel.so          PoDWorker.lock     pod-wrk-bin-3.16-Linux-amd64.tar.gz       ssh-tunnel       xpd.cf
libboost_thread-mt.so.5           pod-agent                PoDWorker.pid      pod-wrk-bin-3.16-Linux-x86.tar.gz         ssh_worker.log   xpd.cf.bup

  可知,都是一对库、配置文件和日志等。我们前段时间首要关切日志文件ssh_worker.log,日志末尾突显如下,则意味着完全成功:

***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start pod-agent (1 out of 3)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start and detect xproofd (1 out of 10)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       trying to use XPROOF port: 21002
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting xproofd...
***     [Mon, 29 Aug 2016 10:44:48 +0800]       xproofd is running. pid=[2794] port=[21002]
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting pod-agent...

make install命令

  该命令运营无别的报错。假诺无钦命陈设,PoD会棉被服装置在用户目录的Pod目录下,如本身以root用户安装,则设置在/root/PoD目录下。

mysql>use mysql;

在此以前尝试在CentOS7上配置ROOT集群,却开采无论是源码包安装,仍然官方提供的二进制包,都不够了重大的xproofd可实践文件,导致PoD不能够运作。没法,只好尝试在别的OS上安顿,这里笔者选拔了Ubuntu
14.04

事先尝试在CentOS7上配置ROOT集群,却发掘无论是源码包安装,如故官方提供的二进制包,都干枯了首要的xproofd可实施文件,导致PoD无法运营。未有章程,只好尝试在别的OS上安排,这里小编选取了Ubuntu14.04

源码安说大话RootD:

  解压后并步向源码目录:

# mkdir build; cd build
# cmake /root/xrootd-3.3.0 -DCMAKE_INSTALL_PREFIX=/opt/xrootd
# make
# make install

  如若完全成功,则足以相关安顿写入发轫化文件,这里能够继续进入/etc/profile.d/root.sh的末梢:

source $ROOTSYS/bin/setxrd.sh /opt/xrootd/

socket=/tmp/mysql.sock

安装PoD

  官网(

make install命令

  该命令运维无另外报错。假如无指定安插,PoD会被设置在用户目录的Pod目录下,如作者以root用户设置,则设置在/root/PoD目录下。

部署ROOT集群

:wq!

cmake命令

mkdir build
cd build
cmake -C ../BuildSetup.cmake ..

  运转cmake时,提示缺乏boost库,这里必要安装boost库。

apt-get install libboost-dev

  安装后一而再运转上述的cmake命令,如故报错,提醒贫乏以下库:

  The following Boost libraries could not be found:

          boost_thread
          boost_program_options
          boost_filesystem
          boost_system
          boost_unit_test_framework

  有个小tips:那几个库直接行使apt-get install
+库名的秘籍是不成功的,因为安装包和这几个名号并不完全相配,这里能够用apt-cache
search的措施来搜寻安装包的名目再设置,以boost_thread为例。

# apt-cache search boost | grep thread
libboost-thread-dev - portable C++ multi-threading (default version)
libboost-thread1.46-dev - portable C++ multi-threading
libboost-thread1.46.1 - portable C++ multi-threading
libboost-thread1.48-dev - portable C++ multi-threading
libboost-thread1.48.0 - portable C++ multi-threading

  依据那几个指示,我就足以一贯设置apt-get install
libboost-thread-dev就可以。以下:

apt-get install libboost-thread-dev
apt-get install libboost-program-options-dev
apt-get install libboost-filesystem-dev
apt-get install libboost-system-dev
apt-get install libboost-test-dev

  再接着运转cmake -C ../BuildSetup.cmake ..命令,终于不负职务。

make命令

  运转make命令,又报错了。

/usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
     TIME_UTC=1

  这一个是boost1.5本子以下的一个固有bug,变量么命名重复了。修改起来很简短,张开/usr/include/boost/thread/xtime.hpp,将23行和71行的TIME_UTC都修改为TIME_UTC_就可以,也正是说保障未有重命名。
  再一次运转make命令,再一次提示错误。

/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h:88:13: error: 'uint16_t' does not name a type
             uint16_t xpdPort() const

  看起来是编写翻译时不认知uint16_t这么些别称,修改极粗略,头文件包罗就能够。在/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h中的第19行加入#include
。具体插入的职位大概因PoD代码版本不相同而略带距离,但有C只怕C++基础的人应当很轻易能找到合适的岗位。
  再度运维make命令,终于圆满通过。

安装cmake

  直接通过apt-get安装的cmake在设置ROOT组件时会出现难点,所以那边建议源码安装,作者这里运用的是2.8.8版本。官方网站下载地址:https://cmake.org/files/,可挑选本身适合的本子。

- 解压:tar xvf cmake-2.8.8.tar.gz
- 进入解压目录:cd cmake-2.8.8
- ./bootstrap
- make
- make install

cp support-files/my-default.cnf /etc/my.cnf

源码安说大话RootD:

  解压后并跻身源码目录:

# mkdir build; cd build
# cmake /root/xrootd-3.3.0 -DCMAKE_INSTALL_PREFIX=/opt/xrootd
# make
# make install

  如若完全成功,则能够相关配置写入起头化文件,这里可以延续步入/etc/profile.d/root.sh的结尾:

source $ROOTSYS/bin/setxrd.sh /opt/xrootd/

PoD安装最终一步

  相关配置写入起首化文件,这里能够三翻五次加盟/etc/profile.d/root.sh的末尾:

source /root/PoD/3.16/PoD_env.sh

  source /etc/profile.d/root.sh让配置生效。运转pod-server
start,假设是首先次运维,会下载相关组件wn_bins目录到/root/PoD/3.16/bin/。倘使服务器并未有访问外网的权柄,能够使用设想机搭建以上全体手续,下载wn_bins目录。无论什么样OS,下载的wn_bins目录都是一样的,能够直接拷贝。

安装PoD

  官网(http://pod.gsi.de)下载源码,这里下载使用的是3.16版本的源码:pod.gsi.de/releases/pod/3.16/PoD-3.16-Source.tar.gz。假若老是失效,可自行检索。解压源码压缩包后,并步入源码目录:

update mysql.user set authentication_string=password(‘123456′) where
user=’root’ and Host = ‘localhost’;

其他库

apt-get install procmail

部署ROOT集群

PoD安装最终一步

  相关配置写入伊始化文件,这里能够持续投入/etc/profile.d/root.sh的结尾:

source /root/PoD/3.16/PoD_env.sh

  source /etc/profile.d/root.sh让配置生效。运营pod-server
start,借使是首先次运行,会下载相关组件wn_bins目录到/root/PoD/3.16/bin/。假如服务器并没有访谈外网的权限,能够利用设想机搭建以上全数手续,下载wn_bins目录。无论怎么OS,下载的wn_bins目录都以一律的,可以直接拷贝。

chkconfig mysqld on

make install命令

  该命令运维无任何报错。若是无钦赐陈设,PoD会被安装在用户目录的Pod目录下,如本人以root用户安装,则设置在/root/PoD目录下。

安装gcc,g++

  如若系统已经安装gcc和g++,可跳过此步骤。

# apt-get install gcc
# apt-get install g++

安装XRootD

  安吹牛RootD有三种办法,通过ROOT源码包中的脚本安装,恐怕直接从官方网址下载源码安装。

-DSYSCONFDIR=/etc\

安装zlib库

  github上(

  • 解压:unzip zlib-1.2.3.zip
  • 走入解压目录:cd zlib-1.2.3
  • ./configure
    留心:在make之前,要求修改Makefile,不然调用库时会出现谬误。找到
    CFLAGS=-O3 -DUSE_MMAP这一行,在后头参预-fPIC,即造成CFLAGS=-O3
    -DUSE_MMAP -fPIC
  • make
  • make install

安装cmake

  直接通过apt-get安装的cmake在安装ROOT组件时会出现难题,所以这里提议源码安装,作者这里运用的是2.8.8本子。官方网站下载地址:https://cmake.org/files/,可挑选本身适合的本子。

- 解压:tar xvf cmake-2.8.8.tar.gz
- 进入解压目录:cd cmake-2.8.8
- ./bootstrap
- make
- make install

make命令

  运维make命令,又报错了。

/usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
     TIME_UTC=1

  那个是boost1.5版本以下的一个固有bug,变量么命名重复了。修改起来很简短,张开/usr/include/boost/thread/xtime.hpp,将23行和71行的TIME_UTC都修改为TIME_UTC_就可以,也正是说保证未有重命名。
  再度运维make命令,再一次提示错误。

/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h:88:13: error: 'uint16_t' does not name a type
             uint16_t xpdPort() const

  看起来是编写翻译时不认知uint16_t那么些别称,修改不会细小略,头文件富含就可以。在/root/PoD-3.16-Source/app/MiscCommon/proof_status_file/ProofStatusFile.h中的第19行加入#include
。具体插入的职责可能因PoD代码版本不相同而有个别异样,但有C可能C++基础的人应当很轻易能找到合适的岗位。
  再一次运转make命令,终于圆满通过。

[client]

部署ROOT集群

安装zlib库

  github上(https://github.com/madler/zlib)可下载对应的zlib库,小编使用的是1.2.3本子,下载地址为:https://github.com/madler/zlib/archive/v1.2.3.zip

  • 解压:unzip zlib-1.2.3.zip
  • 步向解压目录:cd zlib-1.2.3
  • ./configure
    在意:在make之前,须要修改Makefile,不然调用库时会出现谬误。找到
    CFLAGS=-O3 -DUSE_MMAP这一行,在后头参与-fPIC,即造成CFLAGS=-O3
    -DUSE_MMAP -fPIC
  • make
  • make install

此前尝试在CentOS7上配备ROOT集群,却发掘无论是源码包安装,仍然官方提供的二进制包,都贫乏了第一的xproofd可施行文件,导致PoD不能够运作。没法,只可以尝试在其余OS上陈设,这里笔者选用了Ubuntu14.04

export BOOST_ROOT BOOST_INCLUDE BOOST_LIB

组成ROOT集群

  运营pod-server
start,待其下载wn_bins目录后,若无出现谬误,会产出如下结果:

# pod-server start
Starting PoD server...
updating xproofd configuration file...
starting xproofd...
starting PoD agent...
preparing PoD worker package...
selecting pre-compiled bins to be added to worker package...
PoD worker package: /root/.PoD/wrk/PoDWorker.sh
------------------------
XPROOFD [1809] port: 21001
PoD agent [1848] port: 22002
PROOF connection string: root@mac00000102030a.hostname.com:21001

  使用上述全体办法,搭建八个服务器蒙受,进而搭建一套具备二个server和二个client的小集群。ROOT服务器之间又两种简报格局,这里,大家使用最简易直接的ssh形式。首先,两台服务器供给树立ssh登入互信,进而达成ssh登陆免密码。搭建方法可见:

动用SSH公钥密钥自动登入Linux服务器
http://www.linuxidc.com/Linux/2017-02/140642.htm

集群意况SSH免密码登陆设置
http://www.linuxidc.com/Linux/2017-03/141296.htm

  之后,选拔之中服务器A作为server,服务器B作为client(worker)。在server上,编辑/root/pod_ssh.cfg文件,内容如下:

@bash_begin@
    . /etc/profile.d/root.sh
@bash_end@

r1, root@109.105.115.249,,/tmp/test, 2

  前三行是ssh到client之后,要求实践的剧本文件,这里正是在各client上实行下ROOT系统的参数配置,设置碰着变量等。第五行则是访谈client的配备,每种client都对应一行,因为我们那边独有三个client,所以就独有一行。这一行的格式是:

1 2 3 4 5
client唯一识别符,不可重复 用户名@ip或者hostname ssh参数,可以为空 client端工作目录 期望的client端worker个数,可以为空

  然后,在server端执行pod-ssh -c /root/pod_ssh.cfg submit
–debug来树立集群。呈现如下,则证实server端成功:

# pod-ssh -c /root/pod_ssh.cfg submit --debug
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh config contains an inline shell script. It will be injected it into wrk. package
**  [Mon, 29 Aug 2016 10:40:18 +0800]   preparing PoD worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   inline shell script is found and will be added to the package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   selecting pre-compiled bins to be added to worker package...
**  [Mon, 29 Aug 2016 10:40:18 +0800]   PoD worker package: /root/.PoD/wrk/PoDWorker.sh
**  [Mon, 29 Aug 2016 10:40:18 +0800]   There are 5 threads in the tread-pool.
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PoD workers: 1
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Number of PROOF workers: 2
**  [Mon, 29 Aug 2016 10:40:18 +0800]   Workers list:
**  [Mon, 29 Aug 2016 10:40:18 +0800]   [r1] with 2 workers at root@109.105.115.249:/tmp/test/r1
r1  [Mon, 29 Aug 2016 10:40:18 +0800]   pod-ssh-submit-worker is started for root@109.105.115.249 (dir: /tmp/test/r1, nworkers: 2, sshopt: )
**  [Mon, 29 Aug 2016 10:40:19 +0800]   
*******************
Successfully processed tasks: 1
Failed tasks: 0
*******************

  大家再登录client端,走入/root/pod_ssh.cfg中装置的client端专门的学问目录专门的工作目录。

# ls
libboost_filesystem-mt.so.5       libpod_protocol.so       PoD.cfg            PoDWorker.sh                              proof.conf       user_worker_env.sh  xpd.log
libboost_program_options-mt.so.5  libproof_status_file.so  pod-user-defaults  pod-wrk-bin-3.16-Darwin-universal.tar.gz  server_info.cfg  version
libboost_system-mt.so.5           libSSHTunnel.so          PoDWorker.lock     pod-wrk-bin-3.16-Linux-amd64.tar.gz       ssh-tunnel       xpd.cf
libboost_thread-mt.so.5           pod-agent                PoDWorker.pid      pod-wrk-bin-3.16-Linux-x86.tar.gz         ssh_worker.log   xpd.cf.bup

  可知,都是有个别库、配置文件和日志等。大家有的时候首要关切日志文件ssh_worker.log,日志末尾展现如下,则意味着完全成功:

***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start pod-agent (1 out of 3)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       Attempt to start and detect xproofd (1 out of 10)
***     [Mon, 29 Aug 2016 10:44:48 +0800]       trying to use XPROOF port: 21002
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting xproofd...
***     [Mon, 29 Aug 2016 10:44:48 +0800]       xproofd is running. pid=[2794] port=[21002]
***     [Mon, 29 Aug 2016 10:44:48 +0800]       starting pod-agent...

 

威尼斯人网上赌场 1

源码安装BRootD:

  解压后并步向源码目录:

# mkdir build; cd build
# cmake /root/xrootd-3.3.0 -DCMAKE_INSTALL_PREFIX=/opt/xrootd
# make
# make install

  假如完全成功,则足以相关配置写入开始化文件,这里能够一连投入/etc/profile.d/root.sh的结尾:

source $ROOTSYS/bin/setxrd.sh /opt/xrootd/

安装zlib库

  github上(https://github.com/madler/zlib)可下载对应的zlib库,作者使用的是1.2.3本子,下载地址为:https://github.com/madler/zlib/archive/v1.2.3.zip

  • 解压:unzip zlib-1.2.3.zip
  • 踏向解压目录:cd zlib-1.2.3
  • ./configure
    留意:在make在此以前,须要修改Makefile,不然调用库时会出现谬误。找到
    CFLAGS=-O3 -DUSE_MMAP这一行,在前面插足-fPIC,即造成CFLAGS=-O3
    -DUSE_MMAP -fPIC
  • make
  • make install

7、启用远程连接:

安装ROOT

  binary安装:
。选拔相应的OS系统一编写译包。解压并将其运动至/opt目录下:

# tar zxvf root_v6.06.06.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
# mv root /opt

  再将ROOT相关配置写入初步化文件,这里在/etc/profile.d/root.sh末尾参预以下语句:

export ROOTSYS=/opt/root
export PATH=$PATH:$ROOTSYS/bin
source $ROOTSYS/bin/thisroot.sh

  source /etc/profile.d/root.sh让配置生效。运维命令root
-b测量检验root是还是不是能健康运维:

#root -b
root: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory

  贫乏libXpm库,运营apt-get install
libxpm4限令安装。安装时有一点都不小大概会提示缺少安装包,那和本地的源index有涉及,须求先向远端源同步后(运营apt-get
update命令),再安装xpm包。安装成功。

# apt-get install libxpm4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libxpm4
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 37.0 kB of archives.
……

  再一次运营root -b命令来测验,再度报错。

# root -b
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
    echo | LC_ALL=C c++  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-missing-field-initializers  -fPIC -fvisibility-inlines-hidden -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-unused-local-typedefs -O2 -DNDEBUG -xc++ -E -v - 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | grep -E "(c|g)\+\+"
results in
results in
with exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include <new>

  贫乏C++的new包,那么些报错极有希望是未安装c++引起的,因为ROOT及别的组件都是应用C++编写的。由此需求安装gcc和gcc-c++。

# apt-get install gcc
……
# apt-get install g++
……

  运转root -b命令,终于不负职分,未报错。

cmake命令

mkdir build
cd build
cmake -C ../BuildSetup.cmake ..

  运转cmake时,提醒紧缺boost库,这里需求安装boost库。

apt-get install libboost-dev

  安装后接二连三运转上述的cmake命令,仍然报错,提示缺少以下库:

  The following Boost libraries could not be found:

          boost_thread
          boost_program_options
          boost_filesystem
          boost_system
          boost_unit_test_framework

  有个小tips:这么些库直接利用apt-get install
+库名的措施是不成事的,因为安装包和那些称号并不完全匹配,这里能够用apt-cache
search的不二等秘书技来查找安装包的称号再安装,以boost_thread为例。

# apt-cache search boost | grep thread
libboost-thread-dev - portable C++ multi-threading (default version)
libboost-thread1.46-dev - portable C++ multi-threading
libboost-thread1.46.1 - portable C++ multi-threading
libboost-thread1.48-dev - portable C++ multi-threading
libboost-thread1.48.0 - portable C++ multi-threading

  依照那些提醒,笔者就可以直接设置apt-get install
libboost-thread-dev就能够。以下:

apt-get install libboost-thread-dev
apt-get install libboost-program-options-dev
apt-get install libboost-filesystem-dev
apt-get install libboost-system-dev
apt-get install libboost-test-dev

  再跟着运维cmake -C ../BuildSetup.cmake ..命令,终于成功。

经过ROOT源码包中的脚本安装BRootD

  进入ROOT源码包目录,施行以下语句就可以:

./build/unix/installXrootd.sh -v 3.0.0 /opt

2、增添mysql用户和组:

安装gcc,g++

  如若系统现已设置gcc和g++,可跳过此步骤。

# apt-get install gcc
# apt-get install g++

其他库

apt-get install procmail

其他库

apt-get install procmail

#保存退出

布局希图

由此ROOT源码包中的本子安装逼RootD

  步入ROOT源码包目录,实行以下语句就可以:

./build/unix/installXrootd.sh -v 3.0.0 /opt

安装gcc,g++

  假诺系统现已设置gcc和g++,可跳过此步骤。

# apt-get install gcc
# apt-get install g++

chmod +x /etc/init.d/mysqld

因而ROOT源码包中的本子安夸口RootD

  步入ROOT源码包目录,推行以下语句就能够:

./build/unix/installXrootd.sh -v 3.0.0 /opt

安装ROOT

  binary安装:https://root.cern.ch/content/release-60606。接纳相应的OS系统一编写译包。解压并将其移动至/opt目录下:

# tar zxvf root_v6.06.06.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
# mv root /opt

  再将ROOT相关安排写入开头化文件,这里在/etc/profile.d/root.sh末尾参加以下语句:

export ROOTSYS=/opt/root
export PATH=$PATH:$ROOTSYS/bin
source $ROOTSYS/bin/thisroot.sh

  source /etc/profile.d/root.sh让配置生效。运转命令root
-b测验root是还是不是能健康运营:

#root -b
root: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory

  缺乏libXpm库,运转apt-get install
libxpm4限令安装。安装时有不小希望会提示缺乏安装包,那和本地的源index有涉及,必要先向远端源同步后(运营apt-get
update命令),再安装xpm包。安装成功。

# apt-get install libxpm4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libxpm4
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 37.0 kB of archives.
……

  再度运营root -b命令来测量试验,再度报错。

# root -b
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
    echo | LC_ALL=C c++  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-missing-field-initializers  -fPIC -fvisibility-inlines-hidden -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-unused-local-typedefs -O2 -DNDEBUG -xc++ -E -v - 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | grep -E "(c|g)\+\+"
results in
results in
with exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include <new>

  贫乏C++的new包,那几个报错极有异常的大希望是未安装c++引起的,因为ROOT及其他组件都以运用C++编写的。因而须求安装gcc和gcc-c++。

# apt-get install gcc
……
# apt-get install g++
……

  运转root -b命令,终于不负职责,未报错。

cmake命令

mkdir build
cd build
cmake -C ../BuildSetup.cmake ..

  运维cmake时,提醒贫乏boost库,这里须求安装boost库。

apt-get install libboost-dev

  安装后继续运转上述的cmake命令,依然报错,提醒贫乏以下库:

  The following Boost libraries could not be found:

          boost_thread
          boost_program_options
          boost_filesystem
          boost_system
          boost_unit_test_framework

  有个小tips:那几个库直接采纳apt-get install
+库名的格局是不成事的,因为安装包和这么些名号并不完全相配,这里能够用apt-cache
search的法子来查找安装包的称谓再设置,以boost_thread为例。

# apt-cache search boost | grep thread
libboost-thread-dev - portable C++ multi-threading (default version)
libboost-thread1.46-dev - portable C++ multi-threading
libboost-thread1.46.1 - portable C++ multi-threading
libboost-thread1.48-dev - portable C++ multi-threading
libboost-thread1.48.0 - portable C++ multi-threading

  依据这几个提示,我就足以一向设置apt-get install
libboost-thread-dev就能够。以下:

apt-get install libboost-thread-dev
apt-get install libboost-program-options-dev
apt-get install libboost-filesystem-dev
apt-get install libboost-system-dev
apt-get install libboost-test-dev

  再接着运转cmake -C ../BuildSetup.cmake ..命令,终于不负职责。

:wq!

-DWITH_PARTITION_STORAGE_ENGINE=1\

-DWITH_ARCHIVE_STORAGE_ENGINE=1\

vi

port=3306

-DWITH_INNOBASE_STORAGE_ENGINE=1\

vim /etc/profile

–basedir=/usr/local/mysql

二、安装cmake(因为mysql5.7的编写翻译由cmake来达成)

port=3306

default-character-set=utf8

unzip boost_1_59_0.zip

bind-address=localhost

–datadir=/mydata/data        # Before MySQL

wget

–basedir=/usr/local/mysql  –datadir=/usr/local/mysql/data

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注