Ubuntu 9.10安装Globus Toolkit 4.2.1(-all-source-installer.tar.gz)

蒋文光
2023-12-01

 

蓝色部分为必须,粉红色为可选,棕色为root账户执行的命令,红色为globus用户执行的命令

²        C编译器(包含C++编译器)apt-get install g++

²        Openssl 0.9.7+ (ubuntu没有包含开发部分libssl-dev取代) apt-get install libssl-dev

²        GUN tar(系统自带)

²        GUN make(系统自带)

²        GUN sed(系统自带)

²        Zlib 1.1.4+(系统自带)

²        GPT-3.2 autotools2004(完整版安装不需要,globus安装包已经包含)

²        JDKjdk-1_6_0_15-linux-i586.bin

²        Ant: apache-ant-1.8.0-bin.tar.gz

²        Postgresql: postgresql-8.1.11.tar.gz(如不需要gridFTP,无需安装)

²        Globus toolkit 4.2: gt4.2.1-all-source-installer.tar.gz

1.支持软件的安装

1.1 安装c++编译器

root@localhost# apt-get install g++

 

1.2 安装libssl-dev

root@localhost#apt-get install libssl-dev

 

1.3 安装JDK

root@localhost# ./jdk-1_6_0_15-linux-i586.bin

root@localhost# vi /etc/profile

export JAVA_HOME=/usr/local/jdk安装目录

export PATH=$JAVA_HOME/bin:$PATH

:wq

root@localhost# source /etc/profile

root@localhost# java -version

 

1.4 安装Ant

 

root@localhost grid_tool# tar zxvf apache-ant-1.8.0-bin.tar.gz

root@localhost grid_tool# vi /etc/profile

export ANT_HOME=/usr/local/ant安装目录

export PATH=$ANT_HOME/bin:$PATH

:wq

root@localhost grid_tool# source /etc/profile

root@localhost grid_tool# ant -version

 

 2. 安装GT4

2.1 创建globus用户,创建/usr/local/globus目录,赋予权限:

root@localhost local# adduser globus

root@localhost local# mkdir /usr/local/globus

root@localhost local# chown globus:globus /usr/local/globus

 

2.2 将二进制包复制到/usr/local下,解压安装:

root@localhost root# cd  /usr/local

root@localhost local # tar zxvf gt4.2.1-all-source-installer.tar.gz

  2.3 设置环境变量和编译目录

root@localhost local# vi /etc/profile

在配置文件中添加:

GLOBUS_LOCATION=/usr/local/globus-4.0

PATH=$GLOBUS_LOCATION/bin:$PATH

export GLOBUS_LOCATION  PATH

:wq

 

root@localhost local# source /etc/profile

root@localhost local# cd gt4.2.1-all-source-installer

root@localhost local# sudo su - globus

globus @localhost gt4.2.1-all-source-installer# ./configure --prefix=$GLOBUS_LOCATION

 

2.4 编译

globus @localhost gt4.2.1-all-source-installer# make

globus @localhost gt4.2.1-all-source-installer# make install

 

2.5 测试

globus@localhost gt4.2.1-all-source-installer# globus-version

 

3. SimpleCA的安装与配置

3.1安装SimpleCA

3.1.1 设置环境变量

root@localhost root# vi /etc/profile

在配置文件中添加:

export GPT_LOCATION=/usr/local/globus-4.0

export PATH=$GPT_LOCATION/bin:$PATH

root@localhost root# source /etc/profile

3.1.2 simpleCA安装:

root@localhost root# chown -R globus:globus /usr/local/globus

root@localhost root# sudo su - globus

globus@localhost# source $GLOBUS_LOCATION/etc/globus-user-env.csh

globus@localhost# $GLOBUS_LOCATION/setup/globus/setup-simple-ca

 

 

Certificate Authority Setup

………………………………………………………………………………………

………………………………………………………………………………………

/usr/local/globus-4.0/setup/globus_simple_ca_c7881362_setup/setup-gsi

Setup-ssl-utils: Complete

Enter PEM pass phrase:globus

 

3.1.3 root安装GSI

globus@localhostexit

root@localhost local# source /etc/profile

root@localhost local#

$GLOBUS_LOCATION/setup/globus_simple_ca_c7881362_setup/setup-gsi -default

Setup-gsi : Complete

3.2 host证书

3.2.1 更改计算机名称

注意:不同的linux系统可能会有所不同,建议百度查一下具体的计算机名称的修改方式

root@localhost local# vi /etc/sysconfig/network

HOSTNAME=localhost 改为HOSTNAME=abc,保存并退出;

root@localhost local# source /etc/sysconfig/network

root@localhost local# vi /etc/hosts

添加(格式:”IP 域 计算机名称”)

    211.80.198.183   abc  abc

保存退出,重新启动linux

3.2.2 root用户申请证书

root@abc root# grid-cert-request host abc

……………………………………………………………………………………

The request is stored in /etc/grid-security/hostcert_request.pem

……………………………………………………………………………………

 

3.2.3 globus用户签发host证书

globus@abc globus# grid-ca-sign -in /etc/grid-security/hostcert_request.pem -out hostsigned.pem

 

To sign the request

Please enter the password for the CA key: globus

The new signed certificate is at /home/globus/.globus/simpleCA//

newcerts/01.pem

 

3.2.4 root用户复制该证书

root@abc root# cp /home/globus/.globus/simpleCA//newcerts/01.pem /etc/grid-security/hostcert.pem

   

4. 授权

4.1使容器可以访问证书

       通过上述方法获得证书的host key文件(/etc/grid-security/hostkey.pem)对于root用户使只读的。而此时容器会以非root用户身份运行(globus用户)。为了让容器也可以访问证书,必须使用root账号登录并做如下改动:

root@abc root# cd /etc/grid-security

root@abc grid-security# cp hostkey.pem containerkey.pem

root@abc grid-security# cp hostcert.pem containercert.pem

root@abc grid-security# chown globus:globus containerkey.pem containercert.pem                      

root@abc grid-security# ls -l *.pem

执行结束后,/etc/grid-security目录看起来像下面这样:

-rw-r--r-- 1 globus globus 1785 Oct 14 14:47 containercert.pem

-r-------- 1 globus globus 887 Oct 14 14:47 containerkey.pem

-rw-r--r-- 1 root root 1785 Oct 14 14:42 hostcert.pem

-r-------- 1 root root 887 Sep 29 09:59 hostkey.pem

4.2 配置grid-mapfile

root用户登录,创建/etc/grid-security/grid-mapfile文件

 

结果grid-mapfile文件格式应该如下所示:

 

"/O=Grid/OU=GlobusTest/OU=simpleCA-mayed.mcs.anl.gov/OU=mcs.anl.gov/CN=Charles Bacon" bacon

注:主体名两侧的双引号是必须的,因为这样可以忽略其中包含的空格。

5. 启动容器

globus@abc globus# globus-start-containers

 

 类似资料: