Скачать презентацию Aleph 500 System Setup and Administration Yoel Kortick Скачать презентацию Aleph 500 System Setup and Administration Yoel Kortick

60b506c4db64994a508f84672ac555cd.ppt

  • Количество слайдов: 150

Aleph 500 System Setup and Administration Yoel Kortick yoel. kortick@exlibrisgroup. com Aleph 500 System Setup and Administration Yoel Kortick yoel. [email protected] com

Table of Contents part one • The Aleph installation • General Tree Structure • Table of Contents part one • The Aleph installation • General Tree Structure • $alephe_root • demo_libs and non_demo_libs • Library naming conventions • Aliases and variables • Client server architecture • User and login process behind the scenes • aleph_startup and aleph_shutdown 2

Table of Contents part two • Node management (library management) • path_convert • Util Table of Contents part two • Node management (library management) • path_convert • Util C and the batch queue • Util W server management • Methods to stop and start Aleph • Apache and Aleph web server • Basic Oracle Overview • file_list and table_spaces 3

Accompanying Documents part one • Batch_services_and_task_manager. ppt • Available on Documentation Center under Aleph Accompanying Documents part one • Batch_services_and_task_manager. ppt • Available on Documentation Center under Aleph > Support > How To from Support by subject > Batch_services_19+ • How to use the D parameter of job_list. conf_18+_yk. doc • How_to_add_UTIL_X_to_the_job_list. doc How_to_use_the_job_list_yk. ppt • • • All three job_list files are available on Documentation Center under Aleph > Support > How To from Support by subject > Miscellaneous How to configure Aleph timeout screens to redirect to a user defined URL. doc • Available on Documentation Center under Aleph > Support > How To from Support by subject > Web_OPAC 4

Accompanying Documents part two • Adding data files to the tablespace. doc • Available Accompanying Documents part two • Adding data files to the tablespace. doc • Available directly from Yoel • The Aleph Service Pack Mechanism - v 20. doc • Available on the Documentation Center under Aleph > Download Center>Service Packs>Version 20. x • Backup Package Guide. pdf • Available on the Documentation Center under Aleph Cross. Product > Technical Documentation > Backup Package • Aleph_start variables. doc • Available on Documentation Center under Aleph > Support > How To from Support by subject > Miscellaneous 5

Introduction • This presentation is designed for anyone curious about the Aleph 500 system Introduction • This presentation is designed for anyone curious about the Aleph 500 system setup and structure. • While, no previous Aleph 500 knowledge is required, a working knowledge of Unix and basic Oracle. • The typical audience is Aleph system librarians and IT staff Back to table of contents 6

Introduction • At anytime throughout the presentation you can link on the bottom of Introduction • At anytime throughout the presentation you can link on the bottom of the screen back to the table of contents and move to a new section. • The presentation is designed to be given live using a real server over the course of two days. • For suggested schedule see “Aleph 500 System Setup and Administration 2 Day Plan. ppt” Back to table of contents 7

Where is Aleph installed? • In a standard installation Aleph 500 is installed under Where is Aleph installed? • In a standard installation Aleph 500 is installed under the “/exlibris” directory of the server major. university 20_1 >>df -k Filesystem kbytes used /dev/dsk/c 1 t 0 d 0 s 0 965567 74617 /dev/dsk/c 1 t 0 d 0 s 3 5046030 avail capacity 833016 9% 973987 4021583 20% Mounted on / /usr /proc 0 0% /proc mnttab 0 0% /etc/ mnttab fd 0 0% /dev/ fd 152063 4843507 4% / var /dev/dsk/c 1 t 0 d 0 s 4 5046030 swap 20958792 24 20958768 1% / var/run swap 20988912 30144 20958768 1% /tmp /dev/dsk/c 2 t 1 d 0 s 0 236729928 155576656 78785976 /dev/dsk/c 2 t 1 d 0 s 1 236729928 119780172 114582460 /dev/dsk/c 1 t 0 d 0 s 6 20174761 2939432 17033582 /dev/dsk/c 1 t 0 d 0 s 5 3010671 /dev/md/dsk/d 20 70567065 51695886 20165509 1763 2948695 Back to table of contents 8 67% /exlibris 1 52% 15% 1% /exlibris 2 /local /opt 74% /exlibris

Where is Aleph installed? • Under the “/exlibris” directory, another directory “Aleph” contains the Where is Aleph installed? • Under the “/exlibris” directory, another directory “Aleph” contains the many facets of the Aleph 500 system. • The two main directories here are “a 20_n” and “u 20_n”* major. university 20_1 >>cd /exlibris major. university 20_1 >>ls aleph/ backup. orig/ ftp_from_exlibris/ app/ backup_package. 2. 0. tar lost+found/ backup_package. 2. 2. tar startup/ * tmp/ (the “ 20” and the “n” will change according to version and specific installation) Back to table of contents 9

General Tree Structure • Aleph Directory Structure: • . . /a 20_n (software and General Tree Structure • Aleph Directory Structure: • . . /a 20_n (software and demo libraries) • . . /u 20_n (site-specific libraries + alephe) major. university 20_1 >>cd /exlibris/aleph/ major. university 20_1 >>ls -1 rd ? 20_? u 20_2/ a 20_2/ Back to table of contents 10

The “u” and the “a” • Use of two main directories • . . The “u” and the “a” • Use of two main directories • . . /a 20_n = The “a” stands for Aleph. This is where the actual “software” (or “version”) of Aleph is located. When a new version (service pack) is installed, it overwrites parts of the current a 20_n directory. • . . /u 20_n = The “u” stands for “user”. This is where the library’s active libraries (private customized libraries) and active “Alephe” is located. When updates are installed (service pack), the /u 20_n is not overwritten. Back to table of contents 11

The a 20_2 directory The following are typical directories under the “a 20_2”. On The a 20_2 directory The following are typical directories under the “a 20_2”. On the following slides these directories are explained. major. university 20_1 >>cd /exlibris/aleph/ a 20_2/ major. university 20_1 >>ls aleph/ vir 01/ alephe. orig/ alephm/ apache_media/ demo_objects/ ext 01/ oracle/ usm 01/ usm 19/ usm 50/ ext 02/ illsv/ install/ log/ ng/ pds/ usm 10/ product/ usm 11/ product_source/ usm 12/ service_pack/ usm 14/ tmp/ usm 15/ usm 20/ usm 21/ usm 30/ usm 41/ usm 52/ usm 60/ usm 90/ usr 00/ Back to table of contents 12

The a 20_2 sub-directories aleph = Software, executables and scripts alephe = Node management The a 20_2 sub-directories aleph = Software, executables and scripts alephe = Node management - tables, parameters files (for demo) alephe. orig = copy of the “alephe” above. Active directory is under the u 20_n. More on this later. alephm = Software development and maintenance Programs log = Log files of web, pc and other servers oracle = Oracle Installation Files tmp = temporary directory usm 01 = Demonstration sample library usm 10 = Demonstration sample library version_upgrade = Programs used by Exlibris for conversions and upgrades (does not always exist) These directories will be further explained throughout the presentation. Back to table of contents 13

The u 20_2 directory • Contents of the u 20_2 directory major. university 20_1 The u 20_2 directory • Contents of the u 20_2 directory major. university 20_1 >>cd /exlibris/aleph/u 20_2/ major. university 20_1 >>ls ylk 01/ ylk 10/ ylk 11/ ylk 12/ ylk 30/ Active libraries to access these directories: dlib [library name] cd $data_root ylk 40/ ylk 50/ ylk 60/ alephe/ Active $alephe_root directory to access this directory: cd $alephe_root In this specific case the names of the libraries begin with “ylk”. This is just one specific example, but in all cases the active libraries will be under the “u” directory. They will merely have a different name. The dlib command will be explained later in this presentation. Back to table of contents 14

a 20_2 verses u 20_2 /exlibris/aleph/ a 20_2 usm 01 … alephm ylk 50 a 20_2 verses u 20_2 /exlibris/aleph/ a 20_2 usm 01 … alephm ylk 50 Active alephe ylk 01 ylk 10 We will now begin to look at the relevant a 20_2 subdirectories Back to table of contents 15

a 20_2/Aleph major. university 20_1 >>ls /exlibris/aleph/a 20_2/aleph backup/ www_x_eng/ exe/ pc_b_eng/ proc/ tab/ a 20_2/Aleph major. university 20_1 >>ls /exlibris/aleph/a 20_2/aleph backup/ www_x_eng/ exe/ pc_b_eng/ proc/ tab/ cgi/ headers/ pc_b_help_eng/ service_pack/ www_g_eng/ error_eng/ index_proc/ pc_exe/ soap/ www_n_eng/ error_eng = files with header messages of GUI and web pc_exe = the GUI executable files of the version pc_b_eng = xml files of the version (alias pcb) Back to table of contents 16

a 20_2/Alephe major. university 20_1 >>ls /exlibris/aleph/a 20_2/alephe. orig/ • During the installation the a 20_2/Alephe major. university 20_1 >>ls /exlibris/aleph/a 20_2/alephe. orig/ • During the installation the “version” alephe is often renamed to “alephe. orig” (to prevent any confusion between this Alephe and the customized Alephe). • In the alephe. orig directory exist the same files and directories that exist in the “u 20_2/Alephe”, but those in the “a 20_2” have not been customized. • They may therefore be referred to when making changes to those files in the “u 20_2/alephe”. Back to table of contents 17

a 20_2/usm 01 major. university 20_1 >>ls /exlibris/Aleph/a 20_2/usm 01 export/ scratch/ files/ pc_tab/ a 20_2/usm 01 major. university 20_1 >>ls /exlibris/Aleph/a 20_2/usm 01 export/ scratch/ files/ pc_tab/ file_list rlin_input_dir/ form_eng/ tab/ print/ file_list. examples/ rlin_output_dir/ import_files/ report/ prof_library • These sample libraries contain the same directories and files as the active library. • As a result, the sample libraries may always be consulted and tested upon before or during changes on the active library. • Changes on the usm libraries will not be reflected when end users and staff use the active libraries. Back to table of contents 18

u 20_2/ • We will now begin to discuss the contents of the u u 20_2/ • We will now begin to discuss the contents of the u 20_2 directory major. university 20_1 >>ls /exlibris/Aleph/u 20_2/ ylk 01/ ylk 10/ ylk 11/ ylk 12/ ylk 30/ ylk 40/ ylk 50/ ylk 60/ alephe/ active alephe, also known as alephe_root To access directory: cd $alephe_root Active libraries to access these directories: dlib [library name] cd $data_root Back to table of contents 19

u 20_2/alephe (alephe_root) major. university 20_1 >>ls /exlibris/aleph/u 20_2/alephe/ OR major. university 20_1 >>ls u 20_2/alephe (alephe_root) major. university 20_1 >>ls /exlibris/aleph/u 20_2/alephe/ OR major. university 20_1 >>ls $alephe_root Back to table of contents 20

Alephe_root files and sub directories - I aleph_shutdown = shuts down Aleph aleph_start = Alephe_root files and sub directories - I aleph_shutdown = shuts down Aleph aleph_start = contains various server variables aleph_start. private = contains library-specific variables aleph_startup = starts Aleph apache/ = contains files and directories for configuring the apache gate/ = contains files for configuring the z 39 gate. To access directory: cd $alephe_gate pc_server_defaults = determines defaults used by pc_server scratch/ = contains log files of batch jobs such as services. To access directory: cd $alephe_scratch or alias alephe_scratch Back to table of contents 21

Alephe_root files and sub directories - II tab/ = contains configuration files of system Alephe_root files and sub directories - II tab/ = contains configuration files of system wide (not library specific) parameters. To access directory: cd $Alephe_tab utf_files/ = contains files converted to utf before being displayed in web or GUI unicode/ = contains configuration files for unicode conversion. To access directory: cd $alephe_unicode www_server. conf = contains www server variables for web OPAC (called www_server_defaults in ver. 14) www_f_eng/ = contains vast majority of html pages of web OPAC. To access directory: alias wf Back to table of contents 22

Active and Demonstration libraries • Thus we see that we have active aleph libraries, Active and Demonstration libraries • Thus we see that we have active aleph libraries, such as those beginning in this case with ylk, and we have demonstration sample libraries, such as those beginning with USM and UNI. • The demonstration libraries are under the “a 20_2” directory, while the active Aleph libraries (including customized libraries) are under the “u 20_2” directory. • These two sets of libraries are defined respectively as $ALEPH_LIBS and $DEMO_LIBS, and they are defined in aleph_start and aleph_start. private (more will be discussed on these files later in the presentation). • The demonstration libraries are useful for practice exercises, checking “installation default” parameters, and experimentation on tables before changing those of the active libraries. Back to table of contents 23

Active and Demonstration libraries major. university 20_1 >>cd $Alephe_root major. university 20_1 >>grep DEMO_LIBS Active and Demonstration libraries major. university 20_1 >>cd $Alephe_root major. university 20_1 >>grep DEMO_LIBS aleph_start | grep -v ^# setenv DEMO_LIBS "usm 01 usm 10 usm 11 usm 12 usm 14 usm 15 usm 19" setenv DEMO_LIBS "$DEMO_LIBS usm 30 usm 40 usm 51" setenv DEMO_LIBS "$DEMO_LIBS usm 60 usm 90" setenv DEMO_LIBS "$DEMO_LIBS ext 01 ext 02 illsv" setenv DEMO_LIBS "$DEMO_LIBS vir 01 usr 00" setenv Aleph_LIBS "$DEMO_LIBS" major. university 20_1 >>grep ALEPH_LIBS aleph_start. private | grep -v ^# setenv ALEPH_LIBS "$ ALEPH_LIBS ylk 01 ylk 10 ylk 11 ylk 12 ylk 30 ylk 40 ylk 50 ylk 60" • demo libs are libraries which may be used as “practice” (demonstration) libraries. USM demo libs use USMARC, while UNI demo libs use UNIMARC. Back to table of contents 24

Active and Demonstration libraries major. university 20_1 >>echo $DEMO_LIBS usm 01 usm 10 usm Active and Demonstration libraries major. university 20_1 >>echo $DEMO_LIBS usm 01 usm 10 usm 11 usm 12 usm 14 usm 15 usm 19 usm 30 usm 40 usm 51 usm 60 usm 90 ext 01 ext 02 illsv vir 01 usr 00 major. university 20_1 >>echo $ALEPH_LIBS usm 01 usm 20 usm 90 ylk 10 usm 21 ext 01 ylk 11 usm 30 ext 02 ylk 12 usm 40 illsv ylk 30 usm 14 usm 50 vir 01 ylk 40 Back to table of contents 25 usm 15 usm 51 usr 00 ylk 50 usm 19 usm 60 ylk 01 ylk 60

Active and Demonstration libraries major. university 20_1 >>$aleph_proc/non_demo_libs ylk 01 ylk 10 ylk 11 Active and Demonstration libraries major. university 20_1 >>$aleph_proc/non_demo_libs ylk 01 ylk 10 ylk 11 ylk 12 ylk 30 ylk 40 ylk 50 ylk 60 major. university 20_1 >> Back to table of contents 26

u 20_2 active libraries major. university 20_1 >>ls /exlibris/aleph/u 20_2/ylk 01/ files/ conv/ store/ u 20_2 active libraries major. university 20_1 >>ls /exlibris/aleph/u 20_2/ylk 01/ files/ conv/ store/ file_list tab/ file_list. examples/ file_list_ls import_files/ form_dev/ rlin_input_dir pc_tab/ sql_private/ rlin_input_dir 1/ form_eng/ print/ rlin_output_dir/ prof_library form_kor/ scratch/ report/ source/ Back to table of contents 27

u 20_2 active libraries’ files and directories - I file_list = list of the u 20_2 active libraries’ files and directories - I file_list = list of the oracle tables in library and the space assigned to them (defaults taken from template if tables do not appear in file list) files = oracle tables are placed here when uploaded via p_file_04. The batch log is also here. To access directory: cd $data_files or alias df 1 form_eng/ = contains templates used for letters and forms printed via the batch jobs (services) import_files/ = Files are placed here which will later be uploaded by special services. For example RLIN and Yankee Book Peddler files will go here. Back to table of contents 28

u 20_2 active libraries’ files and directories - II pc_tab/ = Contains the “catalog” u 20_2 active libraries’ files and directories - II pc_tab/ = Contains the “catalog” directory, which contains fields such as templates used by the GUI cataloging module. To access directory: cd $data_pc_tab print/ = contains print output files from the services. To access directory: cd $data_print or alias dp prof_library = contains specific variables used by each library scratch/ = contains intermediary and log files. To access directory: cd $data_scratch or alias ds tab/ = contains library parameter and configuration tables. To access directory: cd $data_tab or alias dt Back to table of contents 29

Library naming conventions • Each library consists of a three letter code plus two Library naming conventions • Each library consists of a three letter code plus two digits • The 4 th digit determines the type of library: • sak 01 = bibliographic library • sak 10 = authority library • sak 30 = course reading library • sak 40 = ILL (Inter Library Loan) library • sak 50 = Administrative library • sak 60 = Holdings library Back to table of contents 30

Library naming conventions • Examples of a real library directories kortick-a 20(2) >>ls -1 Library naming conventions • Examples of a real library directories kortick-a 20(2) >>ls -1 rd $alephe_dev/? ? ? /exlibris/aleph/u 20_2/yka 00/ /exlibris/aleph/u 20_2/ext 01/ bibliographic /exlibris/aleph/u 20_2/yka 01/ /exlibris/aleph/u 20_2/yka 10/ authority /exlibris/aleph/u 20_2/ykb 30/ /exlibris/aleph/u 20_2/ykl 30/ /exlibris/aleph/u 20_2/ykt 30/ Course reading /exlibris/aleph/u 20_2/ykb 40/ ILL /exlibris/aleph/u 20_2/ykl 40/ /exlibris/aleph/u 20_2/ykt 40/ /exlibris/aleph/u 20_2/yka 50/ /exlibris/aleph/u 20_2/ykb 50/ Administrative /exlibris/aleph/u 20_2/ykl 50/ /exlibris/aleph/u 20_2/ykt 50/ /exlibris/aleph/u 20_2/yka 60/ Holding /exlibris/aleph/u 20_2/illsv/ Back to table of contents 31

Library naming conventions • The library types are defined in the prof_library ylk@bylkprod(a 20_1): Library naming conventions • The library types are defined in the prof_library [email protected](a 20_1): ~/u 20_1>grep file_list_type ? ? ? /prof_library ext 01/prof_library: setenv file_list_type NONE ylk 01/prof_library: setenv file_list_type BIB ylk 10/prof_library: setenv file_list_type AUT ylk 11/prof_library: setenv file_list_type AUT ylk 30/prof_library: setenv file_list_type COURSE ylk 40/prof_library: setenv file_list_type ILL ylk 50/prof_library: setenv file_list_type ADM ylk 60/prof_library: setenv file_list_type HOL illsv/prof_library: setenv file_list_type ILLSV ozy 01/prof_library: setenv file_list_type BIB ozy 10/prof_library: setenv file_list_type AUT btz 01/prof_library: setenv file_list_type BIB btz 10/prof_library: setenv file_list_type AUT Back to table of contents 32

Aliases and variables • The vast majority of previously mentioned directories have both variables Aliases and variables • The vast majority of previously mentioned directories have both variables and aliases. • For example, one can access the “print” directory of each library by typing cd $data_print or the alias dp. • This makes the system more efficient when programs are running, and also more user friendly for the systems librarians to navigate through the server. • We will now discuss how and where these variables are assigned. Back to table of contents 33

Aliases and variables Many of the variables and aliases are defined in the following Aliases and variables Many of the variables and aliases are defined in the following files: • /exlibris/aleph/u 20_2/alephe/aleph_start • /exlibris/aleph/a 20_2/alephm/prof_master • /exlibris/aleph/a 20_2/aleph/proc/def_local_env • /exlibris/aleph/a 20_2/aleph/proc/def_lib_env • /exlibris/aleph/u 20_2/ylknn/prof_library [where “ylknn” is name of specific library) Back to table of contents 34

Aliases and variables How does it all work? 1. The user (systems librarian or Aliases and variables How does it all work? 1. The user (systems librarian or systems administrator) logs in with aleph username (for example “aleph”) 2. Files are activated via parameters in file /etc/passwd for username 3. Each activated file determines variables and aliases, and in some cases activates other files 4. This particular issue of how the files are activated is discussed more in depth in the “user and login process” section. Back to table of contents 35

Aliases and variables /exlibris/aleph/u 20_n/alephe/aleph_start OR $alephe_root/aleph_start • Located in the active Alephe root Aliases and variables /exlibris/aleph/u 20_n/alephe/aleph_start OR $alephe_root/aleph_start • Located in the active Alephe root directory • Invoked by every Aleph process • Contains definitions and the logical assignments for the system • • Activates aleph_start. private contains definitions and the logical assignments for the particular installation Back to table of contents 36

Aliases and variables: aleph_start For example, $aleph_dev and $alephe_root are both assigned in aleph_start: Aliases and variables: aleph_start For example, $aleph_dev and $alephe_root are both assigned in aleph_start: major. university 20_1 >>cd $alephe_root major. university 20_1 >>grep "setenv aleph_dev alephe_root" aleph_start $ alephe_dev/alephe aleph_dev" aleph_start ${ALEPH_MOUNT}/ a${ALEPH_VERSION}_$ALEPH_COPY Back to table of contents 37

Aliases and variables: def_local_env • $ALEPH_MOUNT/a 20_2/aleph/proc/def_local_env • Works across all libraries • Executed Aliases and variables: def_local_env • $ALEPH_MOUNT/a 20_2/aleph/proc/def_local_env • Works across all libraries • Executed on every process and user login Back to table of contents 38

Aliases and variables: def_lib_env • $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env • Located in $ALEPH_MOUNT/aleph/proc/def_lib_env • Defines library Aliases and variables: def_lib_env • $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env • Located in $ALEPH_MOUNT/aleph/proc/def_lib_env • Defines library environment • Defined for each library • major. university 20_1 >>cd $ALEPH_MOUNT/a 20_2/aleph/proc/ For example, the data_root and data_tab aliases are major. university 20_1 >>pwd defined here: /exlibris/aleph/a 20_2/aleph/proc major. university 20_1 >>grep data_tab def_lib_env alias dt 'cd $data_tab' alias data_tab 'cd $data_tab' major. university 20_1 >>grep data_root def_lib_env alias dr 'cd $data_root/!*' alias data_root 'cd $data_root/!*' Back to table of contents 39

Aliases and variables: def_lib_env $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env • The aliases defined in def_lib_env will bring Aliases and variables: def_lib_env $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env • The aliases defined in def_lib_env will bring the user to a different directory, depending on the library in which he is located. • For example, data_tab in ylk 50 is different than data_tab in ylk 01, because it is the tab directory of a different library. • After performing “dlib [library name]” the aliases of def_lib_env will bring the user to the correct destination. Back to table of contents 40

Aliases and variables: def_lib_env $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env aleph@kortickprod(a 20_1) ylk 01 -aleph>> dlib ylk 01 Aliases and variables: def_lib_env $ALEPH_MOUNT/a 20_2/aleph/proc/def_lib_env [email protected](a 20_1) ylk 01 -aleph>> dlib ylk 01 [email protected](a 20_1) ylk 01 -aleph>> dr [email protected](a 20_1) ylk 01 -aleph>>pwd data_root of ylk 01 /exlibris/aleph/u 20_2/ylk 01 [email protected](a 20_1) ylk 01 -aleph>> dt [email protected](a 20_1) ylk 01 -aleph>>pwd data_tab of ylk 01 /exlibris/aleph/u 20_2/ylk 01/tab [email protected](a 20_1) ylk 50 -aleph>> dlib ylk 50 [email protected](a 20_1) ylk 50 -aleph>> dr [email protected](a 20_1) ylk 50 -aleph>>pwd data_root of ylk 50 /exlibris/aleph/u 20_2/ylk 50 [email protected](a 20_1) ylk 50 -aleph>> dt [email protected](a 20_1) ylk 50 -aleph>>pwd data_tab of ylk 50 /exlibris/aleph/u 20_2/ylk 50/tab Back to table of contents 41

Aliases and variables: prof_master $alephm_root/prof_master • Located in $aleph_root directory /exlibris/aleph/a 20_2/alephm (alias am) Aliases and variables: prof_master $alephm_root/prof_master • Located in $aleph_root directory /exlibris/aleph/a 20_2/alephm (alias am) • Defines profile for Unix user Aleph. Back to table of contents 42

Aliases and variables: prof_library is located in each library’s data_root directory aleph@kortickprod(a 20_1) ylk Aliases and variables: prof_library is located in each library’s data_root directory [email protected](a 20_1) ylk 01 -aleph>>cd $data_root [email protected](a 20_1) ylk 01 -aleph>>grep "setenv data" prof_library setenv data_root $ylk 01_dev/ylk 01 setenv data_tab $ylk 01_dev/ylk 01/tab setenv data_pc_tab $ylk 01_dev/ylk 01/pc_tab setenv data_scratch $ylk 01_dev/ylk 01/scratch setenv data_source $ylk 01_dev/ylk 01/source setenv data_files $ylk 01_dev/ylk 01/files setenv data_print $ylk 01_dev/ylk 01/print [email protected](a 20_1) ylk 50 -aleph>>cd $data_root [email protected](a 20_1) ylk 50 -aleph>>grep "setenv data" prof_library setenv data_root $ylk 50_dev/ylk 50 setenv data_pc_tab $ylk 50_dev/ylk 50/pc_tab setenv data_tab $ylk 50_dev/ylk 50/tab setenv data_scratch $ylk 50_dev/ylk 50/scratch setenv data_files $ylk 50_dev/ylk 50/files setenv data_print $ylk 50_dev/ylk 50/print Back to table of contents 43

Aliases and variables: prof_library • The previous slide showed prof_library in the ylk 01 Aliases and variables: prof_library • The previous slide showed prof_library in the ylk 01 and ylk 50 libraries • The prof_library referred to directories ylk 01_dev and ylk 50_dev • These directories are defined in aleph_start. provate: [email protected](a 20_1): ~/u 20_1/alephe>egrep 'hai 50_dev|hai 01_dev' aleph_start. private setenv ylk 01_dev ${USER_MOUNT}/u${ALEPH_VERSION}_$ALEPH_COPY setenv ylk 50_dev ${USER_MOUNT}/u${ALEPH_VERSION}_$ALEPH_COPY [email protected](a 20_1): ~/u 20_1/alephe> Back to table of contents 44

Client server architecture • Aleph uses a client-server architecture • The application servers maintain Client server architecture • Aleph uses a client-server architecture • The application servers maintain constant contact with the database (including a “time-out”) • This ensures high performance Back to table of contents 45

Client server architecture Clients “middle man” PC SERVER WWW SERVER Terminal SERVER Z 39. Client server architecture Clients “middle man” PC SERVER WWW SERVER Terminal SERVER Z 39. 50 SERVER Configuration tables on server and PC client (GUI) Relational Database Management System (RDBMS) server(s) Back to table of contents 46

The user and the login process behind the scenes • This subject was already The user and the login process behind the scenes • This subject was already briefly discussed in the section regarding aliases • Now we will go more in depth Back to table of contents 47

The user and the login process behind the scenes • When a user logs The user and the login process behind the scenes • When a user logs in various definitions are taken from the system • A series of files are then activated (or “sourced”) • Each file defines variables, aliases, and / or sources “additional” files • In this way the user has the “proper” environment for Aleph • The following slide shows the order of actions Back to table of contents 48

The user and the login process behind the scenes 1. Aleph user logs in The user and the login process behind the scenes 1. Aleph user logs in 4. $HOME/def_version does a “source” on $alephm_root/. cshrc 2. /exlibris/aleph/. cshrc is “sourced” 3. /exlibris/aleph/. cshrc does “source” on $HOME/def_version 5. $alephm_root/. cshrc does “source” on $alephe_root/aleph_start and $alephm_root/prof_master • After step 5 the system is “ready” • aleph_start gives system wide variables and also does source on aleph_start. private”, which gives “installation-specific” variables • prof_master gives system wide aliases and also sources $aleph_proc/def_local_env Back to table of contents 49

The user and the login process behind the scenes • Now we will show The user and the login process behind the scenes • Now we will show the process more in depth • Each aleph installation is associated with a Unix user. • If one server has multiple installations then a menu will exist at login Back to table of contents 50

The user and the login process behind the scenes • Here is a sample The user and the login process behind the scenes • Here is a sample UID and GID (User ID and Group ID) on a real server [email protected](a 20_1) >>id uid=201(aleph) gid=501(exlibris) groups=501(exlibris) • Here are the properties for the user [email protected](a 20_1) >>ls -l /etc/passwd -rw-r--r-- 1 root 1784 Aug 29 2010 /etc/passwd kortick-a 20(2) >>grep ^aleph /etc/passwd aleph: x: 201: 501: : /exlibris/aleph: /bin/tcsh User name UID Home directory GID Back to table of contents 51 Login shell

The user and the login process behind the scenes • The “shadow” file contains The user and the login process behind the scenes • The “shadow” file contains an encrypted version of the Unix password and is not visible to “ordinary” users [email protected](a 20_1) >> ls -l /etc/shadow -r---- 1 root 1272 Dec 1 2009 /etc/shadow kortick-a 20(2) >>cat /etc/shadow cat: /etc/shadow: Permission denied • The “groups” file defines the groups to which users belong [email protected](a 20_1) >> ls -l /etc/group -rw-r--r-- 1 root 615 Dec 1 2009 /etc/group kortick-a 20(2) >>grep exlibris /etc/group exlibris: x: 501: kortick-a 20(2) >> Back to table of contents 52

The user and the login process behind the scenes • User “aleph” logs in The user and the login process behind the scenes • User “aleph” logs in … [email protected](a 20_1) >>ls -l /etc/passwd -rw-r--r-- 1 root 1784 Aug 29 2010 /etc/passwd [email protected](a 20_1) >>grep ^aleph /etc/passwd aleph: x: 201: 501: : /exlibris/aleph: /bin/tcsh User name UID Home directory GID Login shell • The file. cshrc in directory /exlibris/aleph is activated • The file. cshrc is activated (sourced) in this directory because this is the directory which is defined above in /etc/passwd as the home directory Back to table of contents 53

The user and the login process behind the scenes • The file /exlibris/aleph/. cshrc The user and the login process behind the scenes • The file /exlibris/aleph/. cshrc performs a “source” on $HOME/def_version [email protected](a 20_1) >>cat /exlibris/aleph/. cshrc if ( ! $? prompt ) then exit endif echo "Execute aleph cshrc" umask 002 setenv LOGIN_PID $$ source $HOME/def_version setenv IGNORE Y [email protected](a 20_1) >> Back to table of contents 54

The user and the login process behind the scenes • The file $HOME/def_version performs The user and the login process behind the scenes • The file $HOME/def_version performs a “source” on /exlibris/aleph/a 20_2/alephm/. cshrc (also known as alephm_root/. cshrc) eval set _exlibris_ver=$login$_exlibris_copy if ( -d ${_exlibris_ver}/alephm ) then echo "cd ${_exlibris_ver}/alephm" cd ${_exlibris_ver}/alephm if ( -e ${_exlibris_ver}/alephm/. cshrc ) then source ${_exlibris_ver}/alephm/. cshrc endif else … endif Back to table of contents 55

The user and the login process behind the scenes • The file /exlibris/aleph/a 20_2/alephm/. The user and the login process behind the scenes • The file /exlibris/aleph/a 20_2/alephm/. cshrc then does source on files $alephe_root/aleph_start and $alephm_root/prof_master [email protected](a 20_1) >>cat /exlibris/aleph/a 20_2/alephm/. cshrc … source /exlibris/aleph/u 20_2/alephe/aleph_start source $alephm_dev/alephm/prof_master setenv ALEPH_SHELL /bin/tcsh setenv ALEPH_ADMIN source $aleph_proc/aleph_admin setenv ALEPH_CTX CTXSYS source $aleph_proc/aleph_ctx [email protected](a 20_1) >> Back to table of contents 56

The user and the login process behind the scenes • The file $alephe_root/aleph_start defines The user and the login process behind the scenes • The file $alephe_root/aleph_start defines many environmental variables and also does source on $alephe_root/aleph_start. private • The file $alephe_root/aleph_start defines many environmental variables which are library specific • The file $alephm_root/prof_master defines many aliases and also does source on file $aleph_proc/def_local_env • The file $aleph_proc/def_local_env will be explained at a later unspecified time Back to table of contents 57

aleph_startup and aleph_shutdown • The file $alephe_root/aleph_startup may be used to restart aleph and aleph_startup and aleph_shutdown • The file $alephe_root/aleph_startup may be used to restart aleph and all related background daemons • The file $alephe_root/aleph_shutdown may be used to stop aleph and all related background daemons Back to table of contents 58

aleph_startup and aleph_shutdown • aleph_startup and aleph_shutdown are often run, for example, before and aleph_startup and aleph_shutdown • aleph_startup and aleph_shutdown are often run, for example, before and after doing backup, or before and after rebooting the server. • These files ensure that background daemons will be started and stopped correctly and will use correct variables and parameters Back to table of contents 59

aleph_startup and aleph_shutdown aleph@kortickprod(a 20_1) YLK 50> egrep 'csh -f|source' aleph_startup | perl -pi aleph_startup and aleph_shutdown [email protected](a 20_1) YLK 50> egrep 'csh -f|source' aleph_startup | perl -pi -e "s/^s*//" #!/bin/csh -f source /exlibris/aleph/u 20_1/alephe/aleph_start source $aleph_proc/def_local_env Source and csh commands in aleph_startup. Part 1 of 2 source $aleph_proc/define_server_params csh -f $aleph_proc/jobd $ALEPH_VERSION >& /dev/null & csh -f $aleph_proc/pc_server $l_pc_server_port >& /dev/null & csh -f $aleph_proc/www_server $l_www_server_port $l_httpd_port $l_n_of_servers >& /dev/null & csh -f $aleph_proc/z 39_server $l_z 39_server_port >& /dev/null & csh -f $aleph_proc/z 39_gate $l_z 39_gate_port >& /dev/null & csh -f $aleph_proc/oclc_server $l_oclc_server_port >& /dev/null & csh -f $aleph_proc/ncip_server csh -f $aleph_proc/vst_server $l_vst_server_port >& /dev/null & csh -f $aleph_proc/slnp_server $n >& /dev/null & Back to table of contents 60

aleph_startup and aleph_shutdown csh -f $aleph_proc/sip 2_server $n >& /dev/null & csh -f $aleph_proc/sc_server aleph_startup and aleph_shutdown csh -f $aleph_proc/sip 2_server $n >& /dev/null & csh -f $aleph_proc/sc_server $n >& /dev/null & csh -f $aleph_proc/sru_server $l_sru_server_port >& /dev/null & source $aleph_proc/util_e_01 source $aleph_proc/util_e_08 source $aleph_proc/util_e_06 Source and csh commands in aleph_startup. Part 2 of 2 source $aleph_proc/util_e_11 source $aleph_proc/util_e_13 source $aleph_proc/util_e_01 source $aleph_proc/util_e_17 source $aleph_proc/util_e_19 source $aleph_proc/util_e_21 csh -f $aleph_proc/ill_server $l_ill_server_port >& /dev/null & [email protected](a 20_1) YLK 50> Back to table of contents 61

aleph_startup and aleph_shutdown • The jboss may also be started and stopped via aleph_startup aleph_startup and aleph_shutdown • The jboss may also be started and stopped via aleph_startup and aleph_shutdown [email protected](a 20_1) YLK 50> tail -15 aleph_startup #********************** # J BOSS #********************** cd $aleph_dev/ng/aleph/home/system/bin bash jboss_startup. sh echo "All done " exit: alias alephver "$sav_alephver_alias" rm_f_symbol [email protected](a 20_1) YLK 50> Back to table of contents 62

Node management • Library • The actual building with the physical collection of items Node management • Library • The actual building with the physical collection of items • An Oracle database user with tables of data • A UNIX directory Back to table of contents 63

Node management • Node management in this case may be defined as the management Node management • Node management in this case may be defined as the management of particular library or directory • “Library” here refers to the directory of files for a type of Aleph library (ylk 01 and ylk 50) for example), and not to the physical building containing the library collection. Back to table of contents 64

Node management • In the section on the login process we have already stated Node management • In the section on the login process we have already stated that system-wide variables are obtained via a series of files sourcing other files: 1. /exlibris/aleph/. cshrc 2. $HOME/def_version 3. $alephm_root/. cshrc 4. $alephe_root/aleph_start 1. 5. $alephe_root/aleph_start. private $alephm_root/prof_master 1. $aleph_proc/def_local_env Back to table of contents 65

Node management • Now we will discuss the variables for the particular library • Node management • Now we will discuss the variables for the particular library • “dlib” creates environmental variables for a specific library [email protected](a 20_1) > dlib ylk 50 [email protected](a 20_1) YLK 50> cd $data_root [email protected](a 20_1) YLK 50> pwd ylk 50 environment /exlibris/aleph/u 20_1/ylk 50 [email protected](a 20_1) YLK 50> dlib ylk 01 [email protected](a 20_1) YLK 01> cd $data_root [email protected](a 20_1) YLK 01> pwd /exlibris/aleph/u 20_1/ylk 01 Back to table of contents 66 ylk 01 environment

Node management • “dlib” is an alias used at the command line and followed Node management • “dlib” is an alias used at the command line and followed by a library name in lowercase • It sets an environment by getting variables for a specific library [email protected](a 20_1): ~/a 20_1/alephm>alias dlib set source_par = "!*"; source $alephm_proc/set_lib_env; unset source_par [email protected](a 20_1): ~/a 20_1/alephm> Back to table of contents 67

Node management • The “dlib” command does “source” on $alephm_proc/set_lib_env • $alephm_proc/set_lib_env then does Node management • The “dlib” command does “source” on $alephm_proc/set_lib_env • $alephm_proc/set_lib_env then does “source” on $data_root/prof_library of the “dlibbed” library • $data_root/prof_library obtains the library variables and does “source” on: • $aleph_proc/def_local_env • $aleph_proc/def_lib_prompt Back to table of contents 68

Node management • After dlibbing to ylk 50 the $data_tab is: /exlibris/aleph/u 20_1/ylk 50/tab Node management • After dlibbing to ylk 50 the $data_tab is: /exlibris/aleph/u 20_1/ylk 50/tab • After dlibbing to ylk 01 the $data_tab is: /exlibris/aleph/u 20_1/ylk 01/tab • After dlibbing, the prof_library of the dlibbed library is sourced, so each library has it’s own set of variables Back to table of contents 69

Node management aleph@kortickprod(a 20_1) YLK 40> tail -26 $alephe_dev/ylk 01/prof_library | head -9 setenv Node management [email protected](a 20_1) YLK 40> tail -26 $alephe_dev/ylk 01/prof_library | head -9 setenv data_root $ylk 01_dev/ylk 01 setenv data_tab $ylk 01_dev/ylk 01/tab setenv data_pc_tab $ylk 01_dev/ylk 01/pc_tab setenv data_scratch $ylk 01_dev/ylk 01/scratch setenv data_files $ylk 01_dev/ylk 01/files setenv data_print $ylk 01_dev/ylk 01/print setenv data_store $ylk 01_dev/ylk 01/store setenv form_eng $ylk 01_dev/ylk 01/form_eng # [email protected](a 20_1) YLK 40> tail -26 $alephe_dev/ylk 10/prof_library | head -9 setenv data_root $ylk 10_dev/ylk 10 setenv data_tab $ylk 10_dev/ylk 10/tab setenv data_pc_tab $ylk 10_dev/ylk 10/pc_tab setenv data_scratch $ylk 10_dev/ylk 10/scratch setenv data_files $ylk 10_dev/ylk 10/files setenv data_print $ylk 10_dev/ylk 10/print setenv data_store $ylk 10_dev/ylk 10/store Back to table of contents 70

path_convert • path_convert is used to redirect the usage of files, tables and entire path_convert • path_convert is used to redirect the usage of files, tables and entire directories • If the same file is used by several libraries then instead of maintaining an identical file in several places, path_convert is used to say “always use the file in directory … • path_convert is located in the $data_tab of each library Back to table of contents 71

path_convert • On the following slides we see a library with 3 Administrative libraries, path_convert • On the following slides we see a library with 3 Administrative libraries, 3 course reading libraries, 2 ILL libraries, one Holding library and 1 bibliographic library. • Rather than maintaining 9 different form_eng directories they have one directory in the bibliographic library which is used by all other libraries Back to table of contents 72

path_convert • The authority library uses form_eng and form_fre in the bibliographic library kortick-a path_convert • The authority library uses form_eng and form_fre in the bibliographic library kortick-a 20(2) >>cd $alephe_dev kortick-a 20(2) >>grep 'form_. . . ' ? ? ? 1? /tab/path_convert $gef 10_dev/gef 10/form_eng $gef 01_dev/gef 01/form_eng $gef 10_dev/gef 10/form_fre $gef 01_dev/gef 01/form_fre Back to table of contents 73

path_convert • Three different course reading libraries all use form_eng and form_fre in the path_convert • Three different course reading libraries all use form_eng and form_fre in the bibliographic library kortick-a 20(2) >>cd $alephe_dev kortick-a 20(2) >>grep 'form_. . . ' ? ? ? 3? /tab/path_convert ben 30/tab/path_convert: $ben 30_dev/ben 30/form_eng $gef 01_dev/gef 01/form_eng ben 30/tab/path_convert: $ben 30_dev/ben 30/form_fre $gef 01_dev/gef 01/form_fre lil 30/tab/path_convert: $lil 30_dev/lil 30/form_eng $gef 01_dev/gef 01/form_eng lil 30/tab/path_convert: $lil 30_dev/lil 30/form_fre $gef 01_dev/gef 01/form_fre ozy 30/tab/path_convert: $ozy 30_dev/ozy 30/form_eng $gef 01_dev/gef 01/form_eng ozy 30/tab/path_convert: $ozy 30_dev/ozy 30/form_fre $gef 01_dev/gef 01/form_fre Back to table of contents 74

path_convert Two different ILL libraries (lil 40 and ozy 40) both use form_eng and path_convert Two different ILL libraries (lil 40 and ozy 40) both use form_eng and form_fre in the ILL library ben 40 • kortick-a 20(2) >>cd $alephe_dev kortick-a 20(2) >>grep 'form_. . . ' ? ? ? 4? /tab/path_convert lil 40/tab/path_convert: $lil 40_dev/lil 40/form_eng $ben 40_dev/ben 40/form_eng lil 40/tab/path_convert: $lil 40_dev/lil 40/form_fre $ben 40_dev/ben 40/form_fre ozy 40/tab/path_convert: $ozy 40_dev/ozy 40/form_eng $ben 40_dev/ben 40/form_eng ozy 40/tab/path_convert: $ozy 40_dev/ozy 40/form_fre $ben 40_dev/ben 40/form_fre kortick-a 20(2) >> • These do not point to the bibliographic library Back to table of contents 75

path_convert • Three different Administrative libraries all use form_eng and form_fre in the bibliographic path_convert • Three different Administrative libraries all use form_eng and form_fre in the bibliographic library kortick-a 20(2) >>cd $alephe_dev kortick-a 20(2) >>grep 'form_. . . ' ? ? ? 5? /tab/path_convert ben 50/tab/path_convert: $ben 50_dev/ben 50/form_eng $gef 01_dev/gef 01/form_eng ben 50/tab/path_convert: $ben 50_dev/ben 50/form_fre $gef 01_dev/gef 01/form_fre lil 50/tab/path_convert: $lil 50_dev/lil 50/form_eng $gef 01_dev/gef 01/form_eng lil 50/tab/path_convert: $lil 50_dev/lil 50/form_fre $gef 01_dev/gef 01/form_fre ozy 50/tab/path_convert: $ozy 50_dev/ozy 50/form_eng $gef 01_dev/gef 01/form_eng ozy 50/tab/path_convert: $ozy 50_dev/ozy 50/form_fre $gef 01_dev/gef 01/form_fre Back to table of contents 76

path_convert • The Holding library uses form_eng and form_fre in the bibliographic library kortick-a path_convert • The Holding library uses form_eng and form_fre in the bibliographic library kortick-a 20(2) >>cd $alephe_dev kortick-a 20(2) >>grep 'form_. . . ' ? ? ? 6? /tab/path_convert $gef 60_dev/gef 60/form_eng $gef 01_dev/gef 01/form_eng $gef 60_dev/gef 60/form_fre $gef 01_dev/gef 01/form_fre Back to table of contents 77

path_convert • Instead of maintaining 9 directories, only one is needed gef 10/form_eng ben path_convert • Instead of maintaining 9 directories, only one is needed gef 10/form_eng ben 30/form_eng ben 50/form_eng gef 01/form_eng lil 50/form_eng lil 30/form_eng ozy 50/form_eng ozy 30/form_eng gef 60/form_eng Back to table of contents 78

Util C and the batch queue • The batch queue is used to determine Util C and the batch queue • The batch queue is used to determine the order and time of jobs running • Often it is desired to have one job complete before another job starts, for example • Indexing in authority library before indexing in bibliographic library • Having an output file of one job used as an input file in another job Back to table of contents 79

Util C and the batch queue This is also available via the GUI. See Util C and the batch queue This is also available via the GUI. See separate presentation on this Back to table of contents 80

Util C and the batch queue • Via util C 1 “Check Library Running Util C and the batch queue • Via util C 1 “Check Library Running Process “ we see all running processes in the library, including the batch queue Back to table of contents 81

Util C and the batch queue • Via util C 7 “Show Queue of Util C and the batch queue • Via util C 7 “Show Queue of Jobs Awaiting Execution” we see all jobs which are waiting in the batch queue The first job will run at 19: 00 The second job will run at 22: 00 Back to table of contents 82

Util C and the batch queue Via $alephe_tab/tab_library_group is it possible to determine that Util C and the batch queue Via $alephe_tab/tab_library_group is it possible to determine that different libraries will share the batch queue • ! 1 2 3 4 5 6 7 8 9 !!!!!-!!!!!-!!!!!-!!!!!-!!!!!> YLK 00 YLK 01 YLK 10 YLK 50 YLK 60 YLK 40 • YLK 01 and YLK 10 share the same batch queue • If a job in YLK 10 is sent and then a job in YLK 01 is sent then the job in YLK 01 will not start until the job in YLK 10 finishes Back to table of contents 83

Util C and the batch queue • In this case if the user were Util C and the batch queue • In this case if the user were to try to start the batch queue in YLK 10 he would get this message: *** util_c_02 - start YLK 10 batch queue *** lib_batch for YLK 10 is managed by YLK 01, aborting. . . Back to table of contents 84

Util W server management • Used to stop, start and monitor various servers (servers Util W server management • Used to stop, start and monitor various servers (servers running on the server) W. Server and Daemon Management (WWW, PC, Z 39) ---------------------0. Exit Procedure 1. Monitor Servers 2. Stop Servers 3. Start Servers 4. View Log File 5. View/Update Global System status Back to table of contents 85

Util W server management Option 1 to monitor servers will state which servers are Util W server management Option 1 to monitor servers will state which servers are running • Monitor Servers 0. Exit Procedure 1. All Servers 2. WWW Server 4. PC Server 5. Z 39 Server 6. Z 39 Gate 7. Other Server 8. Monitor by Port Number 9. Change Loop Status Enter Number [0] Back to table of contents 86

Util W server management • Here we choose option 2 “WWW Server” and see Util W server management • Here we choose option 2 “WWW Server” and see which servers are running | Port | Pid | Server Type | Started At | Status |---------|-----------------|----------| 4993 | 32719 | WWW Server | Apr 13 07: 14: 04 | Free | 4993 | 32764 | WWW Server c | Apr 13 07: 14: 04 | Free | 4993 | 32762 | WWW Server c | Apr 13 07: 14: 04 | Free | 4993 | 32763 | WWW Server c | Apr 13 07: 14: 04 | Free | 4993 | 32765 | WWW Server c | Apr 13 07: 14: 04 | Free | 4993 | 32766 | WWW Server c | Apr 13 07: 14: 04 | Free Enter CR to continue. . . Back to table of contents 87

Util W server management Util W 3 is used to start (or restart) servers Util W server management Util W 3 is used to start (or restart) servers • Start Servers 0. Exit Procedure 1. WWW Server 3. PC Server 4. Z 39 Server 5. Z 39 Gate 6. HTTP (Apache) Server (Root Password is Required for HTTPD_PORT<1024) 7. Other Server Enter Number [0] Back to table of contents 88

Util W server management • It is often necessary to restart the pc or Util W server management • It is often necessary to restart the pc or www server after changing a configuration table or html page • The changes will only take effect when the pc or www server is restarted and the user reconnects via the web or GUI • The servers are in any case restarted on a regular basis, for example when Aleph is shut down and restarted, for example when backup is done at night Back to table of contents 89

Methods to stop and start Aleph • The Unix Startup / Shutdown script • Methods to stop and start Aleph • The Unix Startup / Shutdown script • Main startup/shutdown script for Aleph and other Ex Libris products is “/etc/init. d/exlibris” • This script has symbolic links in /etc/rc 3. d, /etc/rc 0. d, /etc/rc 1. d • Script requires 1 parameter: • • • “start” – for startup “stop” – for shutdown Script starts/stops 3 components: 1. Oracle 2. Aleph (and other Ex Libris products) 3. Apache Back to table of contents 90

Methods to stop and start Aleph • The Unix Startup / Shutdown script yoelk@il-aleph Methods to stop and start Aleph • The Unix Startup / Shutdown script [email protected] 07(a 20_3) USM 01> cat /etc/ init. d/exlibris #!/bin/bash # # Exlibris Starts Ex. Libris products # # # chkconfig: 2345 98 10 # description: Ex Libris products + oracle ### BEGIN INIT INFO # Provides: $exlibris What happens when ### END INIT INFO run with “start” cd /exlibris/startup case "$1" in 'start'). /start_stop start ; ; 'stop') if [ -f fast_shutdown ] ; then csh -f fast_shutdown else What happens when. /start_stop run with “stop” fi ; ; esac Back to table of contents 91

Methods to stop and start Aleph • • The Unix Startup / Shutdown script Methods to stop and start Aleph • • The Unix Startup / Shutdown script The file init. dat defines which components to stop and start [email protected](a 20_1): /exlibris/startup>cat init. dat # oracle Y: oracle: /exlibris/app/oracle/product/11 # apache Y: apache: root: httpd: /exlibris/aleph/u 20_1: . . /a 20_1: apachectl_auto: apachectl # aleph Y: aleph: /exlibris/aleph/u 20_1: aleph_startup: aleph_shutdown [email protected](a 20_1): /exlibris/startup> Back to table of contents 92

Methods to stop and start Aleph • Aleph can be stopped and started automatically Methods to stop and start Aleph • Aleph can be stopped and started automatically or via one of the manual methods • Three methods to manually start and stop Aleph 1. Reboot the server 2. As root user, run /etc/init. d/exlibris start/stop 3. As root user, run /exlibris/startup/start_stop start/stop Back to table of contents 93

Methods to stop and start Aleph • To manually start Aleph: 1. Start Oracle Methods to stop and start Aleph • To manually start Aleph: 1. Start Oracle - Logon as aleph user and run 1. util O 1 1 “Activate Oracle Server” 2. util O 2 1 “Activate Oracle Listener”. 2. Start apache via util W 3 6 or via command line 1. apcb 2. . /apachectl [then choose appropriate option] 3. start Aleph 1. cd $alephe_root 2. . /aleph_startup Back to table of contents 94

Methods to stop and start Aleph • To manually stop Aleph: 1. stop Aleph Methods to stop and start Aleph • To manually stop Aleph: 1. stop Aleph 1. 2. cd $alephe_root. /aleph_shutdown Stop apache option 1 1. 2. 3. apcl kill `cat httpd. pid` Stop apache option 2 1. 2. 4. apcb. /apachectl [then choose appropriate option] Stop Oracle - Logon as aleph user and run 1. util O 1 2 “Activate Oracle Server” 2. util O 2 2 “Activate Oracle Listener” Back to table of contents 95

Methods to stop and start Aleph • The following can be used to check Methods to stop and start Aleph • The following can be used to check if Aleph processes are still running [email protected](a 20_1): ~/a 20_1/alephm>ps -ef | grep $ALEPH_APP_VERSION aleph 7645 1 0 Apr 01 ? 00: 00 /exlibris/aleph/a 20_1/aleph/exe/jobd a 20_1 aleph 10316 15771 2 Apr 12 ? 00: 29: 13 /exlibris/aleph/a 20_1/aleph/exe/pc_server_main 0 6991 aleph 14963 1 0 Apr 09 ? 00: 12 /exlibris/aleph/a 20_1/aleph/exe/rts 32 ue_01_a YLK 30. a 20_1 Back to table of contents 96

Apache and Aleph web server • In this section we will discuss: 1. Stopping Apache and Aleph web server • In this section we will discuss: 1. Stopping and starting the apache 2. The apache configuration file httpd. conf 3. Apache in aleph_start 4. Links under the apache directory 5. Web server definitions in aleph_start 6. Web server definitions in www_server. conf 7. Web and apache log files Back to table of contents 97

Apache and Aleph web server structure Client Apache Server mod_aleph_2 other ALEPH application www_server Apache and Aleph web server structure Client Apache Server mod_aleph_2 other ALEPH application www_server ALEPH www_server child processes • • Database ALEPH tables HTML pages Programs • Images Back to table of contents 98

Apache and Aleph web server Aliases for the apache directories aleph@kortick(a 20_1): ~>alias | Apache and Aleph web server Aliases for the apache directories [email protected](a 20_1): ~>alias | grep apache ael tail -f $alephe_root/apache/logs/error_log apc cd $alephe_root/apache apcb cd $alephe_root/apache/bin apcc cd $alephe_root/apache/conf apch cd $alephe_root/apache/htdocs apcl cd $alephe_root/apache/logs Back to table of contents 99

Apache and Aleph web server Options working with apache aleph@kortick(a 20_1): . . . Apache and Aleph web server Options working with apache [email protected](a 20_1): . . . apache/bin>apachectl | egrep '^start|^stop|^restart' start - start httpd stop - stop httpd restart - restart httpd if running by sending a SIGHUP or start if Back to table of contents 100

Apache and Aleph web server Apache configuration file $httpd_root/conf/httpd. conf (apcc) • Definition for Apache and Aleph web server Apache configuration file $httpd_root/conf/httpd. conf (apcc) • Definition for Hostname and Port • Directories where access is allowed • Path to log files and PID file • Web server info • mod_aleph_2 Back to table of contents 101

Apache and Aleph web server Apache in aleph_start aleph@kortickprod(a 20_1): >>grep -i apache $alephe_root/aleph_start Apache and Aleph web server Apache in aleph_start [email protected](a 20_1): >>grep -i apache $alephe_root/aleph_start setenv APACHE_MEDIA ${ALEPH_MOUNT}/ a${ALEPH_VERSION}_$ALEPH_COPY/apache_media setenv apache_dir ${aleph_product}/local/apache setenv httpd_bin ${aleph_product}/local/apache/bin setenv httpd_root ${alephe_dev}/alephe/apache [email protected](a 20_1): >>echo $APACHE_MEDIA /exlibris/aleph/a 20_2/apache_media [email protected](a 20_1): >> echo $ apache_dir /exlibris/aleph/a 20_2/product/local/apache [email protected](a 20_1): >> echo $ httpd_bin /exlibris/aleph/a 20_2/product/local/apache/bin [email protected](a 20_1): >> echo $ httpd_root /exlibris/aleph/u 20_2/alephe/apache [email protected](a 20_1): >> Back to table of contents 102

Apache and Aleph web server • “Underneath” the apache there are links to several Apache and Aleph web server • “Underneath” the apache there are links to several directories and files 1. css files 2. icon directories 3. tmp directory Back to table of contents 103

Apache and Aleph web server Here are links to css files and /tmp directory Apache and Aleph web server Here are links to css files and /tmp directory [email protected](a 20_1): >cd $alephe_root/apache/htdocs [email protected](a 20_1): ~. . . apache/htdocs>pwd /exlibris/aleph/u 20_1/alephe/apache/htdocs [email protected](a 20_1): ~. . . apache/htdocs>ls -lrt | grep > | cut -c 47 - staff. css -> /exlibris/aleph/u 20_1/alephe/www_s_eng/staff. css tmp -> /exlibris/aleph/a 20_1/tmp/ pds. css -> /exlibris/aleph/a 20_1/pds/html_form/global/pds. css exlibris. css -> /exlibris/aleph/u 20_1/alephe/www_f_eng/exlibris. css course. css -> /exlibris/aleph/u 20_1/alephe/www_r_eng/course. css aleph_fre. css -> /exlibris/aleph/u 20_1/alephe/www_f_heb/aleph_heb. css aleph. css -> /exlibris/aleph/u 20_1/alephe/www_f_eng/aleph. css PDSMExlibris. css -> /exlibris/aleph/a 20_1/pds/html_form/global/PDSMExlibris. css PDSAleph. css -> /exlibris/aleph/a 20_1/pds/html_form/calling_systemaleph/PDSAleph. css Back to table of contents 104

Apache and Aleph web server This is where the web OPAC icons are actually Apache and Aleph web server This is where the web OPAC icons are actually stored [email protected](a 20_1): ~. . . www_f_eng/icon>cd $alephe_root/www_f_eng/icon [email protected](a 20_1): ~. . . www_f_eng/icon>pwd /exlibris/aleph/u 20_1/alephe/www_f_eng/icon [email protected](a 20_1): ~. . . www_f_eng/icon>ls -lrt f-aleph-logo. jpg -rw-r--r-- 1 aleph exlibris 2645 Oct 13 2007 f-aleph-logo. jpg [email protected](a 20_1): ~. . . www_f_eng/icon> Back to table of contents 105

Apache and Aleph web server And an apache link points to them there: • Apache and Aleph web server And an apache link points to them there: • [email protected](a 20_1): ~. . . www_f_eng/icon>cd $alephe_root/apache/htdocs/$alephe_root/www_f_eng [email protected](a 20_1): ~. . . alephe/www_f_eng>pwd /exlibris/aleph/u 20_1/alephe/apache/htdocs/exlibris/aleph/u 20_1/alephe/www_f_eng [email protected](a 20_1): ~. . . alephe/www_f_eng>ls -lart | grep icon lrwxrwxrwx 1 aleph exlibris 43 Sep 27 2010 icon -> /exlibris/aleph/u 20_1/alephe/www_f_eng/icon/ [email protected](a 20_1): ~. . . alephe/www_f_eng> There is a link from /exlibris/aleph/u 20_1/alephe/apache/htdocs/exlibris/aleph/u 20_1/alephe/www_f_eng/icon To /exlibris/aleph/u 20_1/alephe/www_f_eng/icon/ Back to table of contents 106

Apache and Aleph web server Web server definitions in aleph_start aleph@kortickprod(a 20_1): ~/u 20_1/alephe>grep Apache and Aleph web server Web server definitions in aleph_start [email protected](a 20_1): ~/u 20_1/alephe>grep "setenv WWW_HOST setenv WWW_SERVER_PORT kortickprod. library. edu 499${ALEPH_SUB_PORT} [email protected](a 20_1): ~/u 20_1/alephe>grep "setenv aleph_start setenv ALEPH_SUB_PORT WWW" aleph_start ALEPH_SUB_PORT" 1 [email protected](a 20_1): ~/u 20_1/alephe> grep N_OF_SERVERS aleph_start setenv N_OF_SERVERS 10 [email protected](a 20_1): ~/u 20_1/alephe> grep HTTPD_PORT aleph_start setenv HTTPD_PORT 80 Back to table of contents 107

Apache and Aleph web server • When running, for example, util w 3 1 Apache and Aleph web server • When running, for example, util w 3 1 to start the web server it uses definitions from aleph_start WWW_SERVER_PORT Enter www-server port number or 0 to QUIT [4991] Enter httpd server (Apache)'s port number or 0 to QUIT [80] Enter number of servers 0 to QUIT [10] WWW_SERVER_PORT HTTPD_PORT Back to table of contents 108

Apache and Aleph web server Web server definitions in aleph_start aleph@kortickprod(a 20_1): ~/u 20_1/alephe>env Apache and Aleph web server Web server definitions in aleph_start [email protected](a 20_1): ~/u 20_1/alephe>env | grep WWW_HOST= kortickprod. library. edu WWW_SERVER_PORT=4991 [email protected](a 20_1): ~/u 20_1/alephe>env | grep N_OF_SERVERS=10 [email protected](a 20_1): ~/u 20_1/alephe>env | grep HTTPD_PORT=80 [email protected](a 20_1): ~/u 20_1/alephe> Back to table of contents 109

Apache and Aleph web server Web server definitions in www_server. conf • The “primary” Apache and Aleph web server Web server definitions in www_server. conf • The “primary” definition in www_server. conf is the server_httpd definition [email protected](a 20_1): > cd $alephe_root [email protected](a 20_1): > grep 'setenv server_httpd' www_server. conf setenv server_httpd "http: //kortick. library. edu: $HTTPD_PORT" [email protected](a 20_1): > • The “server_httpd” is the web OPAC URL [email protected](a 20_1): ~/u 20_1/alephe>source www_server. conf [email protected](a 20_1): ~/u 20_1/alephe>echo $server_httpd http: //kortick. library. edu: 80 [email protected](a 20_1): ~/u 20_1/alephe> Back to table of contents 110

Apache and Aleph web server Web server definitions in www_server. conf • www_server_timeout • Apache and Aleph web server Web server definitions in www_server. conf • www_server_timeout • This parameter defines the maximum number of seconds for the www_server timeout. It must be in the range of 5 -300. setenv www_server_timeout • 300 The page will be refreshed according to the refresh parameter in meta-tags, which is attached to each web page in www_f_eng [email protected](a 20_1): ~. . . alephe/www_f_eng>grep REFRESH meta-tags [email protected](a 20_1): ~. . . alephe/www_f_eng> Back to table of contents 111

Apache and Aleph web server Web server log file • The web server log Apache and Aleph web server Web server log file • The web server log file is in the $LOGDIR directory • It is called www_server_[$WWW_SERVER_PORT]. log • Every time the web server is restarted the old log is renamed www_server_[$WWW_SERVER_PORT]. log. day. month. hour. minute • For example: [email protected](a 20_1) > cd $LOGDIR [email protected](a 20_1) > ls -lrt www_server_4991. log* -rw-r--r-- 1 aleph exlibris 517641203 Apr 15 07: 38 www_server_4991. log. 1504. 0738 -rw-rw-r-- 1 aleph exlibris • 5622805 Apr 15 13: 27 www_server_4991. log. 1504. 1327 60734 Apr 15 13: 30 www_server_4991. log The web server was restarted twice on April 15 th: at 07: 38 and 13: 27 Back to table of contents 112

Apache and Aleph web server Apache log files • The apache log file directory Apache and Aleph web server Apache log files • The apache log file directory may be arrived at via the “apcl” alias • This arrives to $alephe_root/apache/logs [email protected](a 20_1): ~/a 20_1/alephm> apcl [email protected](a 20_1): ~. . . apache/logs>pwd /exlibris/aleph/u 20_1/alephe/apache/logs [email protected](a 20_1): ~. . . apache/logs> ls -lrt -rw-r--r-- 1 root -rw-r--r-- 1 aleph exlibris 6 Apr 1 08: 27 httpd. pid 644972105 Apr 15 16: 48 error_log -rw-rw-r-- 1 aleph exlibris 1800764149 Apr 15 16: 53 access_log • The httpd. pid gives the process number of the apache. • Therefore, as previously stated, one way to kill the apache is via: kill `cat httpd. pid` Back to table of contents 113

Apache and Aleph web server Apache log files • The http. pid gives the Apache and Aleph web server Apache log files • The http. pid gives the process number of the apache [email protected](a 20_1): ~. . . apache/logs>cat httpd. pid 15510 [email protected](a 20_1): ~. . . apache/logs>ps -ef | grep apache aleph 395 15510 0 16: 50 ? 00: 00 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache aleph 396 15510 0 16: 50 ? 00: 00 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache aleph 1099 15510 0 16: 55 ? 00: 00 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache aleph 1307 32684 0 16: 57 pts/1 00: 00 grep apache root 15510 1 0 Apr 01 ? 00: 02 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache aleph 31475 15510 0 16: 40 ? 00: 00 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache aleph 31770 15510 0 16: 42 ? 00: 00 /exlibris/aleph/a 20_1/product/local/apache/bin/httpd -d /exlibris/aleph/u 20_1/alephe/apache Back to table of contents 114

Basic Oracle Overview • Table: the basic unit of data storage. Defined by a Basic Oracle Overview • Table: the basic unit of data storage. Defined by a table name and a set of columns. • A table has columns and rows • • • Column: defined by a column name, a data type (number/char/date. . ), and a size. Row: contents of all columns corresponding to a single record. Tables are physically stored in Tablespaces. Back to table of contents 115

Basic Oracle Overview • Example of a table ylk 01@ALEPH 20> select Z 13_REC_KEY, Basic Oracle Overview • Example of a table ylk [email protected] 20> select Z 13_REC_KEY, Z 13_AUTHOR, Z 13_TITLE from Z 13; 000051118 Cronan, D. S. (David Spencer) Underwater minerals / by D. S. Cronan 000051119 Adler, Bill The Kennedy children : triumphs & tragedies / by Bill Adler Back to table of contents 116

Basic Oracle Overview • Example of a table with rows and columns Z 13_REC_KEY Basic Oracle Overview • Example of a table with rows and columns Z 13_REC_KEY , Z 13_AUTHOR Z 13_TITLE 000051118 Cronan, D. S. (David Spencer) Underwater minerals / by D. S. Cronan 000051119 Adler, Bill The Kennedy children : triumphs & tragedies / by Bill Adler Back to table of contents 117

Basic Oracle Overview • Index: An optional structure associated with a table. • Contains Basic Oracle Overview • Index: An optional structure associated with a table. • Contains references to data rows. • Physically independent of the data in the associated table (create/drop). • Primary goal – increase the speed of data retrieval from the table. • Indexes are physically stored in Tablespaces. Back to table of contents 118

Basic Oracle Overview • Here are the indexes associated with Z 68 (acquisitions orders) Basic Oracle Overview • Here are the indexes associated with Z 68 (acquisitions orders) viewed via util A 17/14 INDEX_NAME STATUS INDEX_TYPE UNIQUENESS COLUMN_NAME ---------- -------------- Z 68_ID VALID NORMAL UNIQUE Z 68_REC_KEY Z 68_ID 1 VALID NORMAL NONUNIQUE Z 68_ORDER_NUMBER Z 68_ID 2 VALID NORMAL NONUNIQUE Z 68_SUB_LIBRARY Z 68_ID 3 VALID NORMAL NONUNIQUE Z 68_ORDERING_UNIT Z 68_ID 4 VALID NORMAL NONUNIQUE Z 68_ORDER_STATUS_DATE_X Z 68_ID 6 VALID NORMAL NONUNIQUE Z 68_ORDER_NUMBER_2 Z 68_ID 7 VALID NORMAL NONUNIQUE Z 68_TARGET_ID Back to table of contents 119

Basic Oracle Overview • Tablespace: Logical storage unit consisting of one or more datafiles. Basic Oracle Overview • Tablespace: Logical storage unit consisting of one or more datafiles. • Datafile: Physical file known to Operating System. • Util O 14 1 can be used to view “All Tablespaces Free Space Summary” Back to table of contents 120

Basic Oracle Overview • Information may be retrieved directly from Oracle aleph@kortickprod(a 20_1) YLK Basic Oracle Overview • Information may be retrieved directly from Oracle [email protected](a 20_1) YLK 50> sqlplus ylk 01/ylk 01 SQL*Plus: Release 11. 1. 0. 7. 0 - Production on Fri Apr 15 17: 42: 08 2011 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11 g Enterprise Edition Release 11. 1. 0. 7. 0 - 64 bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ylk [email protected] 20> desc z 13; Name Null? Type ---------------------Z 13_REC_KEY NOT NULL CHAR(9) Z 13_YEAR NUMBER(4) Z 13_OPEN_DATE NUMBER(8) Z 13_UPDATE_DATE CHAR(8) Z 13_CALL_NO_KEY VARCHAR 2(80) Z 13_CALL_NO_CODE CHAR(5) Z 13_CALL_NO VARCHAR 2(100) Back to table of contents 121

Basic Oracle Overview Software structure • Oracle software – under one tree structure: /exlibris/app/oracle Basic Oracle Overview Software structure • Oracle software – under one tree structure: /exlibris/app/oracle • Oracle database logs and trace files: /exlibris/app/oracle/admin/$ORACLE_SID • Oracle network configuration: /exlibris/app/oracle/product/11/network/admin Back to table of contents 122

Basic Oracle Overview Oracle structure aleph@kortickprod(a 20_1): ~/a 20_1/alephm>cd /exlibris/app/oracle aleph@kortickprod(a 20_1): . . Basic Oracle Overview Oracle structure [email protected](a 20_1): ~/a 20_1/alephm>cd /exlibris/app/oracle [email protected](a 20_1): . . . app/oracle>ls -lrt | grep '/' drwxr-xr-x 3 oracle dba 4096 Feb 16 2010 product/ drwxrwxr-x 4 oracle dba 4096 Feb 16 2010 diag/ drwxr-xr-x 4 oracle dba 4096 Jul 2010 cfgtoollogs/ drwxr-xr-x 4 oracle dba 4096 Oct 21 13: 12 admin/ drwxr-xr-x 2 oracle dba 4096 Nov 18 15: 25 RMAN/ 5 [email protected](a 20_1): . . . app/oracle> Back to table of contents 123

Basic Oracle Overview Oracle database logs and trace files aleph@kortickprod(a 20_1): ~/a 20_1/alephm>cd /exlibris/app/oracle/admin/$ORACLE_SID/ Basic Oracle Overview Oracle database logs and trace files [email protected](a 20_1): ~/a 20_1/alephm>cd /exlibris/app/oracle/admin/$ORACLE_SID/ [email protected](a 20_1): . . . admin/aleph 20>pwd /exlibris/app/oracle/admin/aleph 20 [email protected](a 20_1): . . . admin/aleph 20>ls -lrt | grep '/' drwxr-xr-x 2 oracle dba 4096 Aug 15 2009 scripts/ drwxr-xr-x 2 oracle dba 4096 Oct 24 2009 log/ drwxr-xr-x 2 oracle dba 4096 Oct 24 2009 bdump/ drwxr-xr-x 2 oracle dba 4096 Mar 25 18: 01 udump/ drwxr-xr-x 2 oracle dba 12288 Apr 16 20: 00 pfile/ drwxr-xr-x 2 oracle dba 7995392 Apr 17 05: 05 adump/ [email protected](a 20_1): . . . admin/aleph 20> Back to table of contents 124

Basic Oracle Overview Oracle network configuration aleph@kortickprod(a 20_1): . . . admin/aleph 20>cd /exlibris/app/oracle/product/11/network/admin Basic Oracle Overview Oracle network configuration [email protected](a 20_1): . . . admin/aleph 20>cd /exlibris/app/oracle/product/11/network/admin [email protected](a 20_1): . . . network/admin>ls -lrt -rw-r--r-- 1 oracle dba 187 May 7 2007 shrept. lst drwxr-xr-x 2 oracle dba 4096 Oct 7 2008 samples/ -rw-r--r-- 1 oracle dba 661 Jun 28 2010 tnsnames. ora. clone -rw-r--r-- 1 oracle dba 479 Jun 28 2010 listener. ora. clone -rw-r--r-- 1 oracle dba 645 Jun 28 2010 tnsnames. ora. aleph 20 -rw-r--r-- 1 oracle dba 481 Jun 28 2010 listener. ora. aleph 20 -rwxr-xr-x 1 oracle dba 126 Jul 18 2010 sqlnet. ora* -rw-r--r-- 1 oracle dba 564 Sep 28 2010 listener. ora -rw-r--r-- 1 oracle dba 1383 Sep 28 2010 tnsnames. ora [email protected](a 20_1): . . . network/admin> Back to table of contents 125

Basic Oracle Overview Environmental variables aleph@kortickprod(a 20_1): . . . network/admin>env | grep ^ORACLE_OWNER=oracle Basic Oracle Overview Environmental variables [email protected](a 20_1): . . . network/admin>env | grep ^ORACLE_OWNER=oracle ORACLE_VERSION=11 ORACLE_CONF=/exlibris/aleph/ora_aleph ORACLE_SID=aleph 20 ORACLE_BASE=/exlibris/app/oracle ORACLE_HOME=/exlibris/app/oracle/product/11 ORACLE_ALERT_LOG=/exlibris/app/oracle/admin/aleph 20/bdump/alert_al eph 20. log Back to table of contents 126

Basic Oracle Overview Environmental variables • $ORACLE_BASE – database configuration and logs • $ORACLE_HOME Basic Oracle Overview Environmental variables • $ORACLE_BASE – database configuration and logs • $ORACLE_HOME – home directory • $ORACLE_SID – database (instance) name • $ORACLE_ALERT_LOG - oracle error log. It contains the oracle errors (such as lack of space or anything else). • $ORACLE_OWNER – Oracle Unix user Back to table of contents 127

Basic Oracle Overview Oracle users for Aleph (part 1 of 2) • Each library Basic Oracle Overview Oracle users for Aleph (part 1 of 2) • Each library has a dedicated Oracle user: • YLK 01, YLK 10, YLK 50 etc. • Special users • Aleph. • Select, update, insert, delete permissions on all objects of other Aleph users. • Does not own any object. Back to table of contents 128

Basic Oracle Overview Oracle users for Aleph (part 2 of 2) • ALEPH_ADMIN • Basic Oracle Overview Oracle users for Aleph (part 2 of 2) • ALEPH_ADMIN • • All privileges of user ALEPH plus privileges to create, drop and alter all objects. ALEPH_DBA • User with “sysdba” privileges. Can start and stop oracle, alter tablespaces etc Back to table of contents 129

Basic Oracle Overview UTIL O can be used to manage Oracle O. Managing ORACLE Basic Oracle Overview UTIL O can be used to manage Oracle O. Managing ORACLE ---------0. Exit Procedure 1. Oracle Server Util 2. Oracle Listener see 3. Oracle Logs 5. 6. Nls 7. Archiving 8. 9. Database Users 10. SQL*Plus Session 11. 12. Database Verification Utility 13. Database Files 14. Database Free/Used Space 15. 16. Database Links 17. Database Tablespaces 18. Oracle Statistics 19. Shared Pool 20. Multi Threaded Server Please select [exit]: O 9/1 can be used to all Oracle users Back to table of contents 130

Basic Oracle Overview Oracle processes • The following command can be used to view Basic Oracle Overview Oracle processes • The following command can be used to view running Oracle processes [email protected](a 20_1) YLK 01> ps –ef | grep ora_ | grep $ORACLE_SID oracle 15279 1 0 Apr 01 ? 00: 47 ora_pmon_aleph 20 oracle 15281 1 0 Apr 01 ? 00: 00 ora_vktm_aleph 20 oracle 15285 1 0 Apr 01 ? 00: 00 ora_diag_aleph 20 oracle 15287 1 0 Apr 01 ? 00: 00 ora_dbrm_aleph 20 oracle 15289 1 0 Apr 01 ? 00: 27 ora_psp 0_aleph 20 oracle 15291 1 0 Apr 01 ? 00: 13: 54 ora_dia 0_aleph 20 oracle 15293 1 0 Apr 01 ? 00: 44: 57 ora_mman_aleph 20 Back to table of contents 131

Basic Oracle Overview Oracle parameters • The following command can be used to view Basic Oracle Overview Oracle parameters • The following command can be used to view the Oracle parameters [email protected](a 20_1) > sqlplus $ALEPH_ADMIN [email protected] 20> SHOW PARAMETERS NAME TYPE ------------------O 7_DICTIONARY_ACCESSIBILITY boolean _shared_pool_reserved_pct integer active_instance_count integer aq_tm_processes integer archive_lag_target integer asm_diskgroups string asm_diskstring asm_power_limit integer asm_preferred_read_failure_groups string Back to table of contents 132 VALUE -------FALSE 10 0 0 1 audit_file_dest

Basic Oracle Overview Oracle parameters • Here it is for one specific Oracle parameter Basic Oracle Overview Oracle parameters • Here it is for one specific Oracle parameter [email protected](a 20_1) > sqlplus $ALEPH_ADMIN [email protected] 20> set line 200 [email protected] 20> SHOW PARAMETERS DB_FILES NAME TYPE ------------------db_files integer [email protected] 20> Back to table of contents 133 VALUE -------------200

file_list and tables spaces • Each Aleph Library has a dedicated Oracle user. • file_list and tables spaces • Each Aleph Library has a dedicated Oracle user. • Each Oracle user owns a set of tables containing the Library data. • The same table names may exist in different libraries and in different library types. For example: • Z 98 (word indexes) may exist in bibliographic, authority, ILL and course reading libraries • Z 68 (orders) exists only in Administrative libraries Back to table of contents 134

file_list and tables spaces • The library’s Oracle data may be viewed and retrieved file_list and tables spaces • The library’s Oracle data may be viewed and retrieved via “s+ [library name]” kortick-a 20(2) >>s+ ylk 01 SQL*Plus: Release 11. 1. 0. 7. 0 - Production on Wed Apr 6 06: 56: 31 2011 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11 g Enterprise Edition Release 11. 1. 0. 7. 0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ylk [email protected] 20> desc z 00; Name Null? Type ---------------------Z 00_DOC_NUMBER NOT NULL CHAR(9) Z 00_NO_LINES NUMBER(4) Z 00_DATA_LEN NUMBER(6) Z 00_DATA LONG ylk [email protected] 20> Back to table of contents 135

file_list and tables spaces • The library’s Oracle data may also be viewed and file_list and tables spaces • The library’s Oracle data may also be viewed and retrieved via “sqlplus username/password” kortick-a 20(2) >>sqlplus ylk 01/ylk 01 SQL*Plus: Release 11. 1. 0. 7. 0 - Production on Thu Apr 7 06: 39: 10 2011 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11 g Enterprise Edition Release 11. 1. 0. 7. 0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ylk [email protected] 20> select count(*) from z 13; **** Hit return to continue **** The username and password is by default the name of the library COUNT(*) -----137894 1 row selected. ylk [email protected] 20> Back to table of contents 136

file_list and tables spaces • According to Wikipedia http: //en. wikipedia. org/wiki/Tablespace Oracle stores file_list and tables spaces • According to Wikipedia http: //en. wikipedia. org/wiki/Tablespace Oracle stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace • According to http: //www. fredshack. com/docs/oracle. html The database is divided into one or more logical pieces known as tablespaces. A tablespace is used to logically group data together…. The database is divided into one or more logical pieces known as tablespaces. A tablespace is used to logically group data together. Back to table of contents 137

file_list and tables spaces • Depending on the number of records in the library file_list and tables spaces • Depending on the number of records in the library and the expected growth, the “file_list_size” is defined in the $data_root/prof_library file of each library. • Depending on the type of library, the “file_list_type” is defined in the prof_library file of each library. Back to table of contents 138

file_list and tables spaces • Here is an example of the file_list_size and file_list_type file_list and tables spaces • Here is an example of the file_list_size and file_list_type definitions for different libraries: [email protected](a 20_1): ~/u 20_1>grep file_list_ ylk? ? /prof_library ylk 01/prof_library: setenv file_list_size LARGE ylk 01/prof_library: setenv file_list_type BIB ylk 10/prof_library: setenv file_list_size LARGE ylk 10/prof_library: setenv file_list_type AUT ylk 11/prof_library: setenv file_list_size LARGE ylk 30/prof_library: setenv file_list_size SMALL ylk 30/prof_library: setenv file_list_type COURSE ylk 40/prof_library: setenv file_list_type ILL ylk 40/prof_library: setenv file_list_size MEDIUM ylk 50/prof_library: setenv file_list_size LARGE ylk 50/prof_library: setenv file_list_type ADM ylk 60/prof_library: setenv file_list_size LARGE ylk 60/prof_library: setenv file_list_type HOL [email protected](a 20_1): ~/u 20_1> Back to table of contents 139

file_list and tables spaces • The possible options for file_list_type are: • BIB • file_list and tables spaces • The possible options for file_list_type are: • BIB • AUT • ADM • HOL • COURSE • ILL • USR • PW [email protected](a 20_1): ~>cd $aleph_proc [email protected](a 20_1): ~>grep library_type open_new_aleph_site. pl | grep 'USR|PW' if ( $library_type !~ /(BIB|AUT|ADM|HOL|COURSE|ILL|USR|PW)/ ) { [email protected](a 20_1): ~. . . aleph/proc> Back to table of contents 140

file_list and tables spaces • The possible options for file_list_size are: • DEMO • file_list and tables spaces • The possible options for file_list_size are: • DEMO • VSMALL • MEDIUM • LARGE • HUGE [email protected](a 20_1): ~>cd $aleph_proc [email protected](a 20_1): ~>grep 'Enter library size' open_new_library echo -n "Enter library size (DEMO , VSMALL , MEDIUM , LARGE , HUGE) [MEDIUM]: " [email protected](a 20_1): ~. . . aleph/proc> Back to table of contents 141

file_list and tables spaces • When the library is opened the relevant file_list/template (depending file_list and tables spaces • When the library is opened the relevant file_list/template (depending on file_list_type) is used [email protected](a 20_1): ~. . . aleph/tab>cd $aleph_root/tab [email protected](a 20_1): ~. . . aleph/tab>ls -1 rt file_list. * file_list. Z 105 file_list. PW file_list. USR file_list. ILLSV file_list_type AUT file_list_type COURSE file_list_type BIB file_list. VIR file_list. HOL file_list. AUT file_list. ILL file_list. ADM file_list. COURSE file_list. BIB Back to table of contents 142

file_list and tables spaces • The tablespaces of each Oracle table are opened depending file_list and tables spaces • The tablespaces of each Oracle table are opened depending on the file_list_size DEMO VSMALL MEDIUM LARGE HUGE [email protected](a 20_1): ~. . . aleph/tab>grep 'z 98 ' file_list. BIB TAB z 98 3 M, 128 K, 4 M, 128 M, 960 M 0 K ts 0, TS 1 D, TS 2 D, TS 3 D, TS 4 D DEMO VSMALL Back to table of contents 143 MEDIUM LARGE HUGE

file_list and tables spaces Initial Extent Allocation aleph@kortickprod(a 20_1): ~. . . aleph/tab>grep 'z file_list and tables spaces Initial Extent Allocation [email protected](a 20_1): ~. . . aleph/tab>grep 'z 98 ' file_list. BIB TAB z 98 3 M, 128 K, 4 M, 128 M, 960 M 0 K ts 0, TS 1 D, TS 2 D, TS 3 D, TS 4 D Tablespace Name Back to table of contents 144

file_list and tables spaces • It is also possible to not use the default file_list and tables spaces • It is also possible to not use the default templates in $aleph_root/tab • If a “private” file_list file exists in the $data_root of the library then that file_list will be used instead of the default templates in $aleph_root/tab • It is possible to use a “private” file_list for either some or all of the Oracle tables Back to table of contents 145

file_list and tables spaces • In the following case all tables except z 108 file_list and tables spaces • In the following case all tables except z 108 in ylk 50 library will be created according to the default templates in $aleph_root/tab in conjunction with prof_library definitions. • Z 108, however, will be created according to $data_root/file_list. It is the only table in $data_root/file_list [email protected](a 20_1) YLK 50> cd $data_root [email protected](a 20_1) YLK 50> grep -v ^! file_list | grep 108 TAB z 108 128 K 0 K YK 1 D IND z 108_id 128 K 0 K YK 1 X IND z 108_id 2 128 K 0 K YK 1 X IND z 108_id 3 128 K 0 K YK 1 X IND z 108_id 4 128 K 0 K YK 1 X IND z 108_id 5 128 K 0 K YK 1 X [email protected](a 20_1) YLK 50> Back to table of contents 146

file_list and tables spaces • The combination of values from the “private” file_list in file_list and tables spaces • The combination of values from the “private” file_list in $data_root and the template file_list in $aleph_root/tab is known as the “merged file_list”, and it may be viewed via UTIL A / 17 / 10 / 2 A. 17. 10. Edit file_list of USM 30 Tables 0. Exit Procedure 1. Edit file_list of USM 30 2. View merged file_list Please select [exit]: Back to table of contents 147

file_list and tables spaces • Here is a part of a merged file list file_list and tables spaces • Here is a part of a merged file list This comes from $aleph_root/tab/file_list because it does not appear in $data_root/file_list TAB IND TAB IND IND IND z 98_id z 980_id z 00_id z 101_id z 108_id 2 z 108_id 3 z 108_id 4 z 108_id 5 1 M 1 M 1 M 100 K 400 K 128 K 128 K 0 K 0 K 0 K 0 K ts 0 ts 1 YK 1 D YK 1 X YK 1 X This comes from $data_root/file_list because it does appear there Back to table of contents 148

file_list and tables spaces • The Ex Libris convention is to use D in file_list and tables spaces • The Ex Libris convention is to use D in the tablespace name for the actual tables, and X in the tablespace name for the table indexes. TAB IND IND IND IND z 20_id z 22_id z 30_id 1 z 30_id 2 z 30_id 3 z 30_id 4 z 30_id 5 z 30_id 6 z 30_id 7 z 30_id 8 z 30_id 9 z 30_id 10 z 30_id 11 z 30_id 12 z 30_id 13 128 K 960 M 128 M 4 M 4 M 4 M 0 K 0 K 0 K 0 K 0 K Back to table of contents 149 TS 1 D TS 1 X TS 4 D TS 3 X TS 2 X TS 2 X TS 2 X

Thank You! Yoel Kortick Thank You! Yoel Kortick