[OPEN-ILS-GENERAL] updated install scripts

John Schmidt jas at xmission.com
Thu Feb 21 11:33:17 EST 2008


After much delay, I finally updated my install scripts to use the latest 
version of Evergreen that should work on Debian Etch or Lenny.  For 
those that are unaware of what they are.  It is just one big shell script 
which automates the wiki instructions that Dan and others have assembled.  
Even if you just use the wiki to install Evergreen, you can look at the 
beginning of the evergreen.sh and get a little feel for what accounts are set 
up and why.  

There are many dependencies required to get Evergreen up and running.  One 
miscue in one place has ramifications in non-obvious places.  In my opinion, 
installing the software is not hard, it is configuring the various config 
files that are apt to trip up the person installing Evergreen for the first 
time.  My script automates the config file generation.  I have chosen default 
account names and passwords that are quite similar to what the wiki uses.

The purpose for writing these scripts was I thought I would probably be 
installing Evergreen on multiple machines in time, and wanted an automatic 
way of doing it.  In addition, I want Evergreen to be adopted and the first 
step is to make it easy to set up.  And this is my attempt.  I welcome any 
and all feedback.

I am attaching 3 files, Readme.txt, evergreen.sh, and evergreen_chroot.sh.  If 
you have any questions please don't hesitate to email me.  I will be happy to 
call you and walk through the installation if you would like.  


John Schmidt
jas at xmission.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: evergreen_chroot.sh
Type: application/x-shellscript
Size: 4629 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-general/attachments/20080221/b9593ae7/evergreen_chroot-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evergreen.sh
Type: application/x-shellscript
Size: 25858 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-general/attachments/20080221/b9593ae7/evergreen-0001.bin
-------------- next part --------------
Installing Evergreen using the 'evergreen.sh' script.

This script was developed for computers that use the Debian
distribution of Linux.  It was designed to accomodate both the stable
(Etch) and testing (Lenny) versions of Debian.

NOTE: I use the notation of indented parenthesis ( ) to designate a
reponse you need to type, i.e.

     ( Type your reponse, or enter the following command )

Do NOT type the parenthesis in your responses.


I recommend testing out the installer script in a chroot environment
to acquaint yourself with the installation procedure.  To help with
this procedure, I developed another script, 'evergreen_chroot.sh'
which sets up a chroot environment

Install the schroot package in your regular environment and edit the file,
/etc/schroot/schroot.conf so it has a section that looks like the following:

description=Debian lenny(testing)


Edit the evergreen_chroot.sh script and set the variable:


to the location of the evergreen.sh.  The evergreen_chroot.sh will copy the evergreen.sh script to the chroot environment.


Then type the following at your command line prompt:

     ( sudo ./evergreen_chroot.sh -c evergreen -v etch -i )

A chroot environment will be set up in the directory /evergreen for
the Debian distribution, Etch.


Login to the 'evergreen chroot':

      ( schroot -c  evergreen )


Check the /etc/hosts file and edit as required to ensure that your hosts 
information is set up correctly.  For example, my hosts file looks like this:

(evergreen)jas at puppy:~$ more /etc/hosts       localhost       puppy

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Look at lines 61-66 of evergreen.sh and change any of the account
names/password combinations shown below.  For the initial install and
testing in a chroot, I recommend just keeping the default values
during your initial tests of the installer.


Once you are satisfied with the settings in your /etc/hosts file and
the password/account names in 'evergreen.sh', then type the following:

    ( sudo ./evergreen.sh -v etch -i )

The install process will begin and I will outline the steps and the
answers you need to give at the various prompts.


Enter your hostname (fully qualified name) at the prompt

Enter hostname = 

      ( Type your fully qualified, in my case, I typed: puppy )


After downloading and installing a number of packages, you will be
prompted during the perl modules install phase.  A snippet of the text
is shown below:

cat: /etc/mailname: No such file or directory

/etc/perl/CPAN/Config.pm initialized.

CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)

Are you ready for manual configuration? [yes]   

    ( no )

Downloading and installing of perl modules and libdbi and libdbd-pgsql packages.


You will be prompted for a password for the database user password.
This is the same value that is stored in the variable 'PG_DB_USER_PW' on
line 66 of the evergreen.sh script.

Enter password for new role:

      ( everPass )

Enter it again:

      ( everPass )

Enter the password twice, using the default values of 'everPass' or
whatever the value is in 'PG_DB_USER_PW'.  They must be the same.


Default values are set up based on the values entered for account
names and passwords defined in lines 61-66 of evergreen.sh for the
installation of the opensrf and evegreen software.  It should be
sufficient to just type Enter at each prompt.  However, do ensure that
the values that are displayed make sense.

Type Enter to select the default

Install prefix [/openils/] 

Apache2 apxs binary [/usr/bin/apxs2]

Apache2 headers directory [/usr/include/apache2]

Apache2 APR headers directory [/usr/include/apr-1.0/]

Libdbi libraries directory [/usr/lib/dbd]

Libxml2 headers directory [/usr/include/libxml2/]

OpenSRF headers directory [/openils/include/]

OpenSRF libraries directory [/openils/lib/]

Build targets [openils_all evergreen_core]

Database Driver [Pg]

Bootstrapping Database Version (80 for 8.0.x, 81 for 8.1.x, 82 for 8.2.x) [81]

Database Host [puppy]

Database Port [5432]

Database Name [evergreen]

Database User [evergreen]

Database Password [everPass]

Reporter Template Directory [/openils//var/reporter] 

         ( hit the enter key after each prompt )


storage-bootstrap will DESTROY all data within all of the ILS tables in your database.

The database this script will touch has a DBI DSN of
Type control-c to avoid destroying all of the data.  Type enter to continue...

     ( Hit the enter key )

The database is set up during this process.


For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [AU]:  
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:

      ( At each prompt fill in the appropriate information )

At the end of the installation, Evergreen will be started and you will
see the following:

Configuring Evergreen . . .
Finalizing opensrf . . .
Starting OpenSRF Router
Starting OpenSRF Perl
Starting OpenSRF C (host=puppy)
Updating fieldmapper
Updating web_fieldmapper
Updating OrgTree
removing OrgTree from the cache...
Updating OrgTree HTML

At the very end, you will see some instructions for testing the install:

Please execute the following: '/openils/bin/srfsh'
At the 'srfsh#' type the following: login admin open-ils
You should see a successful login.
Type 'exit' when you are done.


At the command line, type:

   ( /openils/bin/srfsh )

You will see the 'srfsh#' returned.

   ( srfsh# login admin open-ils )

You should see something like the following:

Received Data: "5a043bb6ebc8d1a044e1323cb710ac10"

Request Completed Successfully
Request Time in seconds: 0.008793

Received Data: {
   "desc":" ",


Request Completed Successfully
Request Time in seconds: 0.170924
Login Session: be9fb8b2286359f13da0b5395c301578.  Session timeout: 420.000000

If you receive the following, then the essential elements of the
Evergreen system were installed correctly.


You must remove remove your chroot environment which will clean-up and
remove the various software pieces, i.e. postgres, apache, ejabber,
etc.  If you try and install Evergreen multiple times without cleaning
up, you will have problems, since the daemons will be started on
different port numbers which will confuse the installation procedure.

At the command line type the following:

   ( sudo ./evergreen.sh -v etch -u )

You will see the following:

Removing the test subset of packages . . .
Stopping OpenSRF C : 17429 17432
Stopping OpenSRF Perl : 17386 17417
Stopping OpenSRF Router : 17374
DROP DATABASE           
. . . 

Setting up sudo (1.6.8p12-4) ...
No /etc/sudoers found... creating one for you.

Exit from the chroot and then type the following:

     ( sudo ./evergreen_chroot.sh -c evergreen -v etch -r )

You can then go through the installation procedure again by setting up
the chroot and executing the evergreen.sh script.  I recommend doing
the install several times in the chroot before installing evergreen in
your regular environment.

If you have problems/suggestions/corrections to the above information,
please contact me at:

John Schmidt
jas at xmission.com

More information about the Open-ils-general mailing list