Installing EPrints on Windows

12 03 2010

Updated manual for installing EPrints on your Windows system. Current manuals seem to be lacking in details. Here is a consolidation of instructions that have worked. Total install time should be around 30-45 minutes, depending on your technical experience. So if you ever wanted to play with a digital repository system – have fun.

Required Software

Apache 2.2.15-win32
http://www.proxytracker.com/apache/httpd/binaries/win32/httpd-2.2.15-win32-x86-no_ssl.msi

ActivePerl 5.10.1 1007-MSWIN32-x86-291969 http://downloads.activestate.com/ActivePerl/releases/5.8.9.827/ActivePerl-5.8.9.827-MSWin32-x86-291969.msi

MySQL 5.1.44-win32 http://dev.mysql.com/downloads/mysql/

EPrints v3.2.0 Windows Installer http://files.eprints.org/494/1/eprints-3.2.0.tar.gz

Optional Software

GhostScript 8.60 http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs861/gs861w32.exe

Catdoc 0.94.2 http://hpux.connect.org.uk/hppd/hpux/Text/catdoc-0.94.2/

ImageMagick  6.3.5-6 http://linux.wareseeker.com/Multimedia/imagemagick-6.3.5-6.zip/321889

Install Apache

Run the Apache .msi file that you downloaded. The .msi is a self installer and will guide you through the process. Install Apache on port [80] as a service for all users. Name your server name (localhost), Domain name (localhost) and administrative email account (any email.com). Apache will install in the C:Program Files\Apache Foundation\Apache2.2 directory by default. Change the directory to C:EPrints\Apache2.

After installation Apache automatically starts. The  icon in the system tray means Apache has started. The icon means that the Apache Monitor Servers are running but not Apache.

Install ActivePerl

Run the ActivePerl.msi. Install into the C:\EPrints\Perl directory. When the installation of ActivePerl is complete, you will need to install 2 additional ppd components (DBD-mysql.ppd and mod_perl.ppd) from the command line. Open a command prompt (Command line 101: Start Menu – Run – type “cmd”) and enter:

ppm install http://capn.uwinnipeg.ca/PPMPackages/10xx/DBD-mysql.ppd
ppm install   http://capn.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd

The mod-perl installer will prompt you for the Apache module path. Enter:

C:/EPrints/Apache2/modules

You will now need to add mod_perl support to Apache. Locate and edit the Apache configuration file, C:\EPrints\Apache2\conf\httpd.conf. Open the file in a text editor and add the following lines:

LoadFile   “C:/EPrints/Perl/bin/perl510.dll”
LoadModule   perl_module modules/mod_perl.so

Configuring Apache and Perl

Configuring Apache and Perl requires you to set environment variables so EPrints can find Perl and its libraries. To set environment variables, use Control Panel – System – Advanced System Settings – Advanced – Environment Variables…

Locate the Path variable and edit it. Make sure both C:\Prints\perl\bin and C:\EPrints\Apache2\bin are included in the Path variable. Use a semicolon (;) to separate the variables.

Create a new variable PERL5LIB, with the value C:/EPrints/EPrints/perl_lib (note the forward slashes).

Install MySQL

Now run the MySQL installer and choose a Custom installation in the directory C:\EPrints\MySQL. You will need to set the following options:

Install the server and client programs. The C+ files are not needed. Skip the registration.

Configure MySQL

When the installation of MySQL completes, you will be prompted to configure the server. The configuration is simple and straightforward. You should accept most of the default settings.

When MySQL configuration has finished, you will need to set an option manually in MySQL’s configuration file by editing C:\EPrints\MySQL\my.ini in a text editor.

Remove the option NO_AUTO_CREATE_USER from the my.ini file.

Now restart MySQL so the new option will take effect. In the Control Panel – Administrative Tools – Services – MySQL and choose restart.

Install optional components

Install GhostScript, ImageMagick, and catdoc. These tools are not essential to EPrints, but provide extra functionality.

Run the GhostScript executable and install in C:\EPrints\GhostScript.

Catdoc is a zip file.  Unzip the file and place the contents into the EPrints directory. The file path should be C:\EPrints\catdoc-0.94.2.

Run the ImageMagick executable and install in C:\EPrints\ImageMagick . Select the options “Update executable search path” and “Install PerlMagick for ActiveState Perl”. Other options can be deselected.

Install EPrints 3

Run the EPrints installer. This will install files into C:\EPrints\EPrints.

When the installer has finished copying files, it will prompt you for server SMTP information.

Configure EPrints 3

First open a command prompt and change directory to C:\EPrints\EPrints. Now you can run epadmin to configure the archive.

cd \EPrints\EPrints

To start the EPrints creation process, run:

perl bin/epadmin create

Note: Whenever you need to run an EPrints command line tool, it must be prefixed with perl.

Run epadmin and fill out the prompts. You will get the following prompts (note that when you see something in [square brackets], it’s the default value and can be selected by simply hitting enter)

Archive ID – the system name for your archive. Once entered, an archive/<archive_id> directory will be created where the configuration files will be copied.

Configure vital settings – Hit enter to say ‘yes’. This will lead to more prompting about core settings:

Hostname – Since I am testing EPrints on my Laptop  I chose to run EPrints locally thus my hostname is 127.0.0.1. 127.0.0.1 is your computer’s default IP address. If you are directing to a live webserver, ensure that your IT can set the DNS.

Webserver Port – Which port to you want to serve the archive on? The default is 80, so unless you can think of a good reason not to, just hit enter to accept the default.

Alias – I created no aliases. You can enter any number of aliases that will take users to this archive. Enter a ‘#’ when you don’t want to enter any more. You could have your archive served on eprints.myorganisation.org and eprints.myorg.org. As with the Hostname, your systems team need to be informed about these aliases too.

Administrator Email – Enter the email address of the repository administrator.

Archive Name – The full name of your archive. By default, this will be used on the header of the webpage and in the title bar of the browser.

Write these core settings – Enter ‘yes’.

Configure database –  Enter ‘yes’.

Database Name – epadmin will create the database for you. By default, epadmin uses your Archive ID for database name.

MySQL Host – The address of the server that the database is running on. If the database is on the same machine as the EPrints installation, enter ‘localhost’.

MySQL Port – You probably don’t need to enter a value.

MySQL Socket – As with MySQL Port, it’s unlikely that you need to enter anything.

Database User – The username with which to log into the MySQL Database. You don’t need to create this user, epadmin will do it for you. If you enter a MySQL username that already exists, it will be overwritten by epstats.

Database Password – The password for the Database User.

Write these database settings – Choose ‘yes’.

Create database <Database Name> – Choose ‘yes’, and epadmin can create the database.

MySQL Root Password – To create the database and the user, epadmin needs the MySQL Root Password.

Create database tables – say yes to have epadmin create all the database tables.

Create an initial user – Choose ‘yes’.

Enter a username – The username you will use to log into EPrints in your browser. Epadmin defaults to admin.

Select a user type (user|editor|admin) – There are three levels of user in EPrints. You probably want to be an administrator, so enter ‘admin’.

Enter Password – Enter a password

Email – Enter your email address.

Important: Note that, although you are prompted to build the static web pages, import LOC subject headings and update the apache config files, epadmin will FAIL to run them. Look above the message “That seemed to more or less work…” and See the error messages “…not recognized as an internal or external command…

You must run generate_static *Archives ID*, import_subjects *Archives ID*, and generate_apacheconf manually from the command prompt according to the standard instructions. *Archives ID* should match the Archives ID entered when you ran epadmin.

perl bin/generate_static *Archives ID*
perl bin/import_subjects *Archives ID*
perl bin/generate_apacheconf

Finally you need to add the EPrints configuration file to Apache. Edit C:\EPrints\Apache2\conf\httpd.conf and add at the bottom of the file:

PerlPassEnv PERL5LIB
Include C:/EPrints/EPrints/cfg/apache.conf

Starting Apache

Control Apache from the Services panel. Stop and start the service before testing, to reload the configuration file.

Finish

EPrints should now be accessible from your browser, at the hostname (localhost or 127.0.0.1) you specified in epadmin.


Actions

Information

5 responses

11 06 2010
Installing EPrints on Windows « Repositories Support Project

[…] go to archivalsoup for their blog article that informed these instructions. The main functional difference is that this article reflects some […]

24 06 2010
brian

hi, why is it that i can no longer use 127.0.0.1 or localhost in the HOSTNAME in the eprints configuration? How can I access Eprints using my localhost?

24 06 2010
jlyles

Is this a fresh install? Error message? Windows version?

15 07 2010
anto

i have the same problem too. I can’t use 127.0.0.1 on [hostname] configuration, says “some browser doesn’t support setting cookies on localhost….try different hostname”

fresh install on windows 7

20 07 2010
anto

[sory for my bad english]

i’ve same problem too.. i can’t use ‘localhost’ as “HOSTNAME” on eprint configuration.. 127.0.0.1 too.. it says..”warning , some browser don’t support setting cookie on localhost…. try different..bla bla bla..”

Leave a reply to anto Cancel reply