Difference between revisions of "Installing EPrints on RHEL/Fedora/CentOS"

From EPrints Documentation
Jump to: navigation, search
(Reorganised page and made more up to date.)
Line 4: Line 4:
  
 
* RedHat Enterprise (RHEL) / CentOS 7 or Fedora 25+ (earlier versions may work)  
 
* RedHat Enterprise (RHEL) / CentOS 7 or Fedora 25+ (earlier versions may work)  
 
+
==Installing from EPrints 3.3.x RPM ==
+
== Installing from EPrints 3.3.x RPM ==
  
 
Add the rpm.eprints.org repository key:
 
Add the rpm.eprints.org repository key:
Line 25: Line 25:
 
===Other sources for dependencies===
 
===Other sources for dependencies===
  
The following RPM repositories may be useful for finding other dependencies required by EPrints that aren't part of the core RHEL system.
+
The following RPM repositories may be useful for finding other non-critical dependencies required by EPrints that are not part of the core RHEL system.
  
 
http://fedoraproject.org/wiki/EPEL - Fedora Extras for RHEL.
 
http://fedoraproject.org/wiki/EPEL - Fedora Extras for RHEL.
Line 33: Line 33:
 
[http://www.imagemagick.org/script/binary-releases.php ImageMagick] provide an RPM for RHEL/CentOS 5. At time of writing the RPM requires fftw3, fltk, jasper and openexr which are available from ''RPMForge''. libwebp is available from [http://rpm.eprints.org/RHEL/5/ rpm.eprints.org].
 
[http://www.imagemagick.org/script/binary-releases.php ImageMagick] provide an RPM for RHEL/CentOS 5. At time of writing the RPM requires fftw3, fltk, jasper and openexr which are available from ''RPMForge''. libwebp is available from [http://rpm.eprints.org/RHEL/5/ rpm.eprints.org].
  
==SELinux==
+
you may also need to tell SELinux to allow apache to talk on the network (maybe only if your database is on a separate server
  
If you're using SELinux on your server you will need to give Apache read/write access to the documents directory for all repositories you create and the eprints var folder (indexer log, ticker files):
+
setsebool -P httpd_can_network_connect=1
  
chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/archives/[repoid]/documents/
 
chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/var/
 
  
you may also need to tell SELinux to allow apache to talk on the network (maybe only if your database is on a separate server
+
== Installing EPrints 3.3.x from Source ==
 +
'''N.B. Installing from source is generally discouraged particularly for production repositories.  However, if want to develop the EPrints code or a plugin or Bazaar package it may be useful to install from source, ideally from [https://github.com/eprints/eprints EPrints Core Git repository].''' Below are instructions on how this may be done for the latest versions RHEL/Fedora/CentOS.
  
setsebool -P httpd_can_network_connect=1
+
...
  
 
==Getting Started==
 
==Getting Started==
Line 66: Line 65:
 
After a upgrading from previous 3.3, your existing repository's database may need updating.  
 
After a upgrading from previous 3.3, your existing repository's database may need updating.  
 
  bin/epadmin update [archive_id]
 
  bin/epadmin update [archive_id]
 +
 +
=== Using SELinux ===
 +
 +
If you're using SELinux on your server you will need to give Apache read/write access to the documents directory for all repositories you create and the eprints var folder (indexer log, ticker files):
 +
 +
chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/archives/[repoid]/documents/
 +
chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/var/

Revision as of 10:17, 1 September 2017


Requirements

  • RedHat Enterprise (RHEL) / CentOS 7 or Fedora 25+ (earlier versions may work)

Installing from EPrints 3.3.x RPM

Add the rpm.eprints.org repository key:

rpm -ivh http://rpm.eprints.org/rpm-eprints-org-key-1-1.noarch.rpm

... the rpm.eprints.org EPrints repository:

rpm -ivh http://rpm.eprints.org/eprints/noarch/rpm-eprints-org-1-1.noarch.rpm

Upgrade your XML libraries:

yum upgrade libxml2 libxslt perl-XML-LibXML perl-XML-LibXSLT

Install EPrints 3:

yum install eprints 

Other sources for dependencies

The following RPM repositories may be useful for finding other non-critical dependencies required by EPrints that are not part of the core RHEL system.

http://fedoraproject.org/wiki/EPEL - Fedora Extras for RHEL.

http://pkgs.repoforge.org/rpmforge-release/ - RPMforge, which covers a very large range of Perl modules plus others.

ImageMagick provide an RPM for RHEL/CentOS 5. At time of writing the RPM requires fftw3, fltk, jasper and openexr which are available from RPMForge. libwebp is available from rpm.eprints.org.

you may also need to tell SELinux to allow apache to talk on the network (maybe only if your database is on a separate server

setsebool -P httpd_can_network_connect=1


Installing EPrints 3.3.x from Source

N.B. Installing from source is generally discouraged particularly for production repositories. However, if want to develop the EPrints code or a plugin or Bazaar package it may be useful to install from source, ideally from EPrints Core Git repository. Below are instructions on how this may be done for the latest versions RHEL/Fedora/CentOS.

...

Getting Started

Getting Started with EPrints 3

Troubleshooting

Failed to parse XML file

When installing EPrints on RHEL6 (may apply to other versions), If you get the error:

Failed to parse XML file:
/usr/share/eprints/lib/lang/en/phrases/system.xml: Entity: line 396: parser error : Entity 'nbsp' not defined age or title page. If there are more...

Run

sed -i 's/ / /g' /usr/share/eprints/lib/lang/en/phrases/system.xml

then navigate to the root of your EPrints install (/opt/eprints or /usr/share/eprints) and run

bin/generate_views *repository_id*
bin/epadmin reload *repository_id*

Upgrade from previous 3.3

After a upgrading from previous 3.3, your existing repository's database may need updating.

bin/epadmin update [archive_id]

Using SELinux

If you're using SELinux on your server you will need to give Apache read/write access to the documents directory for all repositories you create and the eprints var folder (indexer log, ticker files):

chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/archives/[repoid]/documents/
chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/var/