Benutzer-Werkzeuge

Webseiten-Werkzeuge


lilypond:lsr_setup

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
lilypond:lsr_setup [2011/07/06 14:03] – [section 5] reinholdlilypond:lsr_setup [2013/03/13 10:42] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 49: Zeile 49:
 mysql --user=lsr --password=lsr lsr < lsr-2011-06-30.mysqldump mysql --user=lsr --password=lsr lsr < lsr-2011-06-30.mysqldump
 </code> </code>
-  - Create a group superadmin and give it all rights to all types. Also add a user 'admin' and add it to the superadmin group. It's easiest to use the following SQL file: {{:lilypond:lsr:sql-add-superadmin.sql|sql-add-superadmin.sql}}<code>+  - Create a group superadmin and give it all rights to all types. Also add a user 'admin' and add it to the superadmin group. It's easiest to use the following SQL file (Please change the password!): {{:lilypond:lsr:sql-add-superadmin.sql|sql-add-superadmin.sql}}<code>
 mysql --user=lsr --password=lsr lsr < sql-add-superadmin.sql mysql --user=lsr --password=lsr lsr < sql-add-superadmin.sql
 </code> </code>
Zeile 75: Zeile 75:
 ===== Preparing the web host's directory structure ===== ===== Preparing the web host's directory structure =====
   - Create an output directory, where we collect all files for the web application: <code>   - Create an output directory, where we collect all files for the web application: <code>
-mkdir -p web/LSR/WEB-INF/{classes,data,templates,lib} web/ERW/{custom,defs,forms}+mkdir -p web/LSR/WEB-INF/{classes,data,templates,lib} web/{custom,defs,forms}
 </code> </code>
   - Copy the lsr-0.5.jar and all other required java packages to the output directory:<code>   - Copy the lsr-0.5.jar and all other required java packages to the output directory:<code>
Zeile 86: Zeile 86:
   - Copy all LSR files (also the generated ERW files) over, which will be served by apache:<code>   - Copy all LSR files (also the generated ERW files) over, which will be served by apache:<code>
 cp -r lsr-0.5/{css,html,img} web/LSR/ cp -r lsr-0.5/{css,html,img} web/LSR/
-cp lsr-0.5/ERW/custom/*.php web/ERW/custom/ +cp lsr-0.5/ERW/custom/*.php web/custom/ 
-cp lsr-0.5/ERW/defs/*.php web/ERW/defs/ +cp lsr-0.5/ERW/defs/*.php web/defs/ 
-cp lsr-0.5/ERW/forms/*.php web/ERW/forms/ +cp lsr-0.5/ERW/forms/*.php web/forms/ 
-mv web/ERW/custom/login.php web/+mv web/custom/login.php web/
 cp lsr-0.5/vm/*.vm web/LSR/WEB-INF/templates cp lsr-0.5/vm/*.vm web/LSR/WEB-INF/templates
 </code> </code>
-  - Download the web.xml and velocity.properties files to the web/LSR/WEB-INF/ directory: {{:lilypond:lsr:web.xml|web.xml required to set up the tomcat webapp}} and {{:lilypond:lsr:velocity.properties|velocity.properties required by the tomcat webapp}} +  - Download the web.xml and velocity.properties files to the web/LSR/WEB-INF/ directory:  
-  - Open web/ERW-config.orig.php in a text editor and change $_ERW_erlId, the database user, password and database to "lsr". Also prepend ERW/ to the entries for defs, custom and forms. Then rename it to ERW-config.php:<code> +    * {{:lilypond:lsr:web.xml|web.xml required to set up the tomcat webapp}} 
-mv web/ERW-config.orig.php web/ERW-config.php+    * {{:lilypond:lsr:velocity.properties|velocity.properties required by the tomcat webapp}} 
 +  - Open web/ERW-conf.orig.php in a text editor and change $_ERW_erlId, the database user, password and database to "lsr". Then rename it to ERW-config.php:<code> 
 +mv web/ERW-conf.orig.php web/ERW-conf.php
 </code>My ERW-config.php can also be downloaded here: {{:lilypond:lsr:erw-conf.php|My ERW-conf.php config file}} </code>My ERW-config.php can also be downloaded here: {{:lilypond:lsr:erw-conf.php|My ERW-conf.php config file}}
   - Create the initial MG4J search index:<code>   - Create the initial MG4J search index:<code>
 +  lsrshdir=$PWD/lsr-0.5/sh/
   cd web/LSR/WEB-INF/data   cd web/LSR/WEB-INF/data
-  . ../../../../lsr-0.5/sh/setcp.sh +  . $lsrshdir/setcp.sh 
-  ../../../../lsr-0.5/sh/indexlsr.sh +  $lsrshdir/indexlsr.sh 
-  cd ../../../../+  cd -
 </code> </code>
 ===== Setting up Tomcat ===== ===== Setting up Tomcat =====
Zeile 166: Zeile 169:
 ===== Setting up the LilyPond jail needed for creating snippet output ===== ===== Setting up the LilyPond jail needed for creating snippet output =====
  
 +  - Install a Lilypond version from the binary builds: 
 +    - Download the .sh file
 +    - As root, do <code>
 +  sudo mkdir /opt/lily2.14
 +  sudo ./lilypond-2.14.2-1.linux-x86.sh --prefix=/opt/lily2.14/</code>
 +  - Use {{:lilypond:lsr:create_lily_jail.sh|this script}} to setup a lilypond jail directory (each installed lilypond version needs roughly 100MB). You can use multiple installations with multiple -p arguments (in this example, I have versions 2.10, 2.12 and 2.14 installed in the same jail):<code>
 +  sudo ./create_lily_jail.sh -p /opt/lily2.10/ -p /opt/lily2.12/ -p /opt/lily2.14/ -s 400000 lilyjail</code>
 +  - This script will print out some instructions how to enable sudo for a user and how to automount the jail on boot. Follow the instructions, i.e.
 +    - Add the following line to /etc/fstab to ensure the loop device will be mounted on boot:<code>
 +/home/lilyjail/lilyloop /home/lilyjail/lilymnt    ext3 auto,loop 0       0</code>
 +    - Call ''visudo'' as root and add the following lines to the sudoers file (typically /etc/sudoers):<code>
 +ALL   ALL=NOPASSWD: /opt/lily2.10/lilypond/usr/bin/lilypond -jlilyjail\,lilyjail\,/home/lilyjail/lilymnt\,/lilyhome *
 +ALL   ALL=NOPASSWD: /opt/lily2.12/lilypond/usr/bin/lilypond -jlilyjail\,lilyjail\,/home/lilyjail/lilymnt\,/lilyhome *
 +ALL   ALL=NOPASSWD: /opt/lily2.14/lilypond/usr/bin/lilypond -jlilyjail\,lilyjail\,/home/lilyjail/lilymnt\,/lilyhome *
 +</code>This allows all users to run the jailed lilypond installation.
  
 +
 +For details see the LilyPond documentation: http://lilypond.org/doc/v2.14/Documentation/usage/command_002dline-usage.html#lilypond-in-chroot-jail
 ===== Open issues ===== ===== Open issues =====
  
-  * Adjust all hard-coded links to lsr.dsi.unimi.it by relative links to the local host.+.
lilypond/lsr_setup.1309961018.txt.gz · Zuletzt geändert: 2013/03/13 10:42 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki