From d91e52409357dca5b6d0e966fddc9e0527bba4da Mon Sep 17 00:00:00 2001 From: Steve Sheppard Date: Mon, 13 Dec 2010 17:40:05 -0500 Subject: [PATCH] more updates to bring into line with a real installation attempt; --- 1.6/admin/serversideinstallation.xml | 193 +++++++++++++++++++++++++---------- 1 file changed, 137 insertions(+), 56 deletions(-) diff --git a/1.6/admin/serversideinstallation.xml b/1.6/admin/serversideinstallation.xml index bc57ab4..8d48568 100644 --- a/1.6/admin/serversideinstallation.xml +++ b/1.6/admin/serversideinstallation.xml @@ -1,6 +1,5 @@ - - + + Server-side Installation of Evergreen Software @@ -142,9 +141,11 @@ Add New <systemitem class="username">opensrf</systemitem> User As the root user, add the opensrf user to the system. - The default shell for the new user is automatically - set to /bin/bash to inherit a reasonable environment: + In the following example, the default shell for the + opensrf user is automatically set + to /bin/bash to inherit a reasonable environment: + # as the root user: useradd -m -s /bin/bash opensrf passwd opensrf @@ -155,17 +156,18 @@ OpenSRF download - As the opensrf user, change to + The latest version of OpenSRF can be found here: + . + As the opensrf user, change to the directory /home/opensrf then download - and extract the latest version of OpenSRF. The latest version can be found here: - + and extract OpenSRF. The new subdirectory + /home/opensrf/OpenSRF-1.4.0 will be created: + # as the opensrf user: cd /home/opensrf wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz tar zxf OpenSRF-1.4.0.tar.gz - The new directory - /home/opensrf/OpenSRF-1.4.0 will be created. Install Prerequisites to Build OpenSRF @@ -181,6 +183,7 @@ For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would enter this command: make -f src/extras/Makefile.install ubuntu-lucid . + # as the root user: cd /home/opensrf/OpenSRF-1.4.0 make -f src/extras/Makefile.install [DISTRIBUTION] @@ -253,28 +256,32 @@ configure As the opensrf - user, return to the OpenSRF build directory and use the + user, return to the new OpenSRF build directory and use the configure utility to prepare for the next step of compiling and linking the software. If you wish to include support for Python and Java, add the configuration options and , respectively: + # as the opensrf user: cd /home/opensrf/OpenSRF-1.4.0 ./configure --prefix=/openils --sysconfdir=/openils/conf make + This step will take several minutes to complete. Compile, Link and Install OpenSRF As the root - user, return to the OpenSRF build directory and use the + user, return to the new OpenSRF build directory and use the make utility to compile, link and install OpenSRF: + # as the root user: cd /home/opensrf/OpenSRF-1.4.0 make install + This step will take several minutes to complete. Update the System Dynamic Library Path @@ -287,6 +294,7 @@ ldconfig to automatically read the file and modify the system dynamic library path: + # as the root user: echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf ldconfig @@ -309,6 +317,7 @@ Jabber + # as the root user: 127.0.1.2 public.localhost public 127.0.1.3 private.localhost private @@ -320,6 +329,7 @@ directory /openils to the user opensrf: + # as the root user: chown -R opensrf:opensrf /openils @@ -334,6 +344,7 @@ you must stop that service. As the root user, execute the following command to stop the service: + # as the root user: /etc/init.d/ejabberd stop If ejabberd reports that it @@ -343,6 +354,7 @@ epmd you may need to perform the following commands to kill them: + # as the root user: epmd -kill killall beam; killall beam.smp rm /var/lib/ejabberd/* @@ -358,31 +370,64 @@ /etc/ejabberd/ejabberd.cfg and make the following changes: - Change the line: - {hosts, ["localhost"]}. - to: - {hosts, ["localhost", "private.localhost", "public.localhost"]}. + Change the line: + + {hosts, ["localhost"]}. + + to instead read: + + {hosts, ["localhost", "private.localhost", "public.localhost"]}. + - Change the line: - {max_user_sessions, 10}. to: - {max_user_sessions, 10000}. - If the line looks something like this: - {access, max_user_sessions, [{10, all}]}. - then change it to: - {access, max_user_sessions, [{10000, all}]} + Change the line: + + {max_user_sessions, 10} + + to instead read: + + {max_user_sessions, 10000} + + + If the line looks something like this: + + {access, max_user_sessions, [{10, all}]} + + then change it to instead read: + + {access, max_user_sessions, [{10000, all}]} + - Change all three occurrences of: max_stanza_size - to: 2000000. + Change all three occurrences of: + + max_stanza_size + + to instead read: + + 2000000 + - Change both occurrences of: maxrate to: - 500000. + Change both occurrences of: + + maxrate + + to instead read: + + 500000 + - Comment out the line {mod_offline, []} - by placing two % comment signs in front. + Comment out the line: + + {mod_offline, []} + + by placing two % comment signs in front + so it instead reads: + + %%{mod_offline, []} + @@ -392,12 +437,14 @@ ejabberd service to test the configuration changes and to register your users: + # as the root user: /etc/init.d/ejabberd start Register <systemitem class="username">router</systemitem> and - <systemitem class="username">ejabberd</systemitem> users + opensrf as + ejabberd users The two ejabberd users router and opensrf must be registered @@ -425,7 +472,8 @@ for the users router and opensrf on each domain: - # The syntax for registering a user with ejabberdctl is: + # as the root user: + # Note: the syntax for registering a user with ejabberdctl is: # ejabberdctl register USER DOMAIN PASSWORD ejabberdctl register router private.localhost NEWPASSWORD ejabberdctl register router public.localhost NEWPASSWORD @@ -434,8 +482,8 @@ Note that the users router and opensrf and their respective passwords - will be used again in the file /openils/conf/opensrf_core.xml - in the next steps. + will be used again in when + we modify the OpenSRF configuration file /openils/conf/opensrf_core.xml . Create OpenSRF configuration files @@ -444,12 +492,13 @@ /openils/conf/opensrf_core.xml and /openils/conf/opensrf.xml from the example templates: + # as the opensrf user: cd /openils/conf cp opensrf.xml.example opensrf.xml cp opensrf_core.xml.example opensrf_core.xml - + Update usernames and passwords in the OpenSRF configuration file As the opensrf user, edit the OpenSRF configuration file /openils/conf/opensrf_core.xml @@ -543,7 +592,15 @@ As the opensrf user, edit the file /openils/conf/opensrf.xml, then find and modify the element dbfile (near the end of the file) to set the - location of the persistent database: + location of the persistent database. Change the default line: + + /openils/var/persist.db + + to instead read: + + /tmp/persist.db + + Following is a sample modification of that portion of the file: @@ -572,8 +629,8 @@ For instance, do the following for the opensrf user: + # as the root user: cp /openils/conf/srfsh.xml.example /home/opensrf/.srfsh.xml - Edit each user's file ~/.srfsh.xml and make the following changes: @@ -629,6 +686,7 @@ opensrf user's shell configuration file ~/.bashrc: + # as the opensrf user: echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc @@ -638,12 +696,14 @@ ejabberd and memcached services: + # as the root user: /etc/init.d/ejabberd start /etc/init.d/memcached start As the opensrf user, start OpenSRF as follows: + # as the opensrf user: osrf_ctl.sh -l -a start_all The flag forces Evergreen to use @@ -681,6 +741,7 @@ utility and trying to call the add method on the OpenSRF math service: + # as the root user: /openils/bin/srfsh srfsh# request opensrf.math add 2 2 Received Data: 4 @@ -699,6 +760,7 @@ opensrf user, stop OpenSRF as follows: + # as the opensrf user: osrf_ctl.sh -l -a stop_all @@ -771,6 +833,7 @@ and extract the latest version of Evergreen. The latest version can be found here: + # as the opensrf user: wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz tar zxf Evergreen-ILS-1.6.1.2.tar.gz @@ -792,6 +855,7 @@ to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would enter this command: make -f Open-ILS/src/extras/Makefile.install ubuntu-karmic. + # as the opensrf user: cd /home/opensrf/Evergreen-ILS-1.6.1.2 make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION] @@ -867,11 +931,13 @@ For Debian Lenny and Ubuntu Hardy (8.04): + # as the root user: make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83 For Ubuntu Karmic (9.10) and Ubuntu Lucid (10.04): + # as the root user: make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84 @@ -893,6 +959,7 @@ root user install the following Perl modules: + # as the root user: # first, ensure the gcc compiler is installed: apt-get install gcc # then install the Perl modules: @@ -919,6 +986,7 @@ containing a new library path, then run the command ldconfig to automatically read the file and modify the system dynamic library path: + # as the root user: echo "/usr/local/lib" >> /etc/ld.so.conf.d/osrf.conf echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf ldconfig @@ -935,6 +1003,7 @@ [PGSQL_VERSION] is your installed PostgreSQL version (e.g. 8.3): + # as the opensrf user: /etc/init.d/postgresql-[PGSQL_VERSION] restart @@ -945,6 +1014,7 @@ make utilities to configure Evergreen so it can be compiled and linked in the next step: + # as the opensrf user: cd /home/opensrf/Evergreen-ILS-1.6.1.2 ./configure --prefix=/openils --sysconfdir=/openils/conf make @@ -957,6 +1027,7 @@ As the root user, return to the Evergreen build directory and use the make utility as shown below: + # as the root user: cd /home/opensrf/Evergreen-ILS-1.6.1.2 make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install @@ -975,6 +1046,7 @@ subdirectory /server of the new Staff Client build: + # as the root user: cd /openils/var/web/xul ln -sf rel_1_6_1_2/server server @@ -990,6 +1062,7 @@ As the root user, execute the following commands: + # as the root user: cd /openils/conf cp opensrf.xml opensrf.xml.BAK cp opensrf_core.xml opensrf_core.xml.BAK @@ -1022,6 +1095,7 @@ user on the PostgreSQL system create the PostgreSQL database, then set some internal paths: + # as the postgres user: createdb evergreen -E UTF8 -T template0 createlang plperl evergreen createlang plperlu evergreen @@ -1032,6 +1106,7 @@ [PGSQL_VERSION] is your installed PostgreSQL version (e.g. 8.3). + # as the postgres user: psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tablefunc.sql evergreen psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tsearch2.sql evergreen psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/pgxml.sql evergreen @@ -1044,6 +1119,7 @@ named evergreen and assign a password: + # as the root user: createuser -P -s evergreen Enter password for new role: MYNEWPASSWORD Enter it again: MYNEWPASSWORD @@ -1062,6 +1138,7 @@ DATABASENAME with appropriate values: + # as the root user: cd /home/opensrf/Evergreen-ILS-1.6.1.2 perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \ --service all --create-schema --create-bootstrap --create-offline \ @@ -1112,6 +1189,7 @@ Apache modules + # as the root user: a2enmod ssl # enable mod_ssl a2enmod rewrite # enable mod_rewrite a2enmod expires # enable mod_expires @@ -1127,6 +1205,7 @@ root user, perform the following commands: + # as the root user: cd /home/opensrf/Evergreen-ILS-1.6.1.2 cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/ cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/ @@ -1144,6 +1223,7 @@ root user, perform the following commands: + # as the root user: mkdir /etc/apache2/ssl cd /etc/apache2/ssl openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key @@ -1155,8 +1235,7 @@ when users login to their account through the OPAC or when staff login through the Staff Client. For further information on installing a proper SSL - certificate, see . + certificate, see . @@ -1192,11 +1271,9 @@ should not do this since the conflict does not apply to that operating system. - - The following updates are needed to allow the logs + The following updates are needed to allow the logs to function properly, but it may break other Apache - applications on your server: - For the + applications on your server:For the Linux distributions Ubuntu Hardy or Debian Etch, as @@ -1211,17 +1288,7 @@ Debian Lenny, as the root user, edit the Apache configuration file and change these - lines: - - export APACHE_RUN_USER=www-data - export APACHE_RUN_GROUP=www-data - - to instead read: - - export APACHE_RUN_USER=opensrf - export APACHE_RUN_GROUP=opensrf - - + lines:# as the root user:export APACHE_RUN_USER=www-dataexport APACHE_RUN_GROUP=www-datato instead read:# as the root user:export APACHE_RUN_USER=opensrfexport APACHE_RUN_GROUP=opensrf As the root user, @@ -1231,6 +1298,7 @@ and MaxKeepAliveRequests to match the following: + # as the root user: KeepAliveTimeout 1 MaxKeepAliveRequests 100 @@ -1267,6 +1335,7 @@ It Works web page and enable the Evergreen web site, and then restart the Apache server: + # as the root user: # disable/enable web sites a2dissite default a2ensite eg.conf @@ -1375,7 +1444,8 @@ Modify the OpenSRF Environment - Modify the shell configuration file ~/.bashrc for + As the opensrf user, + modify the shell configuration file ~/.bashrc for user opensrf by adding a Perl environmental variable, then execute the shell configuration file to load the new variables into your current environment. @@ -1390,6 +1460,7 @@ + # as the opensrf user: echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc . ~/.bashrc @@ -1398,7 +1469,8 @@ (OPTIONAL) Enable and Disable Language Localizations You can load translations such as Armenian (hy-AM), Canadian French (fr-CA), and others into the database to complete the translations available in - the OPAC and Staff Client. For further information, see . + the OPAC and Staff Client. For further information, see + . @@ -1410,6 +1482,7 @@ user, start the ejabberd and memcached services as follows: + # as the root user: /etc/init.d/ejabberd start /etc/init.d/memcached start @@ -1418,6 +1491,7 @@ As the opensrf user, start Evergreen as follows: + # as the opensrf user: osrf_ctl.sh -l -a start_all The flag forces Evergreen to use @@ -1466,6 +1540,7 @@ library hierarchy. As the opensrf user, execute the following commands: + # as the opensrf user: cd /openils/bin ./autogen.sh -c /openils/conf/opensrf_core.xml -u Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml' @@ -1476,6 +1551,7 @@ As the root user, restart the Apache Web server: + # as the root user: /etc/init.d/apache2 restart @@ -1498,8 +1574,10 @@ administrator username and password. Following is sample output generated by executing srfsh after a successful Evergreen installation. For help with srfsh commands, type help at the prompt. - Execute the following commands to test your Evergreen connection: + As the opensrf user, + execute the following commands to test your Evergreen connection: + # as the opensrf user: /openils/bin/srfsh srfsh% login admin open-ils @@ -1531,6 +1609,7 @@ settings-tester.pl utility to review your Evergreen installation for any system configuration problems: + # as the opensrf user: cd /home/opensrf ./Evergreen-ILS-1.6.1.2/Open-ILS/src/support-scripts/settings-tester.pl @@ -1623,6 +1702,7 @@ As the opensrf user, start the Reporter daemon using the following command: + # as the opensrf user: cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter ./clark-kent.pl --daemon @@ -1653,6 +1733,7 @@ As the opensrf user, execute the following shell commands: + # as the root user: # find and kill the process ID number(s) kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6` # remove the lock file -- 2.11.0