Install N1Grid Engine 6 and compile postgresql on Sparc

To use the ARCO feature of N1ge6, one will need some database to store the data. At this point in time n1ge6 support postgresql and oracle.

To use postgresql on SPARC system , one will need to download the source code and compile.

Since most GUN license based SW like to use the gcc, so one will need to install the Solaris 9 companion CD first

N1ge6 has an update u1 in the form of patches for sparc:

  • 118082-01 provide 64-bit tar.gz
  • 118092-01 provide comm tar.gz
  • 118093-01 provide ARCO tar.gz
You need to install the same version, e.g 6.0 or 6.0u1, mixing is not supported

The latest patch required postgresql-7.4.2, since I donot know too much about the postgresql so we download the version postgresql-7.4.2.tar.gz from the http://www.postgresql.org/

compile postgresql

After I run gunzip -c postgresql-7.4.2.tar.gz |tar xvf -

cd postgresql-7.4.2

./configure

it fails.

examine config.log

it complains about libreadline.so.4 and about version of bison

Even through I setup the LD_LIBRARY_PATH to include /opt/sfw/lib and under /opt/sfw/lib there is libreadline.so.4

ld still cannot find the library,(this mean I donot know too much about how gcc work) so i copy the libreadline.so.4 to /usr/lib
(patrick@zill.net sugest me to run crle -u -l /opt/sfw/lib
acturally after I reboot the machies all is well, I donot need to copy the library to /usr/lib:-) )
need to run ldconfig /opt/sfw/lib so ld can include /opt/sfw/lib
It works. I finish ./configure and run make.

To be safe, I also download the bison-1.876d.tar.gz from the http://sunfreeware.com/ compile and install the new bison under /usr/local/bin

I re-run the ./configure , it does not complian about the version of bison.

I run make clean, make and make install

I have postgresql-7.4.2 install under /usr/local/pgsql.

The following are my experience in setup the ARCO.

It follows very closely with the chapter 8 of installation guide with minor modification.

setup the postgresql SW (page 89)

  1. create home directory for postgres user
    • groupadd postgres
    • mkdir -p /export/postgres/data
    • useradd -d /export/postgres -g postgres postgres
    • chown postgres:postgres /export/postgres/
    • su - postgres
  2. setup a database
    • /usr/local/pgsgl/bin/initdb -D ./data
  3. modify data/pg_hba.conf
    • host arco arco_write ip 255.255.255.0 md5
    • host arco arco_read ip 255.255.255.0 md5

  4. I change password to md5
  5. modify data/postgresql.conf
    • tcpip_socket =true
  6. start database
    • /usr/local/pgsql/bin/postmaster -i -D ./data
    • in a separate term for the console output

setup a postgresql database (page 92)

  1. su - postgres
  2. Create the owner of the database
    /usr/local/pgsql/bin/createuser -P arco_write
    • Enter password for new user:
    • Enter it again
    • Shall the new user be allowed to create databsse? y
    • Shall the new user be allowed to create more new users n
  3. Creating the database for ARCO
    • /usr/local/pgsql/bin/createdb -O arco_write arco
  4. (use new way documented in README of the patch 118093-01, point out by Richard Hierimeier)
  5. Create a database user for reading the database
    createuser -P arco_read
    • Enter password for new user:
    • Enter it again
    • Shall the new user be allowed to create databsse? n
    • Shall the new user be allowed to create more new users n
The console terminal of the postmaster will show the database will create many tables and views

Install the ARCO SW (page 95)

I following the page 95 of the installation guide, except on the step 9
I used postgresql-7.4.2.jar instead of pg73jdbc2.jar(one need to delete this file)

on step 10
The ARCo web application connects to the database
with a user which has restricted access.
The name of this database user is needed to grant
him access to the sge tables.

Please enter the name of this database user [arco_read] >>
Upgrade to database model version 1 ... Install version 6.0 (id=0) -------
Create table sge_job
Create index sge_job_idx0
Create index sge_job_idx1
create table sge_job_usage
Create table sge_job_log
Create table sge_job_request
Create table sge_queue
Create index sge_queue_idx0\^M Create table sge_queue_values\^M Create index sge_queue_values_idx0\^M Create table sge_host
Create index sge_host_idx0
Create table sge_host_values
Create index sge_host_values_idx0
Create table sge_department
Create index sge_department_idx0
Create table sge_department_values
Create index sge_department_values_idx0
Create table sge_project
Create index sge_project_idx0
Create table sge_project_values
Create index sge_project_values_idx0
Create table sge_user
Create table sge_user_values
Create index sge_user_values_idx0
Create table sge_group
Create index sge_group_idx0
Creat table sge_group_values
Create index sge_group_values_idx0
Create table sge_share_log
Create view view_accounting\^M Create view view_job_times\^M Create view view_jobs_completed\^M Create view view_job_log
Create view view_department_values
Create view view_group_values
Create view_host_values
Create view view_project_values
Create view view_queue_values
Create view view_user_values
revoke privileges from sge_department
revoke privileges from sge_department_values
revoke privileges from sge_group
revoke privileges from sge_group_values
revoke privileges from sge_host
revoke privileges from sge_host_values
revoke privileges from sge_job
revoke privileges from sge_job_log
revoke privileges from sge_job_request
revoke privileges from sge_job_usage
revoke privileges from sge_project
revoke privileges from sge_project_values
revoke privileges from sge_queue
revoke privileges from sge_queue_values\^M revoke privileges from sge_share_log\^M revoke privileges from sge_user\^M revoke privileges from sge_user_values
grant privileges to view_accounting
grant privileges to view_department_values
grant privileges on sge_department to arco_read
grant privileges on sge_department_values to arco_read
grant privileges on sge_group to arco_read
grant privileges on sge_group_values to arco_read
grant privileges on sge_host to arco_read
grant privileges on sge_host_values to arco_read
grant privileges on sge_job to arco_read
grant privileges on sge_job_log to arco_read
grant privileges on sge_job_request to arco_read
grant privileges on sge_job_usage to arco_read
grant privileges on sge_project to arco_read
grant privileges on sge_project_values to arco_read
grant privileges on sge_queue to arco_read
grant privileges on sge_queue_values to arco_read
grant privileges on sge_share_log to arco_read
grant privileges on sge_user to arco_read
grant privileges on sge_user_values to arco_read
grant privileges on view_job_log to arco_read
grant privileges on view_job_times to arco_read
grant privileges on view_jobs_completed to arco_read
grant privileges on view_project_values to arco_read
grant privileges on view_queue_values to arco_read
grant privileges on view_user_values to arco_read
commiting changes
version 6.0 (id=0) successfully installed
Install version 6.0u1 (id=1) -------
Create table sge_version
Update view view_job_times
Update version table
commiting changes
version 6.0u1 (id=1) successfully installed
OK

Install Sun Web Console (page 99)

I used swc_sparc_2.0.3.tar.gz file. After the extraction, you will have
  • setup
  • .pkgrc
  • SUNWbzip.pkg: bzip compression utility
  • SUNWj3dev.pkg: J2SDK 1.4 dev tools
  • SUNWj3dmo.pkg: J2SDK 1.4 demo programs
  • SUNWj3man.pkg: J2SDK 1.4 man pages
  • SUNWj3rt.pkg: J2SDK 1.4 runtime environment
  • SUNWjato.pkg: Sun One Appplication Framework runtime
  • SUNWmcon: Sun web Console 2.0.3 (Core)
  • SUNWctag.pkg: Sun web Console 2.0.3 (tags &Components
  • SUNWcatu.pkg: Tomcat servlet/JSP Container
This include the java sdk version 1.4.1
Run the Sun Web Console setup script,

at this time console will not start because nothings have been registred

Install the ARCO Console (page 100)

  1. cd /opt/n1ge/reporting
  2. ./inst_reporting
  3. Please enter the path to your java 1.4 installation[]>> /usr/java
  4. Please enter the path to the apool directory [/var/spool/arco] >>
  5. specify the paramters for the database connection
    • Enter your database type ( o=oracle, p=Postgresql }[p]>>
    • Please enter the name of your postgres db host []>> my-host
    • Please enter the port of your postgres db [5432] >>
    • Please enter the name of your postgres database [arco] >>
  6. Specify an accounting and reporting dabase user
    • Please enter the name of the database user [arco_read] >>
    • Please enter the password of the database user >>
    • please retype the password >>
    • Please enter the name of the database schema [public]>>
      Search for the jdba driver org.postgresql.Driver
      in directory /opt/nege/reporting/WEB-INF/lib ...
      found in /opt/n1ge/reporting/WEB-INF/lib/postgresql-7.4.2.jar
      Should the connect to the databse be tested (y/n) [y]>> y test db connection to 'jdbc:postgresql://my-host.my-domain:5432/arco' ... OK
  7. Enter the login names of users who are allowed to store thw=e queries and results
    • Enter a login name of a user (Press enter to finish) >> test
      Users:test
    • Enter a login name of a user (Press enter to finish) >>
    Verify the information
  8. Create the query directory
    Starting Sun web console version 2.0.3 .....
  9. connect to the SWC
    https://hostname:6789/
  10. Login with UNIX account
Comments:

Post a Comment:
Comments are closed for this entry.
About

hstsao

Search

Top Tags
Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today