Install Java

boreddizzyData Management

Dec 16, 2012 (4 years and 8 months ago)

362 views


1

Grid Computing
Grid Toolkit Installation

for Windows Platform



Multi Agent Systems and Grid Computing Workshop and
Opening Ceremony of OSS SAGE
Session: Hands on Grid
by
M. Omair Shafiq
34omair@niit.edu.pk



NUST Institute of Information Technology, Pakistan

Communication Technologies, Sendai Japan



2
Table of Contents

Install workflow..................................................................................................................3
Hardware Requirements:............................................................................................4
Software Setup............................................................................................................4
User Requirements......................................................................................................4
Required Knowledge..................................................................................................4
Globus Support Packages...........................................................................................4
Set Globus Support Environment Variables...................................................................5
Create Globus Root Directory........................................................................................5
Download Packages Required for Globus GT3..............................................................5
Download Java................................................................................................................5
Install Java:.....................................................................................................................6
Install Tomcat:................................................................................................................6
Add Mime Mapping....................................................................................................6
Install Ant........................................................................................................................6
Install Apache ORA version 2.0 in Ant..........................................................................7
Cygwin............................................................................................................................7
Install CygIPC CODE.....................................................................................................8
POSTGRESSQL One Time Setup..................................................................................8
Configure Postgresql database options.......................................................................8
Open config file in wordpad.......................................................................................9
Initialize Database.....................................................................................................10
Start the Postmaster...................................................................................................11
Create OGSA Database.............................................................................................11
Create Bash Script to run postgress..........................................................................11
Install Postgress as a Service....................................................................................11
Double Click on PostgreSQL entry..........................................................................12
You are ready to install The Globus Grid................................................................12
Windows 2000 Globus Setup............................................................................................12
Setup WorkFlow:..........................................................................................................12
Download Globus Software..........................................................................................13
Unpack downloaded Files.............................................................................................13
Directory Structure Overview.......................................................................................13
Build Globus Core........................................................................................................13
Test Install.....................................................................................................................13
Configure Grid..............................................................................................................14
Core Globus is now running and configured...............................................................14



3
Install workflow


1. Window 2000 Support Programs Install and Configure
 Setup %GLOBUS_ROOT% directory
 Define environment Variables for Globus Support Packages
 java jdk.1.3.1 download and install
 cygwin download, setup, and install
 cygIPC download, setup, and install as Windows Service
 postgress download, setup, and install as Windows Service
2. Jakarta Tool Download
3. Jakarta Tomcat 4.0.6 install and setup
4. Apache Ant 1.5.2 install and setup
5. Install Jakarta ORO 2.0 into Ant 1.5.1
6. Globus Download and Install
7. Globus Certification Generation

Future Documents will cover:
o Globus Download and Install on Windows 2000 Machine
o Running the Globus GUI interface
o Generating certificates on Windows 2000

4
Hardware Requirements:
• Windows 2000 Machine
• Internet Connection
• ~100 meg disk space (you will need less than this)
Software Setup
• Java jdk1.3.1 or latest
• cygwin environment
• Apache Jakarta Tomcat 4.06
• Apache Ant 1.5.2
• Jakarta Apache ORA version 2.0
• Cygwin environment
• Cygwin CygIPC Windows Service
• Postgress Setup
• Environment Variable Setup
User Requirements
• You will need admin privileges on your machine while executing the install.

Required Knowledge
This documents starts at ground zero and assumes no knowledge of:
• GLOBUS
• Java install/usage knowledge
• ant install/usage knowledge
• cygwin install/usage knowledge
• postgress Database install/usage knowledge
Globus Support Packages
Java 1.3.1 Ant 1.5.1 with oro extension
used to build globus from source
used to execute globus
used to develop gloubus clients
used to develop globus servers
Cygwin
postgress host
certificate generation
Main Globus Page
This is the master page, most of the info on this page was gathered from this page. The remaining info was
harvested from the GLOBUS mailing list.

5
http://www.globus.org/ogsa/releases/alpha/
Set Globus Support Environment Variables
Start->Settings-> Control Panel
Environment Variables to Set
In this section, we will set/modify the following Environment variables
New Environment Variables:
• GLOBUS_ROOT d:\grid
• JAVA_HOME d:\jdk1.3.1_07
• ANT_HOME d:\apache-ant-1.5.2
• TOMCAT_HOME C:\ApacheTomcat4.0
Modified Environment Variables
• PATH .;%JAVA_HOME%\bin;%ANT_HOME%\bin;
Start->Settings->Control Panel
Set GLOBUS_ROOT to d:\grid
Set JAVA_HOME environment Variable
ANT_HOME d:\apache-ant-1.5.2
TOMCAT_HOME d:\ApacheTomcat4.0
Modify Path, add ".;%JAVA_HOME%\bin;%ANT_HOME%\bin;" to start of PATH variable
Create Globus Root Directory
mkdir %GLOBUS_ROOT%
mkdir %GLOBUS_ROOT%\download
start->Programs ->accessories-> Command Prompt
Download Packages Required for Globus GT3
In this portion of the install, we will download 4 packages from the internet. (click on each link below, and
save to %GLOBUS_ROOT%\download)
• Apache Jakarta Tomcat 4.06
• Apache Jakarta ORA version 2.0
• Apache ant version 1.5.2
• CygIPC (Unix Sockets for Windows)
Download Java

6
Go to Sun and download Java for windows (I am using java.1.3.1 to simplify security setup)
http://java.sun.com/j2se/1.3/download.html (windows all languages SDK)
download to %GLOBUS_ROOT%\download
Install Java:
Open windows explorer
Open the %GLOBUS_HOME%\download directory
Double click on j2sdk-1_3_1_07-windows-i586
Install Java in d:\jdk1.3.1_07 directory (Java should now be installed under d:\jdk1.3.1_07)

Install Tomcat:
Open windows explorer
Open the %GLOBUS_HOME%\download directory
Double click on jakarta-tomcat-4.0.6

The first page of your install should reference the Java Development kit in d:\1.3.1_07
On the Installation Options Window, select minimal installation, then click on the NT Service box
Install into the following directory d:\ApacheTomcat4.0, note: this removes the spaces from the default
install path, this is usually a good idea for Java applications.
The installer will run for a couple of minutes, then display the following menu, click close to finish
Add Mime Mapping
Edit %TOMCAT_HOME\conf\web.xml (Start->Programs->Accessories->Notepad)
Add mime mapping to start of mime mapping section in web.xml
<mime-mapping>
<extension>gwsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>

<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>

Save updated file (File->save in the notepad editor)
Install Ant

7
* Open a Command window (start->programs->accessories->Command Prompt
• d:
• cd d:\
• d:\jdk1.3.1_07\bin\jar -xf %GLOBUS_ROOT%\download\apache-ant-1.5.2-bin.zip
( The jar command extracts ant to 1d:\apache-ant-1.5.2, in the steps above we used jar, but you can
use your favorite unsip tool if you like)
Install Apache ORA version 2.0 in Ant
To build GLOBUS, we need to install the ORA Jar into the %ANT_HOME%\lib directory. For now, we
will just grab what we need
Extract ora jar into tmp dir
Start->Programs->Accessories->Command Prompt
d:
CD %GLOBUS_ROOT%\download
d:\jdk1.3.1_07\bin\jar -xf jakarta-oro-2.0.zip
# REM Copy ORO jar file to Ant lib directory
copy jakarta-oro-2.0\jakarta-oro-2.0.jar %ANT_HOME%\lib
# REM Cleanup tmp dir
del /f/s jakarta-oro-2.0

Cygwin
Download the network installer for cygwin to %GLOBUS_ROOT\download
Click on OK, then save to %GLOBUS_ROOT%\download
Run the installer for Cygwin
This installer will download the required Cygwin apps from the Internet
Open Command Window Start->Programs->Accessories->Command Prompt
Going through setup
* next
* install from Internet
* Root: C:\cygwin
* All Users
* DOS seperator
* next
* local package directory c:\cygwin
* next
* Use IE5 Settings (if you can get to the Internet with IE5, then you are ok)
* next
* Select Download site (I use Purdue or Nasa from the states)
* next
* Select Packages
+database // click on database
+ postgress // click skip
// click until latest version appears
// for me this was 7.3.1-1

8
// yours may be newer
+utils
+ bzip2 // any version will work here, no special
// action is required on your part for this
// bzip is part of the standard dist
+base
+ libreadline5 // any version will work no
// action is required on your part
+net
cyrrunsrv Tool to run cygwin programs as a service
Activate cygrunsrv
+ openssh // activate latest verion, this is not
// selected in the base package
+ openssl // activated when you select openssh
+ openssl096 // activated when you select openssh
* next (triggers default download)
* (add to start menu, add to desktop) next

Install CygIPC CODE
Start cygwin shell (Start->Programs->Cygwin->Cygwin Bash Shell)
CD / # change to root directory
cp $GLOBUS_ROOT/download/cygipc-1.13-2.tar.bz2 .
tar --bzip2 -xf cygipc-1.13-2.tar.bz2
rm cygipc-1.13-2.tar.bz2

Prepare System to Setup CygIPC as A service
# copy cygwin1.dll into windows system directory
cp /bin/cygwin1.dll /cygdrive/c/WINNT/system32
ipc-daemon --install-as-service
net start ipc-daemon

CygIPC is now installed as a service on your machine. It is started now, and will restart automatically when
you reboot your machine.
POSTGRESSQL One Time Setup
Configure Postgresql database options
Copy sample config file postgresql.conf.sample to real config file
CD /usr/share/postgresql
cp postgresql.conf.sample postgresql.conf

9
Open config file in wordpad
• start->programs->Accessories->Note Pad
• file->open
d:\cygwin\users\share\postgresql\postgresql.conf
uncomment tcpip_socket and set to true
Save File
File-Save (click OK when pop asks if OK to save with no formating)
Set up user access for postgress database in d:\cygwin\usr\share\postgresql\pg_hba.conf
Open a Command Prompt Window and Run ipconfig
Start->Programs->Accessories->Command Prompt
$ ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . : foo.com
P Address. . . . . . . . . . . . : 192.168.202.23
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 146.122.202.1
Identify IP mask to use to allow other hosts to connect to your machine. We will set up postgress so that all
computers on your subnet can connect to your postgress database.
Look at the IP Address for the host above:
IP Address. . . . . . . . . . . . : 192.168.202.23
IP Mask: 192.168.0.0
Edit pg_hba.conf
Start->Programs->Accessories->Note Pad
File->New
Copy This Text Into Wordpad for a low security setup. This setup issues that you are running on a local
network in which access is protected by a strong firewall. Check with you network admin if this is not your
situation.
Note: The IP mask on the last line of this file is the IP mask derived from the ipconfig data above.
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the PostgreSQL Administrator's Guide, chapter "Client
# Authentication" for a complete description. A short synopsis
# follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of three forms:
#
# local DATABASE USER METHOD [OPTION]

10
# host DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION]
# hostssl DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION]
#
# (The uppercase quantities should be replaced by actual values.)
# DATABASE can be "all", "sameuser", "samegroup", a database name (or
# a comma-separated list thereof), or a file name prefixed with "@".
# USER can be "all", an actual user name or a group name prefixed with
# "+" or a list containing either. IP-ADDRESS and IP-MASK specify the
# set of hosts the record matches. METHOD can be "trust", "reject",
# "md5", "crypt", "password", "krb4", "krb5", "ident", or "pam". Note
# that "password" uses clear-text passwords; "md5" is preferred for
# encrypted passwords. OPTION is the ident map or the name of the PAM
# service.
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect, or use
# "pg_ctl reload".
# Put your actual configuration here
# ----------------------------------
#
# CAUTION: The default configuration allows any local user to connect
# using any PostgreSQL user name, including the superuser, over either
# UNIX-domain sockets or TCP/IP. If you are on a multiple-user
# machine, the default configuration is probably too liberal for ypg_hba.confou.
# Change it to use something other than "trust" authentication.
#
# If you want to allow non-local connections, you need to add more
# "host" records. Also, remember TCP/IP connections are only enabled
# if you enable "tcpip_socket" in postgresql.conf.
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust

# this is the mask for my local network derived from ipconfig command
host all all 192.168.0.0 trust
File->SaveAs
Set Save as Type To All Files
d:\cygwin\usr\share\postgresql\pg_hba.conf

Initialize Database
Start->Programs->Cygwin->Cygwin Bash Shell
initdb -D /usr/share/postgresql/data

11
Start the Postmaster
postmaster -D /usr/share/postgresql/data &
Create OGSA Database
createdb ogsa
Create Bash Script to run postgress
create empty file
CD /usr/local/bin
touch run_postgress_service.sh
Start Wordpad
Start->Programs->Accessories->Word Pad
open file c:\cygwin\usr\local\bin\run_postgress_service.sh
Copy Text Below into Word pad
#!/bin/bash
export PGDATA=/usr/share/postgresql/data
export PATH=/bin:/usr/local/bin
#there is a defect in postgress that leaves an extra file
#at close, this check rm's that file before postgress is
#started
if [ -e /usr/share/postgresql/data/postmaster.pid ]
then
rm -f /usr/share/postgresql/data/postmaster.pid
fi
postmaster -i 2>&1 > /usr/local/pgsql/data/postmaster.log 2>&1 < /dev/null
File->save
In the Cygwin Shell
CD /usr/local/bin
chmod 700 run_postgress_service.sh
Install Postgress as a Service

cygrunsrv --install PostgreSQL --desc "PostgreSQL Database Server" --path
/usr/local/bin/run_postgress_service.sh --dep ipc-daemon --termsig INT --shutdown --
stdout /usr/share/postgresql/data/postgresql.log --stderr
/usr/share/postgresql/data/postgresql.err

12
Note: There is a --user option with cygrunsrv, but I had trouble using it, so I use the Windows Service
Control panel to set the user for PostGress to run under. This should be the same user that you used to
install postgress.
Note 2: You can run as a different user that you used to install postgress, but you will need to get this going
on your own. I have not done this myself
Start->Settings->Control Panel->Administrative Tools
Click on Services
Double Click on PostgreSQL entry
• Click on "Log On" Tab
• Select "This Account" Radio Button
• Enter your account name, and login
You are ready to install The Globus Grid
Windows 2000 Globus Setup
Download Install, and Configure the Globus Toolkit.

Download Globus Toolkit

Build Globus Toolkit

Install Base Globus Toolkit

Configure Base Globus Toolkit
o
Expose Grid Services under DNS name rather than IP address
o
Configure for postgress
Setup WorkFlow:


13
Download Globus Software
Click on these links and save to %GLOBUS_ROOT%\download\alpha3

Globus Core Source

Globus Higher Level Grid Archive Packages (GAR's)

Unpack downloaded Files
Open cygwin shell (Start->Programs->cygwin->cygwin bash shell)
cd $GLOBUS_ROOT
tar --gunzip -xf download/alpha3/gt3-alpha3-core-src.tar.gz
tar --gunzip -xf download/alpha3/gt3-alpha3-gars.tar.gz
# create empty etc directory
mkdir ogsa\impl\java\etc
Directory Structure Overview
We will be working in the %GLOBUS_ROOT%\ogsa\impl\java directory structure. This is the base of the directory
structure that we will use.
Future ---- Directory overview

Build Globus Core
Open a command prompt (Start->programs->Accessories->Command Prompt)
REM ---- change to the drive where Globus is installed on, for me this was d: drive
d:
REM ---- build the OGSA core
CD %GLOBUS_ROOT%\ogsa\impl\Java
REM ----- Build the OGSA core
ant dist
REM - get a cup of coffee, it will take some time to build
REM ----- Deploy into Tomcate
ant -Dtomcat.dir=%TOMCAT_HOME% deployTomcat
Test Install
ant gui
The GUI should pop up and look like as shown

14

Configure Grid
Edit %TOMCAT_HOME%\webapps\ogsa\WEB-INF\server-config.wsdd (start->programs->accessories->notepad)
Add the following parameters under the <globalConfiguration> tag
NOTE: change sdrc.com to your domain name
<parameter name="publishHostName" value="true"/>
<parameter name="domainName" value="sdrc.com"/>
<parameter name="disableDNS" value="false"/>
Save Changes (file->save)
Reset Tomcat to activate changes
Open Service Control panel (Start->Settings->Control Panel->Administrative Tools; services)
right mouse on Apache Tomcat to bring up secondary menu
Click on Stop (notice how the apache service is no longer in running state)
right mouse on apache Tomcat service, and click on start
We are back in business, Apache Tomcat is started,
Core Globus is now running and configured