Difference between revisions of "User:Bourke/Sandbox"

From MPDLMediaWiki
Jump to navigation Jump to search
 
(70 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Richard Bourke Sandbox
Richard Bourke Sandbox


==Pubman 628 Local Installation Setup==
== rough notes for install pubman on vm30 ==
'''Purpose of Document'''
This Document is written to give fuller information on the steps to set up a locally running Pubman 6.2.8 Server on your Local Machine, together with all the complicated software stack on which it depends. "Installation Verification Checks" at each stage are provided, and some links to further useful documentation.


'''Intended Audience of this Document'''
Developers, Administrators or Archivists / Librarians with quite advanced computer skills, who wish to see for themselves what Pubman and EsciDoc may offer for benefits, and look for themselves behind the scenes at the software infrastructure involved.


'''Scope and dependencies of this Document'''
=== jdk (sun x64 1.6.0_26) install ===
This Document is written in July/August 2011 and is based on the then current tested Pubman Production and Demonstration Environment.
# no sun jdk as standard in OpenSuse or SLES distribution (licensing reasons)
* Pubman Release: 6.2.8
# default OpenJDK install
* EsciDoc Core-Services: 1.2
# on vm30, Sun 1.6.0_06 was installed (very old by now).
* Oracle/Sun Java 6 SDK: 1.6_24
# Download from Oracle Java SE download page (linux x64 rpm binary)
* JBoss Application Server: 4.2.2 (Later releases exist, but do not work with ESciDoc)
# deinstallation of (all) java components with yast (ignore dependencies)
* Postgres: 8.3 (Later releases exist, but do not work with Pubman)
# manual install of rpm binary from oracle.
# update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin 20
# now /usr/bin/java is symbolic link to /etc/alternatives/java - which is probably updated behind the scenes by
# update-alternatives --config
# Setting JAVA_HOME is almost certainly still going to be necessary, pretty well every OS-Script will test for it.


'''Limits of this Document'''
=== postgreSQL (8.3) install ===
Time constraints prevent the documentation of a installation instructions for all tested Pubman and Escidoc Environment. Specifically, this document only describes installation of Pubman 6.2.8 with two tested operating systems environments (Linux (Distribution: Ubuntu 10_04 Desktop 32 Bit) and Windows (Windows 7 Professional 32 Bit) and one tested Database environment (Postgres 8.4).


'''A note on the screenshots'''
uninstall
Severals of the installation steps use graphical installers of up to twenty screens. To preserve space, the screenshots are presented as thumbnails. Simply click on them to expand them back to full size. Use of yellow highlighter indicates that an important default was changed, or important information entered. Screens that simply present introductory information have not been included.
* with yast 
* userdel on postgres user
* rm -rf /var/lib/pgsql/data and backup


==Current Documentation==
install
* yast postgres, postgres-contrib
* afterwards set postgres os-user pwd as root
* su - postgres
* initdb --pgdata=/var/lib/pgsql/data


Here is the at time of writing current documentation on Pubman and Escidoc standalone installation, upon which this document attempts to expand.
  <nowiki>
Die Dateien, die zu diesem Datenbanksystem gehören, werden dem Benutzer
»postgres« gehören. Diesem Benutzer muss auch der Serverprozess gehören.


[http://escidoc1.escidoc.mpg.de/projects/pubman/get_pubman/download.html Pubman Download Page retrieved July 2011]
Der Datenbankcluster wird mit der Locale de_DE.UTF-8 initialisiert werden.
Die Standarddatenbankkodierung wurde entsprechend auf UTF8 gesetzt.
Die Standardtextsuchekonfiguration wird auf »german« gesetzt.


which makes reference to the [https://www.escidoc.org/JSPWiki/en/DownloadInfrastructure EsciDoc Core-Services Installation page]. Regrettably at time of writing the dependencies listed on the first page are out of date.  
erzeuge Verzeichnis /var/lib/pgsql/data ... ok
erzeuge Unterverzeichnisse ... ok
wähle Vorgabewert für max_connections ... 100
wähle Vorgabewert für shared_buffers/max_fsm_pages ... 32MB/204800
erzeuge Konfigurationsdateien ... ok
erzeuge Datenbank template1 in /var/lib/pgsql/data/base/1 ... ok
initialisiere pg_authid ... ok
initialisiere Abhängigkeiten ... ok
erzeuge Systemsichten ... ok
lade Systemobjektbeschreibungen ... ok
erzeuge Konversionen ... ok
erzeuge Wörterbücher ... ok
setze Privilegien der eingebauten Objekte ... ok
erzeuge Informationsschema ... ok
führe Vacuum in Datenbank template1 durch ...ok
kopiere template1 nach template0 ... ok
kopiere template1 nach postgres ... ok
  </nowiki>


'''Open: Who is going to change them?'''--[[User:Bourke|Bourke]] 08:21, 19 July 2011 (CEST)


Pubman 6.2.8 has a prerequisite of ESciDoc Core-Services Release 1.2.x, not Release 1.1.3 / 1.1.4 as stated there. The software downloads listed on the page are, however, correct and up to date.
* starting postgres - the suse standard script /etc/init.d/postgresql start/stop/status works fine


==Installation of Oracle/Sun Java 6 JDK==
=== ESciDoc (1.2.2) Install ===


===Installation on Linux===


===Installation on Windows===
=== Pubman install ===
Download the latest version of the Java Developer Kit (from now on called "JDK") (alternative names, Java SE) from the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle Download Site] and install to for example under c:\dev. Note that the download runs through twice. Once to install the JDK, once to install the Java Runtime Environment ("JRE"). Note that Escidoc Core-Services and the JBoss 4.2.x Application Server require the Java Developer Kit. A Java Runtime is not sufficient.


Here are some screenshots of this (use of highlighting indicates that default options were changed) :
[[File:Jdk_download_1.PNG|thumb|left|alt=Alt text|#1 Choice of Download]]
[[File:Jdk_install_1.PNG|thumb|center|alt=Alt text|#2 Location of JDK]]
[[File:Jdk_install_2.PNG|thumb|left|alt=Alt text|#3 JDK OPtions to install]]
[[File:Jdk_install_3.PNG|thumb|center|alt=Alt text|#4 location of JRE]]
[[File:Jdk_install_4.PNG|thumb|left|alt=Alt text |#5 Options]]
<br style="clear:both" />


Please note that the registration of the product at Oracle is not in fact necessary, it works without registration too.
=== snippets for gudrun===


===Verification of JDK Installation===
Open a command window / shell and verify that the following command returns a valid java version
  java -version


==Installation of PostgreSQL 8.3==
http://localhost:8080/pubman/faces/Reload.jsp


===Installation on Linux===
Images and icon
…\jboss\server\default\deploy\pubman_ear.ear\pubman_presentation-6.2.8.war\resources\images


The exact syntax varies depending on Linux Distribution. In the case of Ubuntu 10_04 (Lucid Lynx) the following installs and creates the PostgreSQL Server, clients, and graphical clients, and creates the initial database.
new logo in deploy/images.war/mpg_logo_repos.png


  user@hostname:~$ sudo apt-get install postgresql pgadmin3 postgresql-contrib
Blogs
escidoc.pubman.blog.baseUrl=http://breakingnewsenglish.com/
escidoc.pubman.blog.news=http://feeds.feedburner.com/breakingnewsenglish


The [https://help.ubuntu.com/community/PostgreSQL Ubuntu Community Documentation] gives further configuration help. At an absolute minimum, you will need to set the database password of the postgres DB-User to a known value for the later installation steps


===Installation on Windows===
Labels Genres.xml
The "Postgres Plus" 8.3.x Download from [http://www.enterprisedb.com/downloads/postgres-postgresql-downloads EnterpriseDB.com] contains a good graphical installer. Pubman is not yet tested with the newer Version PostgreSQL 9.0. The 8.4.x Installer at the site also works, but the subsequent installation of ESciDoc 1.2.x makes changes to database settings that fail to work with the 8.4.x default setup. So Use of the 8.3 installer is recommended.
jboss\server\default\tmp\deploy/pubman_ear.ear-contents\pubman_presentation-6.2.8-exp.war\WEB-INF\classes\Genres.xml
copy nach ..server/default/deploy /conf


Notes on the following screenshots. Postgres uses both an OS Userid (Machinename)\postgres on windows and a DB-internal userid postgres. Confusingly, both are called "postgres". Only the OS postgres Userid can actually create the initial database. The database Postgres Userid is less needed in the default installation and can normally be ignored, but amongst other things functions as the database owner of the initial PostgreSQL Database catalog. You only get the option to set the OS-User password in the installation procedure described here, and there is no need to normally set the database-userid. Take care to remember this password, which is needed several times latest in the installation.
Styles
default\tmp\deploy\pubman_ear.ear\common_presentation-1.0.44-exp.war\resources\cssFramework\themes


On some Windows machines, the graphical creation of the initial postgres database under the OS-Userid will fail unless the windows service "Secondary Login" is running. If necessary, start it via Windows Control Panel / Administration / Services.
http://www.csszengarden.com/001/001.css
 
[[File:Pg_813_installdir.png|thumb|left|alt=Alt text|#1 Select Installation Directory]]
[[File:Pg_813_datadir.png|thumb|center|alt=Alt text|#2 Select Database Directory]]
[[File:Pg_813_portnumber.PNG|thumb|left|alt=Alt text|#3 Leave Portnumber of DatabaseServer at default]]
[[File:Pg_813_postgrespassword.png|thumb|center|alt=Alt text|#4 Set the OS-Userid "postgres" password]]
[[File:Pg_813_locale.png|thumb|left|alt=Alt text|#5 Set the Locale of the DB to default]]
[[File:Pg_813_launchstackbuilder.png|thumb|center|alt=Alt text|#6 Do not run the "Stackbuilder" utility to install extra Posgres components]]
<br style="clear:both" />
 
===Verification of PostgreSQL Installation===
On both Windows and Linux, the graphical query and managementclient  ''pgAdmin III'' is now installed. You can use this to connect via the postgres DB-User and the password you set for this. you will see a range of example and catalog databases installed
 
'''Caution:''' Use of SQL from PGAdmin III with the superuser account postgres to change either catalog or Escidoc or Pubman data will work, and will leave the data on the Postgresql Server in an inconsistent state, and is likely to lead to a necessity to reinstall the whole product stack or at minimum recreate the initial postgres database and reload all data from backup. Both EScidoc and Pubman are designed to maintain their own data integrity. PostgreSQL utilities like this are merely used for administrative purposes (Database backup, restore, or in this case checking that the installation worked correctly). Changing data via these utilities is a very, very bad idea.
 
[[File:pg_admin_1.PNG|thumb|left|alt=Alt text|the connection properties to connect to the catalog]]
[[File:pg_admin_2.PNG|thumb|center|alt=Alt text|The catalog tables under pg_catalog expanded]]
<br style="clear:both" />
 
==Installation of Escidoc Core-Services 1.2.x (on either Linux or on Windows)==
Once you have downloaded the graphical install for ESciDoc Core-Services it can be run by opening a command-shell (CMD.EXE for windows), changing to the download directory and running
 
  java -jar ./escidoc-core-1.2.2-install.jar
 
Since its a java program, it runs identically on both windows and unix, so there is no need for platform-specific screenshots.
 
The installation creates a total of 5 new users - make sure to remember the passwords -  and some of the questions have far-reaching implications. In particular:
 
* consider carefully before changing the default answer "localhost" to question #2, "Enter Hostname". If you simply want to create a test Pubman Server that only you will use, the default is almost certainly the right choice. However, the server will then ''only'' be reachable from the local machine. If you have a need to access the server remotely then by all means change the hostname to the DNS Hostname of the machine. But the server is then reachable for other users too, is therefore less secure, and its configuration defaults are not suitable for more than single-user operation.
* Changing the default installation directories on the other hand is a strong recommendation. Both on Unix and on Windows the defaults have long Directory Names and in some cases embedded blanks, that can cause lots of problems in delivered scripts.
 
[[File:Escidoc_license.png|thumb|left|alt=Alt text|#1 Accept Opensource Escidoc License]]
[[File:Escidoc_2_hostname.PNG|thumb|center|alt=Alt text|#2 Select hostname of server. See note above]]
[[File:Escidoc_3_dbconnection.PNG|thumb|left|alt=Alt text|#3 Accept defaults for DB Connection]]
[[File:Escidoc_4_dbowner_user.PNG|thumb|center|alt=Alt text|#4 Escidoc Database Owner New userid]]
[[File:Escidoc_5_pgsuperuser.PNG|thumb|left|alt=Alt text|#5  Existing PostgreSQL Superuser password from PG install]]
[[File:Escidoc_6_fedora_superuser.PNG|thumb|center|alt=Alt text|#6 Fedora Repository Superuser New userid]]
[[File:Escidoc_7_installdir.PNG|thumb|left|alt=Alt text|#7 Select Installation Directory]]
[[File:Escidoc_8_install_components.PNG|thumb|center|alt=Alt text|#8 Leave installed components at default]]
[[File:Escidoc_9_esd_superuser.PNG|thumb|left|alt=Alt text|#9 Escidoc Superuser New userid]]
[[File:Escidoc_10_inspector_user.PNG|thumb|center|alt=Alt text|#10 Escidoc Readonly User New userid]]
[[File:Escidoc_11_depositor_user.PNG|thumb|left|alt=Alt text|#11 Escidoc Depositor User New userid similar]]
 
<br style="clear:both" />
 
===Verification of Escidoc Core-Services Installation===
 
The steps for verification are described well in the readme.html file in the installation root directory.
 
====Step 1. Verification that the JBoss Application Server starts successfully====
 
Move to the .\jboss\bin directory (Windows) or ./jboss/bin directory (Linux) run run the run.bat / run.sh command as appropriate. The output in the windows is also logged under the ./jboss/server/default/log directory. The server has started successfully when the following message (with varying timestamp) has appeared.
 
 
  14:35:14,438 INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 1m:6s:827ms
 
Then log on to the server with the Escidoc Superuser (sysadmin) in a browser on the following URL
 
  <nowiki>http://localhost/8080/</nowiki>
 
====Step 2. Verification that that the Escidoc Datastores have initialised successfully====
Verify that the database has initialised with PGAdmin III. You should see three new databases. escidoc-core (owner: escidoc); fedora3 (owner:fedoraAdmin) and riTriples(owner: fedoraAdmin)
 
==Installation of Pubman 6.2.8 (on both Linux and Windows)==
 
As mentioned above, the installation artefacts on the [http://escidoc1.escidoc.mpg.de/projects/pubman/get_pubman/download.html Pubman project installation page] are up-to-date and valid for Release 6.2.8.
 
You should download both the [http://escidoc1.escidoc.mpg.de/resources/pubman_download_release/pubman_installer-standard.jar graphical installer], and actual Pubman software, the [http://escidoc1.escidoc.mpg.de/resources/pubman_download_release/pubman.ear Pubman Enterprise Archive Repository(EAR)]. The graphical installer is useful in that it gives a description of many parameters that may be configured in a PubMan installation. All these parameters are taken from the installing user by the program and added to the pubman.properties file.
 
 
===Step 1: Using the graphical installer to create the pubman.properties file===
On both Windows and Linux the java installer, once downloaded, can be run with the following command from the Downloads Directory:
 
  java -jar pubman_installer-standard.jar
 
 
''' OPEN: Load of initial Dataset failed. invalid escidoc login on screen 8 ?'''--[[User:Bourke|Bourke]] 08:26, 19 July 2011 (CEST)
 
[[File:PM628_1_license.PNG|thumb|left|alt=Alt text|#1 Accept Opensource Pubman License]]
[[File:PM628_2_installcomponents.PNG|thumb|center|alt=Alt text|#2 Deselect the Application Server for installation]]
[[File:PM628_3_connectivity.PNG|thumb|left|alt=Alt text|#3 Enter the Sysadmin Password, change Server hostname if necessary]]
[[File:PM628_4_serverurl.PNG|thumb|center|alt=Alt text|#4 ]]
[[File:PM628_5_mailserver.PNG|thumb|left|alt=Alt text|#5 ]]
[[File:PM628_6_cone_connectionparams.PNG|thumb|center|alt=Alt text|#6 ]]
[[File:PM628_7_cone_datatypes.PNG|thumb|left|alt=Alt text|#7 ]]
[[File:PM628_8_cone_initdatasetpassword.PNG|thumb|center|alt=Alt text|#8 ]]
[[File:PM628_9_stylesheets.PNG|thumb|left|alt=Alt text|#9 ]]
[[File:PM628_10_generalparams.PNG|thumb|center|alt=Alt text|#10 ]]
[[File:PM628_11_searchengineparams.PNG|thumb|left|alt=Alt text|#11 ]]
[[File:PM628_12_exportprefs.PNG|thumb|center|alt=Alt text|#12 ]]
[[File:PM628_13_content_survey.PNG|thumb|left|alt=Alt text|#13 ]]
[[File:PM628_14_installdir.PNG|thumb|center|alt=Alt text|#14 Enter a temporary installation directory]]
[[File:PM628_15_installresults.PNG|thumb|left|alt=Alt text|#13 ]]
 
<br style="clear:both" />
 
And finally copy the generated pubman.properties file from the temporary installation directory (#14 above)  installdir\jboss\server\default\conf\pubman.properties to the real installation directory in the same place in the hierarchy (.\jboss\server\default\conf
 
===Step 2: Adding the Pubman EAR to the existing JBoss / ESciDoc Core-Services environment===
 
By comparison, the actual installation of the PubMan software itself is easy. Since it is already in the EAR (Enterprise Archive Repository) format that the JBoss application server already understand, simply copy the EAR file from the Downloads Directory to the permanent installation directory, under .\jboss\server\default\deploy
 
The JBoss server will detect its presence and deploy it, which will also read the pubman.properties file created in the previous step.
 
===Verification of Pubman 6.2.8===
 
==Installation of Escidoc AdminConsole==
 
==Troubleshooting the Installation==
 
missing pubman.properties in jboss/server/default/conf
 
==Next Steps==
 
===Some simple monitoring scripts===
===(Windows only) Setup Pubman to run as a Windows Service===
 
===Load some Test data===
 
===Modifying the Pubman Interface===

Latest revision as of 10:46, 25 October 2011

Richard Bourke Sandbox

rough notes for install pubman on vm30[edit]

jdk (sun x64 1.6.0_26) install[edit]

  1. no sun jdk as standard in OpenSuse or SLES distribution (licensing reasons)
  2. default OpenJDK install
  3. on vm30, Sun 1.6.0_06 was installed (very old by now).
  4. Download from Oracle Java SE download page (linux x64 rpm binary)
  5. deinstallation of (all) java components with yast (ignore dependencies)
  6. manual install of rpm binary from oracle.
  7. update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin 20
  8. now /usr/bin/java is symbolic link to /etc/alternatives/java - which is probably updated behind the scenes by
  9. update-alternatives --config
  10. Setting JAVA_HOME is almost certainly still going to be necessary, pretty well every OS-Script will test for it.

postgreSQL (8.3) install[edit]

uninstall

  • with yast
  • userdel on postgres user
  • rm -rf /var/lib/pgsql/data and backup

install

  • yast postgres, postgres-contrib
  • afterwards set postgres os-user pwd as root
  • su - postgres
  • initdb --pgdata=/var/lib/pgsql/data
 
Die Dateien, die zu diesem Datenbanksystem gehören, werden dem Benutzer
»postgres« gehören. Diesem Benutzer muss auch der Serverprozess gehören.

Der Datenbankcluster wird mit der Locale de_DE.UTF-8 initialisiert werden.
Die Standarddatenbankkodierung wurde entsprechend auf UTF8 gesetzt.
Die Standardtextsuchekonfiguration wird auf »german« gesetzt.

erzeuge Verzeichnis /var/lib/pgsql/data ... ok
erzeuge Unterverzeichnisse ... ok
wähle Vorgabewert für max_connections ... 100
wähle Vorgabewert für shared_buffers/max_fsm_pages ... 32MB/204800
erzeuge Konfigurationsdateien ... ok
erzeuge Datenbank template1 in /var/lib/pgsql/data/base/1 ... ok
initialisiere pg_authid ... ok
initialisiere Abhängigkeiten ... ok
erzeuge Systemsichten ... ok
lade Systemobjektbeschreibungen ... ok
erzeuge Konversionen ... ok
erzeuge Wörterbücher ... ok
setze Privilegien der eingebauten Objekte ... ok
erzeuge Informationsschema ... ok
führe Vacuum in Datenbank template1 durch ...ok
kopiere template1 nach template0 ... ok
kopiere template1 nach postgres ... ok
  


  • starting postgres - the suse standard script /etc/init.d/postgresql start/stop/status works fine

ESciDoc (1.2.2) Install[edit]

Pubman install[edit]

snippets for gudrun[edit]

http://localhost:8080/pubman/faces/Reload.jsp

Images and icon …\jboss\server\default\deploy\pubman_ear.ear\pubman_presentation-6.2.8.war\resources\images

new logo in deploy/images.war/mpg_logo_repos.png

Blogs escidoc.pubman.blog.baseUrl=http://breakingnewsenglish.com/ escidoc.pubman.blog.news=http://feeds.feedburner.com/breakingnewsenglish


Labels Genres.xml jboss\server\default\tmp\deploy/pubman_ear.ear-contents\pubman_presentation-6.2.8-exp.war\WEB-INF\classes\Genres.xml copy nach ..server/default/deploy /conf

Styles default\tmp\deploy\pubman_ear.ear\common_presentation-1.0.44-exp.war\resources\cssFramework\themes

http://www.csszengarden.com/001/001.css