网格试验1Linux下安装Globus Toolkit 4.0<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

安装前准备工作

操作系统:RedHat Linux 9.03

支持软件包:

JDK jdk-1_5_0_15-linux-i586.bin ;

Ant: apache-ant-<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />1.7.0-bin.tar.bz2;

Postgresql: postgresql-8.1.11.tar.gz;

Globus toolkit 4.0: gt4.0.0-ia32-redjat9-binary-installer.tar.gz;

注意 :使用不同发行版本的Linux在安装细节上会有所不同,因此使用其他Linux发行版本安装GT4的请参考其他安装文档。GT4对支持的软件包的版本要求严格,请在安装前务必确认支持软件包的版本。 Redhat Linux 安装请选择完整的软件包安装,省去以后添加软件包的过程。

1. 支持软件的安装

1.1 安装JDK

1.1.1 在进行安装之前,将所需的支持软件包全部存放在/usr/local/grid_tool的文件目录中:

root@localhost root# cd /usr/local/grid_tool 

root@localhost grid_tool# ls                                                                     

apache-ant-1.7.0-bin.tar.bz2       jdk-1_5_0_15-linux-i586.bin      

gt4.0.0-ia32-redhat9-binary-intaller.tar.gz  postgresql-8.1.11.tar.gz

 

1.1.2 安装 jdk

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

Do you agree to the above license terms ? [yes or no] yes

Unpacking………………………………………………………………

Done.

 

1.1.3 执行完jdk安装后,会在/usr/local/grid_tool目录中生成jdk1.5.0_15jdk文件目录,将此目录复制到/usr/j2sdk中:

root@localhost grid_tool# mv jdk1.5.0_15  /usr/j2sdk

 

1.1.4 编辑配置文件,设置环境变量

root@localhost grid_tool# vi /etc/profile

 

打开配置文件,并在文件最后添加:

JAVA_HOME=/usr/j2sdk

PATH=$JAVA_HOME/bin:$PATH

export JAVA_HOME  PATH

注意 :关于vi编辑器的使用请参考其他文档。

 

1.1.5 保存并且退出,执行source命令使配置生效:

root@localhost grid_tool# source /etc/profile

 

1.1.6 检测java安装是否完成:

root@localhost grid_tool# java –version

Java version “1.5.0_15”

Java™ 2 Runtime Enviroment, Standard Edition (build 1.5.0_15-b04)

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

显示java版本信息,说明java安装完成。

 
1.2 安装apache-ant

1.2.1 解压apache-ant的压缩软件包:

root@localhost grid_tool# tar jxvf apache-ant-1.7.0-bin.tar.bz2

 

1.2.2 解压后在grid_tool目录下生成文件目录apache-ant-1.7.0,将此目录复制到/usr/apache-ant下:

root@localhost grid_tool# mv apache-ant-1.7.0  /usr/apache-ant

 

1.2.3 编辑配置文件,设置环境变量

root@localhost grid_tool# vi /etc/profile

打开配置文件,并在文件最后添加:

ANT_HOME=/usr/apache-ant

PATH=$ANT_HOME/bin:$PATH

export ANT_HOME  PATH

 

1.2.4 保存并且退出,执行source命令使配置生效:

root@localhost grid_tool# source /etc/profile

 

1.2.5 测试ANT安装是否完成:

root@localhost grid_tool# ant -version

Apache Ant version 1.7.0 compiled on December 13 2006

 

显示Ant版本信息,说明Ant安装完成。

 

1.3 安装postgresql

1.3.1 postgresql安装包复制到/usr/local/src中,并且解压安装:

root@localhost grid_tool#mv postgresql-8.1.11.tar.gz /usr/local/src

 

进入/usr/local/src目录中进行解压:

root@localhost grid_tool# cd /usr/local/src

root@localhost src# tar zxvf postgresql-8.1.11.tar.gz

 

1.3.2 解压完成后在此目录下生成postgresql-8.1.11,进入此目录中,设置配置文件:

root@localhost src # cd postgresql-8.1.11

root@localhost postgresql-8.1.11

# ./configure  - - prefix=/usr/local/pgsql

 

1.3.3 编译

root@localhost postgresql-8.1.11 # make

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

All of PostgreSQL successfully make. Ready to install     

 

root@localhost postgresql-8.1.11# make install

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

PostgreSQL installation complete                          

 

1.3.4 P ostgreSQL 不能以root用户执行,必须创建对应的用户和组:

root@localhost postgresql-8.1.11# groupadd postgre

root@localhost postgresql-8.1.11 # useradd –m –g postgre postgre

 

1.3.5 pgsql目录的权限赋予postgre用户:

root@localhost postgresql-8.1.11

# chown postgre:postgre /usr/local/pgsql

 

1.3.6 配置环境变量:

root@localhost postgresql-8.1.11 # vi ~postgre/.bash_profile

在配置文件中添加

HOME=/usr/local/pgsql/

PGLIB=/usr/local/pgsql/lib

PGDATA=$HOME/data

PATH=$PATH:/usr/local/pgsql/bin

MANPATH=$MANPATH:/usr/local/pgsql/man

export PGLIB PGDATA PATH MANPATH

保存并退出;

 

1.3.7 建立数据库目录:

root@localhost postgresql-8.1.11# mkdir /usr/local/pgsql/data

赋予权限:

root@localhost postgresql-8.1.11

# chown –R  postgre:postgre /usr/local/pgsql/data

 

1.3.8 postgre用户登陆并启动数据库:

root@localhost postgresql-8.1.11 # su – postgre

postgre@localhost postgre$ initdb

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

Success. You can now start the database server using:            

/usr/bin/postmaster  -D /usr/local/pgsql//data                   

Or                                                                

/usr/bin/pg_ctl –D /usr/local/pgsql//data –l logfile start          


  2. 安装GT4

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

root@localhost local# useradd globus

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

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

 

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

root@localhost root# cd  /usr/local/grid_tool

root@localhost grid_tool

# cp gt4.0.0-ia32-redhat9-binary-installer.tar.gz /usr/local

root@localhost grid_tool# cd ..

root@localhost local

# tar zxvf gt4.0.0-ia32-redhat9-binary-installer.tar.gz

 

2.3 解压后生成文件目录gt4.0.0-ia32-redhat9-binary-installer,进入此目录,设置配置文件,处理配置参数:

 

root@localhost local# vi /etc/profile

在配置文件中添加:

GLOBUS_LOCATION=/usr/local/globus-4.0

PATH=$GLOBUS_LOCATION/bin:$PATH

export GLOBUS_LOCATION  PATH

保存退出并且执行source命令使更改生效。

root@localhost local# source /etc/profile

 

root@localhost local# cd gt4.0.0-ia32-redhat9-binary-installer

root@localhost gt4.0.0-ia32-redhat9-binary-installer

# ./configure –prefix=$GLOBUS_LOCATION

Config.status: creating Makefile

2.4 编译

root@localhost gt4.0.0-ia32-redhat9-binary-installer# make

root@localhost gt4.0.0-ia32-redhat9-binary-installer# make install

 

2.1.4 测试

root@localhost gt4.0.0-ia32-redhat9-binary-installer

# globus-version

4.0.0

说明安装完成。

 
3. SimpleCA 的安装与配置

3.1 安装SimpleCA

3.1.1 设置环境变量:

root@localhost root# vi /etc/profile

在配置文件中添加:

GPT_LOCATION=/usr/local/globus-4.0

PATH=$GPT_LOCATION/bin:$PATH

export GPT_LOCATION PATH  

root@localhost root# source /etc/profile

 

3.1.2 globus用户执行simpleCA安装命令:

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

root@localhost root# su – globus

globus@localhost globus$

$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 :112233

 

3.1.3 root安装GSI

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 更改计算机名称:

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

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

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

 

root@localhost local# vi /etc/hosts

添加:

192.168.0.101 (本机IP地址)    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: 112233

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

newcerts/01.pem

 

3.2.4 root用户复制该证书:

root@abc root# mv /home/globus/.globus/simpleCA//newcerts/01.pem

  /etc/grid-security/hostcert.pem


3.3 user 证书

3.3.1 添加一个zm用户:

root@abc root# useradd zm

 

3.3.2 zm 用户申请证书

zm@abc zm $ grid-cert-request

/home/zm/.globus/usercert_request.pem already exists

/home/zm/.globus/usercert.pem already exists

/home/zm/.globus/userkeyt.pem already exists

 

Enter your name , e.g., John Smith:j1

…………………………………………………………………………………………………………………………………………………………………………………… Enter PEM pass phrase: 112233

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

Your request is stored in /home/zm/.globus/usercert_request.pem

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

 

3.3.3 globus用户签发user证书:

root@abc root#chown –R globus:globus /home/zm

root@abc root# su - globus

globus@abc globus$grid-ca-sign –in /home/zm/.globus/

usercert_request.pem –out signed.pem

To sign the request

Please enter the password for the CA key: 112233

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

//newcerts/02.pem

 

3.3.4 root用户复制该证书

root@abc root# mv /home/globus/.globus/simpleCA//newcerts

/02.pem /home/zm/.globus/usercert.pem

 

3.4 测试证书的有效性

3.4.1 zm用户执行一下命令:

zm@abc zm$ source $GLOBUS_LOCATION/etc/globus-user-env.sh

 

3.4.2 对权限进行相应修改:

root@abc root# chown –R zm:zm /home/zm

root@abcroot# cd /home/zm/.globus

root@abc .globus# chmod g-w usercert.pem

 

3.4.3 zm用户执行启动命令:

zm@abc zm$ grid-proxy-init –debug –verify

User Cert File: /home/zm/.globus/usercert.pem

User Key File: /home/zm/.globus/userkey.pem

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

Enter GRID pass phrase for this identity: 112233

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

Proxy Verify OK

Your proxy is valid until : Wed Ju1 9 10:49:28 2008