Vous êtes sur la page 1sur 16

Setting up eMerge Databases On Linux

Revision 2.4 24 June 2009

Copyright Opportunity International

Not for Distribution

1 OVERVIE ........................................................................................................ ! 2 "SS#M$%IO&S "&D DE'I&I%IO&S............................................................................. ! ! $RE$"RE I&S%"LL"%IO& MEDI".............................................................................. ! !.1 D"%"("SE )I% !.2 D"%"("SE )I%
O& O&

'%$ SERVER.................................................................................! *D+ROM DIS*...............................................................................4

!.! D"%"("SE )I% O& I&DO S S,"RE.............................................................................3.3.1 OPTION 1: CONNECT TO WINDOW !"#E "ND #ET#IE$E T!E %I&E .............................................' 3.3.( OPTION (: )O*NT T!E WINDOW !"#E "ND COP+ T!E %I&E.................................................., 4 #&$"*) I&S%"LL"%IO& MEDI"............................................................................... . 4.1 #&$"*) 4.2 #&$"*) 4.! #&$"*) 4.4 #&$"*)
" " " "

%"R/01I$ 'ILE....................................................................................... %"R/(1I$2 'ILE..................................................................................... 1I$ 'ILE.............................................................................................. 2 R"R 'ILE............................................................................................. 2

- *RE"%E D"%"("SE #SER...................................................................................... 3 . SE% #$ $ERMISSIO&S........................................................................................... 9 2 DO*#ME&% ,IS%OR4.......................................................................................... 1.

1-.//'1(-.0o1

Page ( of 1,

1 Overvie5
This 0o1u2ent 0etails the steps re3uire0 to set up an e)erge 0atabase on a &inu4 ser5er.

2 "ssu6ptions an7 De8initions


It is assu2e0 that the rea0er has basi1 &inu46*NI7 8no9le0ge: as 9ell as syste2 a02inistrator s8ills. #e3uire2ents regar0ing the ser5er that is to be installe0 are outline0 belo9 in the installation prere3uisites se1tion. The shell ;s1reenshots< belo9 outline user input in blue bol0: 9hile 1o2puter output is in 0ar8 blue: regular font. %or the sa8e of this 0o1u2ent: 9e 9ill be setting up a 0atabase na2e0 ;train<. It is also assu2e0 that the 0ire1tory 9here the 0atabase is to be installe0 alrea0y e4ists: an0 you ha5e a ;root< session opene0 in that 0ire1tory. To 1reate it =assu2ing 9e alrea0y ha5e the ;6e2erge< 0ire1tory: as suggeste0 in the ;#e0 !at &inu4 Installation for e)erge< gui0e> 0o so2ething li8e: [root@dscrht24023 [root@dscrht24023 [root@dscrht24023 [root@dscrht24023 [root@dscrht24023 [root@dscrht24023 root]# cd /emerge emerge]# mkdir database emerge]# cd database/ database]# mkdir train database]# cd train train]#

! $repare Insta99ation Me7ia


*sually: the installation 2e0ia for a ne9 0atabase 9ill 1o2e as a 1o2presse0 file. This 1an either be a stan0ar0 *ni4 ar1hi5e =T"#6?@IP i.e. .tar.@: .tar.gA: .taA: .tgA>: @ip for2at =.Aip> or e5en #"# =.rar>. E41ept B B B for unusual 1ir1u2stan1es: the 0atabase 8it 9ill be a5ailable on either one of the follo9ing: %TP ser5er CDB#O) 0is1 Win0o9s PC share0 fol0er

Celo9 are a fe9 pointers on ho9 to 0eal 9ith ea1h of these situations.

3.1 Database Kit on FTP Server


To retrie5e the 8it: you 1an use the ;ftp< tool: 9hi1h beha5es e4a1tly as the 1o22an0 line ftp tool in Win0o9s =9hi1h 9as: of 1ourse: base0 on the *ni4 5ersion>. [root@dscrht24023 train]# ftp your.ftp.server.com Connected to your.ftp.server.com. 220 (vs !"d #.#.3$

1-.//'1(-.0o1

Page 3 of 1,

%30 "&ease &ogin 'ith ()*+ and ",)). %30 "&ease &ogin 'ith ()*+ and ",)). -*+.*+/)014 re2ected as an authentication type 3ame (your.ftp.server.com4root$4 test 33# "&ease specify the pass'ord. "ass'ord4 230 5ogin successfu&. 6ave fun. +emote system type is (378. (sing binary mode to transfer fi&es. ftp9 cd database 2%0 :irectory successfu&&y changed. ftp9 ls 22; *ntering "assive <ode (%;=2;>=#3=4>=223=#34$ #%0 6ere comes the directory &isting. ?r'?r??r?? #0 4@ 4@ #2%2340A> ,ug #% 2#430 train.tar.gz 22> :irectory send /-. ftp9 get train.tar.gz &oca&4 train.tar.gB remote4 train.tar.gB 22; *ntering "assive <ode (%;=2;>=#3=4>=##%=20$ #%0 /pening .73,+C mode data connection for train.tar.gB (#2%2340A> bytes$. 22> i&e send /-. #2%2340A> bytes received in #2%0.032 seconds (#.#eD02 -bytesEs$ ftp9 quit 22# Foodbye.

3.2 Database Kit on CD-ROM Disc


*nli8e 9ith Win0o9s: in or0er to a11ess re2o5able 2e0ia you nee0 to ;2ount< the appropriate 0e5i1e. This applies to lo1al 0ri5es su1h as CDB#O) or * C flash0ri5e: but also to net9or8 0ri5es e.g. Win0o9s shares. WeDll only 1o5er the first 1ase here. Nor2ally: if you insert the CDB#O) into the ser5er 0ri5e: the CDB#O) unit shoul0 be 2ounte0 auto2ati1ally =un0er ;62nt610ro2< in #e0 !at>: but if this not happens you 1an 0o this 2anually. Then you si2ply nee0 to 1opy the file a1ross. <Insert the disc into the CD-ROM unit and wait for a few seconds> [root@dscrht24023 train]# ls /mnt/cdrom <If what you get is nothing, then you need to mount the drive, otherwise skip this step> [root@dscrht24023 train]# mount /mnt/cdrom [root@dscrht24023 train]# ls /mnt/cdrom train.tar.gB [root@dscrht24023 train]# cp /mnt/cdrom/train.tar.gz . G!o e2ect the C:?+/< you 'i&& need to unmount the drive= other'ise it 'i&& be &ocHed9 [root@dscrht24023 train]# umount /mnt/cdrom

1-.//'1(-.0o1

Page / of 1,

3.3 Database Kit on Windows Share


This is the 2ore 1o2ple4 9ay of getting the Eob 0one. +ou ha5e t9o options here: you 1an use a ftpBli8e tool for 1onne1ting to the Win0o9s share an0 na5igating to the file: then retrie5ing it: or you 1an 2ount the entire share into a *ni4 0ire1tory =li8e 9ith the CDB#O) in the pre5ious step> an0 then 1opy the file as if it 9as lo1al.

3.3.1 O tion 1! Connect to Windows Share and Retrieve the Fi"e


We 9ill assu2e that this share is the 0efault ;DF< share on a 1o2puter 9ith IP ;1G.1.1.((<: an0 9e 9ill be 1onne1ting as user ;"02inistrator<. )in0 the ba18slash =;H<> before the F sign: this is re3uire0 in *ni4 be1ause the F is a spe1ial 1hara1ter an0 the shell nee0s to be infor2e0 that it 2ust not pro1ess it as su1h: but rather 0eal 9ith it as a regular 1hara1ter. i2ilar sy2bols are the spa1e sign: the 3uotes an0 the ba18slash itself. This a1tion of prefi4ing a spe1ial 1hara1ter 9ith the ba18slash sign is 1alle0 ;es1aping<. [root@dscrht24023 train]# smbclient //10.1.1.22/D\$ ! "dministrator "ass'ord4 :omainI[:)CJ73!24022] /)I[Jindo's )erver 2003 +2 3;A0 )ervice "acH #] )erverI[Jindo's )erver 2003 +2 %.2] smb4 K9 ls :atabase : 0 Jed ,ug 23 0A433420 200> emerge.baH : 0 )at ,ug #A ##42%44@ 200> +*CCC5*+ :6) 0 )at ,ug % #340@440 200> )ystem 1o&ume 7nformation :6) 0 )at ,ug % ##4#@40> 200> %AAAA b&ocHs of siBe %242@@. 343## b&ocHs avai&ab&e smb4 K9 cd Database smb4 K:atabaseK9 ls . : 0 Jed ,ug 23 0A433420 200> .. : 0 Jed ,ug 23 0A433420 200> tarin : 0 ri ,ug 2% #040444% 200> train.rar , 2>@2@;A40 Jed ,ug #> #;4%#40A 200> %AAAA b&ocHs of siBe %242@@. 343## b&ocHs avai&ab&e smb4 K:atabaseK9 get train.rar getting fi&e K:atabaseKtrain.rar of siBe 2>@2@;A40 as train.rar (#>;@A.% HbEs$ (average #>;@A.% HbEs$ smb4 K:atabaseK9 quit [root@dscrht24023 train]# If by any 1han1e the Win0o9s 1o2puter you are 1onne1ting to is part of a 0o2ain: you 2ight nee0 to authenti1ate as a 0o2ain user =instea0 of supplying the 1re0entials of a lo1al user to that 2a1hine>. In that 1ase: the synta4 to ;s2b1lient< ta8es an e4tra para2eter: ;BW I0o2ainna2eJ<. [root@dscrht24023 train]# smbclient //10.1.1.22/D\$ ! "dministrator #$ %&D'%"() "ass'ord4 :omainI[<C:/<,73] /)I[Jindo's )erver 2003 +2 3;A0 )ervice "acH #] )erverI[Jindo's )erver 2003 +2 %.2] smb4 K9

1-.//'1(-.0o1

Page ' of 1,

3.3.2 O tion 2! Mo#nt the Windows Share and Co $ the Fi"e


"ssu2ing the sa2e setup as abo5e: the 1o22an0s are: < e wi!! first create the mount point for the indows share, since it does not previous!y e"ist# $ou wi!! on!y have to do this once> [root@dscrht24023 train]# mkdir /mnt/tmp [root@dscrht24023 train]# mount //10.1.1.22/D\$ /mnt/tmp #o username*"dministrator "ass'ord4 [root@dscrht24023 train]# ls /mnt/tmp :atabase emerge.baH +*CCC5*+ )ystem 1o&ume 7nformation [root@dscrht24023 train]# ls /mnt/tmp/Database train train?&ive.rar [root@dscrht24023 train]# cp /mnt/tmp/Database/train.rar . [root@dscrht24023 train]# umount /mnt/tmp

ThatDs itK +ou ha5e no9 the 0atabase 8it on your &inu4 ser5er. We 9ill no9 pro1ee0 to unpa18ing the 8it.

4 #npa:; Insta99ation Me7ia


"s 2entione0 before: the installation 2e0ia 1an be T"#6?@IP: @IP or #"#. In the first t9o 1ases: suitable progra2s alrea0y e4ist in the syste2. %or #"#: you 9ill nee0 to install #"# for &inu4. !ere is 9hat you nee0 to 0o in ea1h 1ase.

%.1 &n ac' a T(R)*+,P Fi"e


If the file you 0o9nloa0e0 en0s in .tar.gA: .tar.@: .taA or .tgA use the ;tar< 1o22an0 9ith the ;A< flag: [root@dscrht24023 train]# tar +vfz train.tar.gz bnHE bnHE .+*"5,C*000 bnHE:5.."E bnHE ."F<.:,!000 [L] bnHEF5/.().."E70 .F<.!+,3).!/:,C bnHEF5/.().."E70)/:.(":.)*))7/3."/).C/<</3 bnHEF5/.().."EC/31.C/3:7!7/3."+7/+7!C.F#% [root@dscrht24023 train]#

%.2 &n ac' a T(R)-+,P2 Fi"e


If the file you 0o9nloa0e0 en0s in .tar.bA(: tar.bA or .tbA use the ;tar< 1o22an0 9ith the ;E< flag: [root@dscrht24023 train]# tar +vf, train.tar.bz2 bnHE bnHE .+*"5,C*000 bnHE:5.."E

1-.//'1(-.0o1

Page , of 1,

bnHE ."F<.:,!000 [L] bnHEF5/.().."E70 .F<.!+,3).!/:,C bnHEF5/.().."E70)/:.(":.)*))7/3."/).C/<</3 bnHEF5/.().."EC/31.C/3:7!7/3."+7/+7!C.F#% [root@dscrht24023 train]#

%.3 &n ac' a +,P Fi"e


If the file you 0o9nloa0e0 is a stan0ar0 @IP ar1hi5e: use the ;unAip< 1o22an0: [root@dscrht24023 train]# unzip +vfz train.zip ,rchive4 train.Bip 7nf&ating4 bnHE 7nf&ating4 bnHE .+*"5,C*000 7nf&ating4 bnHE:5.."E 7nf&ating4 bnHE ."F<.:,!000 [L] 7nf&ating4 bnHEF5/.().."E70 .F<.!+,3).!/:,C 7nf&ating4 bnHEF5/.().."E70)/:.(":.)*))7/3."/).C/<</3 7nf&ating4 bnHEF5/.().."EC/31.C/3:7!7/3."+7/+7!C.F#% [root@dscrht24023 train]#

%.% &n ac' a R(R Fi"e


&astly: if the file is a #"# ar1hi5e: you 9ill nee0 the ;unrar< tool. *nfortunately: probably 0ue to li1ense issues: this is not in1lu0e0 9ith #e0 !at. +ou 9ill nee0 to get this fro2 the Internet: at http:660ag.9ieers.1o26pa18ages6unrar6. +ou 1an either retrie5e this on Win0o9s an0 then 0eploy to *ni4 5ia %TP or one of the Win0o9s share 2etho0s: or get it 0ire1tly on &inu4 using the ;9get< tool =a 1o22an0Bline 9996ftp file 0o9nloa0er>. With ;9get<: you 9ill ha5e to supply the full path to the file. "t the ti2e of 9riting this 0o1u2ent: the ;unrar< pa18age 5ersion on the afore2entione0 site 9as 3.L./B1.el'. The 0ire1t lin8 to the ;unrar< pa18age for #e0 !at Enterprise &inu4 3 for i3., =9hat your ser5er shoul0 be> 9as: http:660ag.9ieers.1o26rp26pa18ages6unrar6unrarB3.L./B1.el'.rf.i3.,.rp2. ?etting this installe0 is really easy: [root@dscrht24023 train]# -get .ttp///dag.-ieers.com/rpm/packages/unrar/ unrar 0.1.2 1.el3.rf.i045.rpm ??#@4234#;?? http4EEdag.'ieers.comErpmEpacHagesEunrarEunrar?3.;.4? #.e&%.rf.i3@>.rpm +eso&ving dag.'ieers.com... >2.2#3.#A3.#>4 Connecting to dag.'ieers.comM>2.2#3.#A3.#>4M4@0... connected. 6!!" reNuest sent= a'aiting response... 302 ound 5ocation4 http4EErpmforge.s'.beEredhatEe&%EenEi3@>ErpmforgeE+"<)Eunrar? 3.;.4?#.e&%.rf.i3@>.rpm [fo&&o'ing] ??#@4234#;?? http4EErpmforge.s'.beEredhatEe&%EenEi3@>ErpmforgeE+"<)Eunrar?3.;.4? #.e&%.rf.i3@>.rpm +eso&ving rpmforge.s'.be... #30.#33.3%.#>

1-.//'1(-.0o1

Page L of 1,

Connecting to rpmforge.s'.beM#30.#33.3%.#>M4@0... connected. 6!!" reNuest sent= a'aiting response... 200 /5ength4 ##33>> (###-$ [app&icationEO?rpm] )aving to4 Punrar?3.;.4?#.e&%.rf.i3@>.rpmQ #00R[IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII9] ##3=3>> 0.3s #@4234#@ (3;% -.Es$ ? Punrar?3.;.4?#.e&%.rf.i3@>.rpmQ saved [##33>>E##33>>] [root@dscrht24023 train]# rpm #i unrar 0.1.2 1.el3.rf.i045.rpm 'arning4 unrar?3.;.4?#.e&%.rf.i3@>.rpm4 6eader 13 :), signature4 3/-*C= Hey 7: >b@d;Ae> <De!ete the insta!!ation fi!e for %&R'R since we don(t need it anymore> [root@dscrht24023 train]# rm #f unrar 0.1.2 1.el3.rf.i045.rpm [root@dscrht24023 train]# On1e you ha5e installe0 *N#"#: you 1an go ahea0 an0 e4tra1t the ar1hi5e Eust as you 9oul0 0o 9ith 1o22an0Bline #"# in Win0o9s: [root@dscrht24023 train]# unrar + train.rar (3+,+ 3.;0 beta 4 free'are Copyright (c$ #AA3?200; ,&eOander +osha& 3;%-Es in

*Otracting from train.rar Creating bnH Creating bnHEbnH.data Creating bnHEbnH.dataEtt *Otracting bnHEbnH.dataEttE .3-.!*550#; [L] Creating bnHEC."+/F) Creating bnHE:5.." ,&& /[root@dscrht24023 train]# //////-

o far: so goo0K We no9 ha5e the 0atabase un1o2presse0 an0 rea0y to roll. Ne4t step is to 1reate the user for a11essing the 0atabase.

- *reate Database #ser


&i8e in Win0o9s: 1onne1ting to the ser5er is 0one through the ;telnet< proto1ol =this is han0le0 by a 1lient appli1ation e.g. e)erge=6?lobus6T(/> Des8top or M$T>. This re3uires a user on the re2ote 2a1hine: 9hi1h on one han0 pro5i0e an e4tra le5el of se1urity =sin1e you 9ill nee0 a pass9or0 to login 9ith it>: an0 on the other han0 it perfor2s the e4tre2ely useful a1tion of establishing the lin8 to the 0atabase.

1-.//'1(-.0o1

Page . of 1,

"gain: li8e in Win0o9s: in *ni4 a file 1an ha5e user an0 group per2issions. "t this point: if you ha5enDt alrea0y 1reate0 a group Eust for e)erge 0atabases: 9e strongly re1o22en0 0oing so. This pro5i0es an e4tra le5el of se1urity for e)erge 0atabases: sin1e you 9ill be able to set per2issions in su1h a 9ay that 0atabases users 1an 1rossBa11ess 0ifferent 0atabases: but other users in the syste2 9ill not be able to a11ess any 0atabase at all. To 1reate this group =9eDll 1all it ;e2erge<> issue this 1o22an0: [root@dscrht24023 train]# groupadd emerge To 1reate a 0atabase user na2e0 ;train<: labelle0 ;%rain Database<: belonging to the ;e6erge< group an0 9ith a ho2e 0ire1tory of ;/e6erge/7atabase/train/bn;/bn;.run<: run: [root@dscrht24023 train]# useradd g emerge d /emerge/database/train/bnk/bnk.run #% n s /bin/ks. train

c 67rain Database6

Note that the abo5e 1o22an0 9ill also assign the shell =1o22an0 interpreter: the *ni4 e3ui5alent of Win0o9sD 120.e4e> to ;/bin/;s<<: 9hi1h is 9hat EC" E re3uires. To set the pass9or0 for the ne9ly 1reate0 user: run: [root@dscrht24023 train]# pass-d train Changing pass'ord for user train. 3e' (378 pass'ord4 +etype ne' (378 pass'ord4 pass'd4 a&& authentication toHens updated successfu&&y. [root@dscrht24023 train]#

. Set #p $er6issions
On1e you ha5e the user: group an0 0atabase files all set: you 9ill nee0 to assign the proper files60ire1tories per2issions: an0 possibly allo9 the ;e2erge< group 9rite a11ess to the 0atabase =if you nee0 other 0atabase users to 9rite to this parti1ular 0atabase fol0er>. It 9oul0 also help to set the right e4e1utable per2issions =0atabases usually 1o2e 9ith these 2esse0 upN for 1os2eti1 purposes itDs better to ha5e e5erything right>. This is easy to a11o2plish using the follo9ing s1ript =you 1an sa5e this as a file e.g. initDC.sh an0 then run it as ;.6initDC.sh<>: #SEbinEsh # )et up permissions on a ne' e<erge database dbpat.*$1 user*$2 group*$0 ec.o

1-.//'1(-.0o1

Page - of 1,

if 8 z 6$dbpat.6 o z 6$user6 9: t.en ec.o 6!sage/ $0 ;db<pat.= ;user= 8group96 ec.o 6e.g. $0 /emerge/database/train train emerge6 e+it fi if 8 z 6$group6 9: t.en group*emerge: fi cd $dbpat. ec.o >etting default o-ners c.o-n ? $user/$group bnk ec.o %aking all files group -riteable but unaccessible to ot.ers c.mod ? g@-Ao r-+ bnk cd bnk/bnk.run ec.o ?emoving e+ecutable flag for files in bnk.run find . type f e+ec c.mod a + BC \: ec.o ?e enable it ,ust for programsA ob,ect code and scripts find Dbin Dlib Ds. Dks. type f e+ec c.mod a@+ BC \: ec.o Done. ec.o %or rea0Bonly a11ess substitute ;OrB9< instea0 of ;O9< abo5e: 9hile for no group a11ess use ;Br94< instea0. )ore 0etails about setting per2issions 1an be foun0 in the #e0 !at 2anuals. We are not going to 1o5er here the profile file =;.profile< on &inu4: the e3ui5alent of ;re2ote.120< on Win0o9s>. Cut assu2ing this is properly set: you shoul0 ha5e a 9or8ing 0atabase no9. " sa2ple profile file is pro5i0e0 ne5ertheless =i2portant lines are highlighte0 in the 1o0e>: #SEbinEHsh # ???????????????????? "rofi&e.-sh ????????????????????????????? # # .profi&e temp&ate for Horn she&& to eOecute 2 she&& # after configuring the environment # ,fter creating a user and his home directory you # shou&d append this fi&e to the .profi&e in TU6/<*V # # ###### # ##### ####### # # # # # # # # # # # # # # # # # # # ###### # # ##### ##### # # # # ####### # # # # # # # # # # # #

1-.//'1(-.0o1

Page 1G of 1,

# #### ###### # # ##### ####### # # )et up the port= if it ever goes 'i&d= then typing a sing&e W8W # shou&d hopefu&&y put it bacH= using the seNuence Ctr&?X (YX$= 8= Ctr&?X (YX$ # 'hereby Ctr&?X means ne' &ine. # # Certain contro& characters used in some system stty settings may c&ash 'ith # contro& characters used 'ithin the X*:EX)6 programs= thus maHing the function # appear not to 'orH. 7n this case the c&ashing stty settings can be safe&y set # to undefined thus a&&o'ing the contro& character to be processed by X*:EX)6. # e.g. (ndefine stty Wf&ushW character. stty f&ush Y?= 'here Y is uparro' and # ? is the minus character. ,&ternative&y X*: can be configured to use a&ternative # contro& characters via the .2edsrc fi&e. )ee Hno'&edge base. # # stty intr YC Hi&& YZ icanon opost echo echoe echoH on&cr ?&case tab3 # # undefine common stty settings to avoid c&ash 'ith some terminfo and 2ed contro&s stty Nuit Y? susp Y? erase Yh a&ias 8IWstty T(stty ?g$W # # # !o set the defau&t umasH to 002. !his a&&o's the C+*,!*? 75* to create fi&es 'ith # defau&t permissions of >>4. i.e. r'?r'?r??. # +eadEJrite (ser= +eadEJrite Froup= +ead/n&y /thers # !his enab&es fi&e access permissions to be more easi&y contro&&ed via user groups. # ,&so in the case of net'orH fi&e access= uniO &ocHs reNuired readE'rite access. # #umasH 002 # # eOport !*+<Ivt#00 # Configure defau&t prompt # ")#IWT(uname$?KT"J:4 W # eOport 6/<*IT"J: # # Configure *31 for environment *31ITU6/<*VE.env

1-.//'1(-.0o1

Page 11 of 1,

# # defau&t to vi editor and vi options and cd to home 17)(,5IEusrEbinEvi set ?o vi # # # )et up the directory of 'here 2.,)* is being run from. # !he X.C+*5*,)*:7+ sho's 'here the eOecutab&es= &ibraries= scripts etc. # can be found for the particu&ar re&ease you 'ant to run. !he # X.CF5/.,5:7+ sho's 'here a fe' of the g&oba& constants can be # found= such as the configuration fi&e for the record &ocHing # mechanism ?? these shou&d be common to a&& re&eases running on # the same system # # 7f undefined= they 'i&& resort to EusrE2bc as a defau&t. 6o'ever= they # are initia&ised in this script to the defau&t= so that if you move # to another test re&ease at a &ater stage= it maHes it very easy to # update the X.C+*5*,)*:7+ variab&e to say EusrEtest2bc and a&& the # other variab&es fa&& in to p&ace. # e+port EFG?HIH">HD(?*/usr/,bc eOport X.CF5/.,5:7+ITX.C+*5*,)*:7+ # # # )et up the shared ob2ect fi&e name 'here 'e 'i&& reso&ve # a&& the ca&&s to subroutines made via. the C,55 @1ar($ statements. # !he defau&t is T6/<*E&ib. 7f you 'ant to use shared ob2ects other # than in the defau&t= set up a 4 de&imited path of directory names # andEor ob2ect name to search in= by setting the X.C/.X*C!57)! variab&e. # # 3/!*4 Jhen eOecuting programs the ",!6 environment variab&e is used. # Jhen &ocating subroutines the X.C/.X*C!57)! environment variab&e is used # e&se by defau&t the T6/<*E&ib directory. !herefore 'hen cata&oging ensure # that either the defau&t T6/<*Ebin or T6/<*E&ib directories areused to store # the eOecutab&es and shared &ibraries or e&se the environment variab&es # X.C:*10.73 and X.C:*1057. are configured to match ",!6 and X.C/.X*C!57)!. # # e.g. 7f X.C/.X*C!57)! 'ere configured be&o' then the directory EappsEmyappE&ib # 'ou&d be used to &ocate any subroutines ca&&ed by my main program. 7n this case # the subroutines shou&d of been cata&oged 'ith X.C0:*157.IEapp#EmyappE&ib a&so.

1-.//'1(-.0o1

Page 1( of 1,

# eOport EFG'FEHG7I(>7*$J'%H/globuspatc.lib/$J'%H/locallib/$J'%H/lib/ $J'%H/globuslib # # # :uring the search for a shared ob2ect= if an ob2ect is specified # 'ithout a path component= e.g. W&ibsubroutines.soW = then ,78 # 'i&& use 57.",!6 to find out 'hat directory the ob2ect is in= # and )1+4 systems 'i&& use 5:057.+,+C0",!6 and 6"(8 the )657.0",!6. # eOport X+*:7+ITX.C+*5*,)*:7+E2dHE2re eOport X+*57.ITX.C+*5*,)*:7+E2dHE2reE&ib4 TX.C+*5*,)*:7+E2dHE2reE&ibEp&atform eOport 5:057.+,+C0",!6ITX.C+*5*,)*:7+E&ib4TX+*57.4EusrEccsE&ib4EusrE&ib #eOport 57.",!6ITX.C+*5*,)*:7+E&ib4TX+*57.4EusrEccsE&ib4EusrE&ib #eOport )657.0",!6ITX.C+*5*,)*:7+E&ib4TX+*57.4TU)657.0",!64?EusrE&ib4E&ibV # # # )et up path of 'here to find data fi&es. .y defau&t if the X*:7 75*",!6 # is not set then fi&es 'i&& be &ooHed for first in the T6/<* directory and # if not found then in the W.W current directory. # eOport X*:7 75*",!6IT6/<* # # # )et up the path to the ),1*:57)! fi&e # eOport X.C57)! 75*IT6/<*EK[),1*:57)!)K[ # # # )et up base directory 'here 'e Heep the spoo&er (defau&t II EusrE2spoo&er$ # e+port EFG>K''IH?D(?*/usr/,spooler # # # )et up 'here the <: and )C)!*< fi&es can be found. # .y defau&t= the <: and )C)!*< fi&es are undefined= so \ pointers # and other considerations (such as "\ procs from 2sh$ 'i&& not 'orH. eOport X*:7 75*3,<*0<:IT6/<*E1/C e+port EHD(L(IH)"%H<>&>7H%*$EFG?HIH">HD(?/src/>&>7H% # # # )etup the (niO ",!6 environment variab&e. !his variab&e specifies the &ocation and # order in 'hich directories 'i&& be search to find the command &ine eOecutab&e. #

1-.//'1(-.0o1

Page 13 of 1,

e+port K"7J*$EFG?HIH">HD(?/bin/$EFG?HIH">HD(?/config/$K"7J/./ $J'%H/globuspatc.bin/$J'%H/localbin/$J'%H/bin/$J'%H/globusbin # # # !o see 2.,)* man pages enab&e and eOport the <,3",!6 environment variab&e # and set pager to WpgW or WmoreW as reNuired. # eOport <,3",!6ITX.C+*5*,)*:7+Eman #eOport ",F*+Ipg # # # )et the environment variab&e X.C:*1057. [ X.C:*10.73. !hese # variab&e 'i&& decide the p&ace 'here the bin and &ib directories # 'i&& reside in your environment. ,ny deve&opment done in 2base # 'i&& be p&aced into these &ocations. 7f the source being compi&ed # is an eOecutab&e it 'i&& be p&aced into the bin fo&der and if it is # a subroutine it 'i&& be p&aced into a shared &ibrary in the &ib fo&der # eOport X.C:*10.73IT6/<*E&oca&bin eOport X.C:*1057.IT6/<*E&oca&&ib # # !e&& 2.,)* 'here to create the tmp fo&der that it uses # # 77&)'*Mtty N cut f2 d\/M e+port EFGF">H7%K*$J'%H/,F">H$'?O/tmp<$77&)' rm $EFGF">H7%K 2=/dev/null rm $EFGF">H7%K9D 2=/dev/null cp tmp<-orkfile<ne- $EFGF">H7%K eOport 5,3FIen0() # # !his variab&e sets the 2.,)* emu&ation to be prime. # eOport X.C*<(5,!*Iprime # eOport X.,)*0J,+35*1*5I30 eOport X.,)*07367.7!0]*+/0()*:I# eOport X*:7*3,.5*\2\I# # # Je have no' set up a&& the environment variab&e reNuried by 2.,)*. # Je must run the 2bcconnect command= so that these variab&es remain # for the entire session (un&ess purpose&y amended$. # # # !he fo&&o'ing environment variab&e is added to set the a&&o'ab&e open fi&e descriptors #eOport X.,)*0<,80/"*30 75*)I#0000

1-.//'1(-.0o1

Page 1/ of 1,

eOport X.C0(35/C-05,)!C5/)*I# # # # Cou can no' start to add any 2.,)* programs in your .profi&e at this stage. # !*+< @0=#0====#32=>0 # )"?,))7F3 I"+73!+/378 # # 3o' 'e 'orH out if 'e 'ant to go straight into F5/.() or go to 2.,)* # # 7f you 'ish to use / ) on&ine via *..,(!/.737!."+/C*))= uncomment # the fo&&o'ing four &ines of script4 # irst 'e checH if there are any auto processes to run. !he program # *..,(!/.737!."+/C*)) checHs the tab&e *..,(!/."+/C*)) for a record # 'ith an id of the user. 7f this is found (defined in / ).)/(+C*$ # the *..,(!/.737!."+/C*)) 'i&& run the routine= an u&timate&y &ogout # Jhere nothing is found= the routine terminates norma&&y. # 6ence 'e eOamine the TZ code. , non Bero seems to indicate that the # process :7: something= so get out. !his 'i&& need to be tested # on a site by site basis. # PHF."!7'.()(7.K?'GH>> P if 8 $Q R* 0 9: t.en P e+it P fi # # 3o' 'e asH our traditiona& Nuestion. # #echo WKn)!,+! F5/.() CE3IKcW #read ans'er # # 7f 'e 'ant to start F5/.()= do so and then eOit. !his prevents4 # a$ !oo many processes being spa'ned and # b$ "rocesses being &eft WhangingW # #if [ WTans'erW I C ?o WTans'erW I y ]^ then # start F5/.() hereS # *.).!*+<73,5.)*5*C! # *8 # eOit #fi # /ther'ise 'e 2ust start the 2she&&... # #??????????????? *nd of "rofi&e.-sh ????????????????? # 3o' enter the 2sh to comp&ete the &ogin..9 e+ec $EFG?HIH">HD(?/bin/,pqn $EHD(L(IH)"%H<%D/loginproc P 8200S0301 ILratila9 Krovision for removal of temp files P ?emoved e+ec and added 2 more lines

1-.//'1(-.0o1

Page 1' of 1,

$EFG?HIH">HD(?/bin/,pqn $EHD(L(IH)"%H<%D/loginproc rm f $EFGF">H7%K $EFGF">H7%K9D 2= /dev/null e+it

2 Do:u6ent ,istor=
Date (' "ug G, (' O1t G, / Pun GL L Pun GL 3G )ay G(/ Pun G"ut<or &u1ian %ratila &u1ian %ratila &u1ian %ratila &u1ian %ratila &u1ian %ratila &u1ian %ratila Mo7i8i:ations Create0 "00e0 per2issions 1hange s1ript an0 a sa2ple profile file "00e0 a2ba 0o2ain authenti1ation #epla1e0 ;oibr< 9ith ;train< "00e0 setting of user pass9or0 *p0ate0 #"# 5ersion an0 a00e0 latest OI hea0er "00e0 tar6bAip( se1tion

1-.//'1(-.0o1

Page 1, of 1,

Vous aimerez peut-être aussi