Difference between revisions of "Frequently Asked Questions"

From EPrints Documentation
Jump to: navigation, search
(Installation Related Questions: Added redirects fix for mod_perl2)
m (add out of date and obsolete)
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:FAQ]]
 +
[[Category:Management]]
 +
[[Category: Out of Date]]
 +
[[Category: Obsolete]]
 +
 
This all needs sorting out, it's just being grabbed from the old wiki for now.
 
This all needs sorting out, it's just being grabbed from the old wiki for now.
  
Line 5: Line 10:
 
* [[Searching FAQ]]
 
* [[Searching FAQ]]
 
* [[OAI FAQ]]
 
* [[OAI FAQ]]
* [[BOAI Self-Archiving FAQ]]
 
 
* [[How much will it cost?]]
 
* [[How much will it cost?]]
  
 
== What operating systems can we use? ==
 
== What operating systems can we use? ==
  
EPrints should work on any UNIX operating system. We use Redhat Enterprise Linux. It will work on OSX but that takes a bit more effort. Please refer to the [http://www.eprints.org/documentation/handbook/osx.php Mac OS X Installation Guide] for more information
+
EPrints should work on any UNIX-like operating system. We use Ubuntu (Debian) and Redhat Enterprise Linux.
  
It will not run under Microsoft Windows and we have no plan to change this.
+
Running EPrints on Microsoft Windows is possible but not recommended - it can be difficult to get all the necessary dependencies in place.
  
 
== What computer do we need? ==
 
== What computer do we need? ==
Line 31: Line 35:
  
 
See also: [[Detailed disk usage statistics]].
 
See also: [[Detailed disk usage statistics]].
 
 
 
   
 
   
 
== Is it possible when depositing a document, to just point to an "alternative location" rather than have the full text copied and held in the eprint archive? ==
 
== Is it possible when depositing a document, to just point to an "alternative location" rather than have the full text copied and held in the eprint archive? ==
  
Yes, just don't assign any value to required_formats in ArchiveConfigure?.pm, like so
+
Yes, and to suppress the normal warning about no documents attached look in '''[archive_root]/cfg/cfg.d/eprint_warnings.pl'''.
 
 
$c->{required_formats} = [];
 
 
 
If you are doing this it would also be clever to change the ArchiveRender? routines so that on the abstract page "Full text available as" is replaced by "Full text available via <link to alternative location>".
 
 
 
This keeps the key link to follow (to the full text) at the top of the screen.
 
 
 
  
 
== I need to run apache as a user other than "eprints", what do I do to make EPrints work in this situation? ==
 
== I need to run apache as a user other than "eprints", what do I do to make EPrints work in this situation? ==
  
 
Example, apache is running as user "apache".
 
Example, apache is running as user "apache".
 
+
* Make all the eprints files owned by "apache" instead of "eprints"
    * Make all the eprints files owned by "apache" instead of "eprints"
+
* Edit SystemSettings?.pm to tell eprints to run as user "apache"
    * Edit SystemSettings?.pm to tell eprints to run as user "apache"
+
* You'll need to run all command line scripts as user "apache"
    * You'll need to run all command line scripts as user "apache"
+
* All eprints cron jobs should be owned by user "apache"  
    * All eprints cron jobs should be owned by user "apache"  
 
  
 
If you are installing a new copy of eprints, you can specify the user and group to use when you run 'configure'. Do
 
If you are installing a new copy of eprints, you can specify the user and group to use when you run 'configure'. Do
Line 59: Line 53:
  
 
for details.
 
for details.
 
  
 
== How do I get the body HTML of a page without the template around it? ==
 
== How do I get the body HTML of a page without the template around it? ==
 
  
 
This is handy for dymnamically linking eprints content into other sites.
 
This is handy for dymnamically linking eprints content into other sites.
Line 70: Line 62:
 
For dynamic pages, those under /perl/, you can add the cgi parameter mainonly=yes
 
For dynamic pages, those under /perl/, you can add the cgi parameter mainonly=yes
  
eg.
+
eg. http://eprints.ecs.soton.ac.uk/perl/latest?mainonly=yes
 
 
http://eprints.ecs.soton.ac.uk/perl/latest?mainonly=yes
 
  
  
 
== How do I get statistics on number of deposits per month? ==
 
== How do I get statistics on number of deposits per month? ==
 
  
 
This rather grim bit of SQL should work, although datestamp is the last modified date, not the submission OR creation date, it should still give a good indication.
 
This rather grim bit of SQL should work, although datestamp is the last modified date, not the submission OR creation date, it should still give a good indication.
  
select count(*),year(datestamp), month(datestamp) from archive group by year(datestamp),month(datestamp) order by year(datestamp),month(datestamp);
+
select count(*), year(datestamp), month(datestamp)
 
+
from archive
 
+
group by year(datestamp),month(datestamp)
== I\'ve edited the template (or other config file) but nothing seems to have changed - why? ==
+
order by year(datestamp),month(datestamp);
 
 
 
 
See HowEPrintsGeneratesWebPages
 
  
 +
== I've edited the template (or other config file) but nothing seems to have changed - why? ==
  
----
+
While EPrints tries to automatically reload when a configuration file is changed you may need to reload the Web server for changes to take effect. See also the [[API:bin/epadmin|epadmin reload]], the [[API:bin/generate_static|generate_static]] and [[API:bin/generate_views|generate_views]] commands.
  
=Installation Related Questions =
+
= Installation Related Questions =
 
   
 
   
== What platforms will GNU EPrints run on? ==
 
 
In theory any UNIX like platform: Linux, Solaris, BSD etc. even OSX! If you don't care then we recommend the RedHat Linux distribution.
 
 
 
 
== When running a script I get the error; "Insecure dependency in mkdir while running with -T switch" ==
 
== When running a script I get the error; "Insecure dependency in mkdir while running with -T switch" ==
  
 
This usually indicates you are running an eprints script as root. Don't do that; become user 'eprints' instead.
 
This usually indicates you are running an eprints script as root. Don't do that; become user 'eprints' instead.
  
 +
== title and fulltext search returns no results, but date search does ==
  
== Errors with import_subjects when installing Eprints 2.3.3 with MySQL? 4
+
The indexer daemon is probably not running or is not working correctly, see [[API:bin/indexer]].
MySQL? ==
 
 
 
4 does not grant permission to create temporary tables with GRANT ALL. Do (at the mysql prompt): GRANT CREATE TEMPORARY TABLES ON archive_name.* TO eprints@localhost IDENTIFIED BY "*******"; Then do: mysqladmin -u root -p reload to reload the mysql security tables.
 
 
 
 
 
== title and fulltext search returns no results, but date search does (EPrints 2.3) ==
 
 
 
 
 
The indexer daemon is probably not running or is not working correctly.
 
 
 
Syntax error on line 39 of /opt/eprints2/archives/eprintsOfGoat/cfg/auto-apache.conf:
 
order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure' on restart of Apache after initial installation
 
 
 
There is a small error in the auto-apache.conf file, there is a space between 'deny, allow' on line 39, remove this space to stop this error.
 
 
 
 
 
== I don\'t want to give configure_archive my mysql root password. What is the alternative? ==
 
 
 
 
 
(instructions acurate as of EP 2.3.12)
 
 
 
Run configure_archive but say "no" to "create the database?"
 
 
 
Log into the mysql client as root:
 
 
 
% mysql -u root -p
 
Enter password:
 
 
 
(and enter your password)
 
  
This example creates a database for archive "foo" with user "foouser" and password "foopass".
+
== I don't want to give epadmin my mysql root password. What is the alternative? ==
  
These values should match the values you gave to configure_archive. You can check them in /opt/eprints2/archives/foo.xml
+
  mysql> CREATE DATABASE myrepo;
 
 
  mysql> CREATE DATABASE foo;
 
 
  Query OK, 1 row affected (0.06 sec)
 
  Query OK, 1 row affected (0.06 sec)
  
  mysql> GRANT ALL ON foo.* TO foouser@localhost;
+
  mysql> GRANT ALL PRIVILEGES ON myrepo.* TO myrepo@localhost IDENTIFIED BY 'secret';
 
  Query OK, 0 rows affected (0.52 sec)
 
  Query OK, 0 rows affected (0.52 sec)
  
The last bit depends if you are running on a MySQL? version equal of greater than 4.1
+
Then provide the database name, user name and password to the '''[[API:bin/epadmin|epadmin]] create''' command.
 
 
4.1+:
 
 
 
mysql> SET PASSWORD FOR foouser@localhost = OLD_PASSWORD("foopass");
 
 
 
pre 4.1:
 
 
 
mysql> SET PASSWORD FOR foouser@localhost = PASSWORD("foopass");
 
 
 
That's all configure_archive would have done.
 
 
 
----
 
 
 
  
 
==  How do I get a value for a field of an eprint (without using any SQL)? ==
 
==  How do I get a value for a field of an eprint (without using any SQL)? ==
Line 163: Line 102:
 
(assuming the eprint is in the main archive, and has eprintid number 23)
 
(assuming the eprint is in the main archive, and has eprintid number 23)
  
   my $ds = $session->get_archive()->get_dataset( "archive" );
+
<source lang="perl">
   my $eprint = EPrints::EPrint?->new( $session, 23, $ds );
+
   my $ds = $repo->dataset( "eprint" );
   my $value = $eprint->get_value( 'editors' );
+
   my $eprint = $ds->dataobj( 23 );
 +
   my $value = $eprint->value( "editors" );
 +
</source>
  
 +
See [[API:EPrints/DataObj]].
  
 
== How can I get a utf8 string of the name of a subject, given its subjectid? ==
 
== How can I get a utf8 string of the name of a subject, given its subjectid? ==
  
<pre>
+
<source lang="perl">
 
   sub get_subject_name_string
 
   sub get_subject_name_string
 
   {
 
   {
Line 181: Line 123:
 
return EPrints::Utils::tree_to_utf8( $subj->render_description() );
 
return EPrints::Utils::tree_to_utf8( $subj->render_description() );
 
   }
 
   }
</pre>
+
</source>
 
 
...
 
 
 
 
 
== Using mod_perl2, pages with redirects (e.g. /perl/search) are blank. How do I fix this? ==
 
 
 
In perl_lib/EPrints/Session.pm change
 
 
 
      $self->{"request"}->status_line( "302 Moved" );
 
 
 
to
 
      $self->{"request"}->status(302);
 

Revision as of 00:47, 12 September 2018


This all needs sorting out, it's just being grabbed from the old wiki for now.

What operating systems can we use?

EPrints should work on any UNIX-like operating system. We use Ubuntu (Debian) and Redhat Enterprise Linux.

Running EPrints on Microsoft Windows is possible but not recommended - it can be difficult to get all the necessary dependencies in place.

What computer do we need?

Any new PC is easily powerful enough. Suggested minimum spec. for a live service: 1gig RAM, 20gig Harddrive, 1GHz+ processor.

How much will it cost to set up?

Most of the costs are staff time. Equipment costs are a PC, an internet connection and a BACKUP STRATEGY. Please remember to budget for backups.

EPrints, and all the other software required to make it work, are available for no cost. At some point in the future EPrints may offer some pay-services, but the core software will remain zero cost and freely available to all.

See How much will it cost?

How much diskspace will we need?

Proabably about 2 megabytes per eprint. At the time of writing a 120GB drive costs 50 pounds. That drive would hold approximately 60000 eprints.

See also: Detailed disk usage statistics.

Is it possible when depositing a document, to just point to an "alternative location" rather than have the full text copied and held in the eprint archive?

Yes, and to suppress the normal warning about no documents attached look in [archive_root]/cfg/cfg.d/eprint_warnings.pl.

I need to run apache as a user other than "eprints", what do I do to make EPrints work in this situation?

Example, apache is running as user "apache".

  • Make all the eprints files owned by "apache" instead of "eprints"
  • Edit SystemSettings?.pm to tell eprints to run as user "apache"
  • You'll need to run all command line scripts as user "apache"
  • All eprints cron jobs should be owned by user "apache"

If you are installing a new copy of eprints, you can specify the user and group to use when you run 'configure'. Do

./configure --help 

for details.

How do I get the body HTML of a page without the template around it?

This is handy for dymnamically linking eprints content into other sites.

For "view" pages you need to add the option include=>1 to the view configuration. This will cause generate_views to make a .include page in addition to the .html page. The .include page will have no template around it.

For dynamic pages, those under /perl/, you can add the cgi parameter mainonly=yes

eg. http://eprints.ecs.soton.ac.uk/perl/latest?mainonly=yes


How do I get statistics on number of deposits per month?

This rather grim bit of SQL should work, although datestamp is the last modified date, not the submission OR creation date, it should still give a good indication.

select count(*), year(datestamp), month(datestamp)
from archive
group by year(datestamp),month(datestamp)
order by year(datestamp),month(datestamp);

I've edited the template (or other config file) but nothing seems to have changed - why?

While EPrints tries to automatically reload when a configuration file is changed you may need to reload the Web server for changes to take effect. See also the epadmin reload, the generate_static and generate_views commands.

Installation Related Questions

When running a script I get the error; "Insecure dependency in mkdir while running with -T switch"

This usually indicates you are running an eprints script as root. Don't do that; become user 'eprints' instead.

title and fulltext search returns no results, but date search does

The indexer daemon is probably not running or is not working correctly, see API:bin/indexer.

I don't want to give epadmin my mysql root password. What is the alternative?

mysql> CREATE DATABASE myrepo;
Query OK, 1 row affected (0.06 sec)
mysql> GRANT ALL PRIVILEGES ON myrepo.* TO myrepo@localhost IDENTIFIED BY 'secret';
Query OK, 0 rows affected (0.52 sec)

Then provide the database name, user name and password to the epadmin create command.

How do I get a value for a field of an eprint (without using any SQL)?

(assuming the eprint is in the main archive, and has eprintid number 23)

  my $ds = $repo->dataset( "eprint" );
  my $eprint = $ds->dataobj( 23 );
  my $value = $eprint->value( "editors" );

See API:EPrints/DataObj.

How can I get a utf8 string of the name of a subject, given its subjectid?

  sub get_subject_name_string
  {
	my( $session, $subjectid ) = @_;
	my $subj = EPrints::Subject->new( $session, $subjectid ); 
	if( !defined $subj ) 
	{
		return "errer, unknown subject: $subjectid";
	}
	return EPrints::Utils::tree_to_utf8( $subj->render_description() );
  }