Demoprints Repository

From EPrints Documentation
Revision as of 18:25, 29 January 2009 by DaveTarrant (talk | contribs) (demoprints setup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a brief guide on how-to setup and install and maintain the repository

1: Base Install

  • Obtain a VM from the VM Pool (contact ld@ecs)
  • Install debian on it and follow the Installing EPrints 3 via apt (Debian/Ubuntu) guide to install eprints
  • Configure and Install a basic repository called demoprints with a demoprints mysql database

2: Customisations

Stop users from editing perl files

  • removed the roles field from the workflows/user/default.xml
  • removed the edit-config priv from cfg.d/user_roles.p

Allow users to create themselves an Admin account

  • add usertype to the following line in
$c->{user_registration_fields} = [ "name","usertype" ];

Install postfix for mail delivery

  • You may also need to contact postmaster@ecs to get the server permission to send email

Update the welcome message

  • Add the following to the top message box in index.xpage
  • This repository is a demonstration of <epc:print expr="$config{version_id}" />.
  • It is open for anyone to manage and change.
  • You may register as an administrator or editor (on a normal installation you could not do this).
  • All changes are reset automatically every Sunday at 4am, at which point all data is lost.

Add the reset scripts

  • create a file called demoprints_snapshot in the eprints home dir (as root), contents are:
 cd /usr/share/eprints3/archives/
 rm -f demoprints.*
 tar -cvf demoprints.tar demoprints
 mysqldump -u root demoprints > demoprints.sql
  • execute this file
  • create a file called demoprints_reset in the eprints home dir (as root), contents are:
 a2dissite eprints3
 /etc/init.d/apache2 reload
 cd /usr/share/eprints3/archives/
 rm -fR demoprints
 tar -xvf demoprints.tar
 mysqldump -u root demoprints user > users.sql
 echo "drop database demoprints" > mysql -u root
 echo "create database demoprints" > mysql -u root
 mysql -u root demoprints < demoprints.sql
 mysql -u root demoprints < users.sql
 rm -f users.sql
 a2ensite eprints3
 /etc/init.d/apache2 reload
  • create a file called demoprints_reset.cron in the eprints home dir (as root), contents are:
 0 4 * * 0 /usr/share/eprints3/demoprints_reset
  • make all the above files executable and add the cronjob to system startup

Upgrading the EPrints Software (untested at time of writing)

  • As root
 a2dissite eprints3
 /etc/init.d/apache2ctl reload
 apt-get update && apt-get install eprints
 ...follow messages
 su eprints
 ./bin/epadmin upgrade
 a2ensite eprints3
 /etc/init.d/apache2ctl reload