远程协助
当前位置:重庆拓磊计算机运营维护中心 > 文档中心 > 服务器 >
标题:UBUNTU14.04安装ROOT集群的配置    日期:2019-03-01


之前尝试在CentOS7上部署ROOT集群,却发现无论是源码包安装,还是官方提供的二进制包,都缺少了关键的xproofd可执行文件,导致PoD不能运行。没有办法,只能尝试在其他OS上部署,这里我选择了Ubuntu14.04。

部署准备
修改apt源
  修改/etc/apt/sources.list,换成国内的163源,下载会更快和稳定一些。

# vim /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
  再调用apt-get update更新index。

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

# apt-get install gcc
# apt-get install g++
安装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
安装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

其他库
apt-get install procmail

部署ROOT集群
安装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 results in
results in
with exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include
  缺少C++的new包,这个报错极有可能是未安装c++引起的,因为ROOT及其它组件都是使用C++编写的。因此需要安装gcc和gcc-c++。

# apt-get install gcc
……
# apt-get install g++
……
  运行root -b命令,终于成功,未报错。

安装XRootD
  安装XRootD有两种方法,通过ROOT源码包中的脚本安装,或者直接从官网下载源码安装。

通过ROOT源码包中的脚本安装XRootD
  进入ROOT源码包目录,执行以下语句即可:

./build/unix/installXrootd.sh -v 3.0.0 /opt
源码安装XRootD:
  解压后并进入源码目录:

下一篇:Ubuntu系统给用户添加sudo权限的方法

联系我们
  • 客服热线:023-63522929(7 x 24h)
  • 在线客服:
  • 微信公众号 官方微博