Académique Documents
Professionnel Documents
Culture Documents
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&
!.! 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 #&$"*)
" " " "
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.
Celo9 are a fe9 pointers on ho9 to 0eal 9ith ea1h of these situations.
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.
1-.//'1(-.0o1
Page / of 1,
1-.//'1(-.0o1
Page ' of 1,
ThatDs itK +ou ha5e no9 the 0atabase 8it on your &inu4 ser5er. We 9ill no9 pro1ee0 to unpa18ing the 8it.
1-.//'1(-.0o1
Page , of 1,
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.
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,
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,