Difference between revisions of "Frequently Asked Questions"

From EPrints Documentation
Jump to: navigation, search
(No longer obsolete but certainly out of date)
 
(49 intermediate revisions by 14 users not shown)
Line 1: Line 1:
 +
[[Category:FAQ]]
 +
[[Category:Management]]
 +
[[Category:Out of Date]]
 +
 +
This all needs sorting out, it's just being grabbed from the old wiki for now.
 +
 
* [[Copyright and License FAQ]]
 
* [[Copyright and License FAQ]]
* [[Metadata FAQ]]
 
 
* [[Searching FAQ]]
 
* [[Searching FAQ]]
 
* [[OAI FAQ]]
 
* [[OAI 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 (although there's a how-to somewhere... link anyone?)
+
EPrints should work on any Linux 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 strongly not recommended.  It can be very difficult to get all the necessary dependencies in place.  If you want to get EPrints running but do not have as computer running a Linux operating system.  You could install [https://www.virtualbox.org/wiki/Downloads VirtualBox] and then create a Ubuntu or Redhat "virtual machine" (VM) to run on top of your Windows operating system.  Alternatively, you could install [https://docs.docker.com/docker-for-windows/install/ Docker Desktop for Windows] and [[Installing EPrints using Docker|install EPrints using Docker]].  However, both these methods are only recommended for testing or demoing EPrints.  If you intend to run EPrints long-term you should install on a dedicated Linux server or virtual machine.
  
 
== What computer do we need? ==
 
== What computer do we need? ==
 
+
Any modern physical PC (server or desktop) or a virtual machine should be more than capable of running EPrints. A suggested minimum specification for running a live service:
Any new PC is easily powerful enough. Suggested minimum spec. for a live service: 1gig RAM, 20gig Harddrive, 1GHz+ processor.
+
* 2GB RAM  
 +
* 15GB disk space
 +
* 100Mb/s network speed
  
 
== How much will it cost to set up? ==
 
== How much will it cost to set up? ==
Line 24: Line 30:
 
See [[How much will it cost?]]
 
See [[How much will it cost?]]
  
== How much diskspace will we need? ==
+
== How much disk space will we need? ==
 +
The main usage of disk space will be the uploaded files for the publications, (e.g. PDF, Word documents, etc.).  On average an eprint item will have associated files (e.g. uploaded PDF and thumbnail and preview images of that PDF) that take up 2MB of disk space.  So for every extra 500 eprint items you will need an extra 1GB of disk.  However, if you intend to upload lots of videos, images, are large documents, then this requirement will be higher.  On top of the space needed for uploaded documents and associated files you will need approximately 5GB for installing the operating system.  The disk space required by the database is difficult to determine, as this is dependent on a number of different factors but 1MB per eprint item.
 +
=== Example usage requirements ===
 +
* Small repository: 1000 eprint items
 +
** Operating system: 5GB
 +
** Upload and associated files: 2MB x 1000 = 2GB
 +
** Database: 1MB x 1000 = 1GB
 +
** '''TOTAL:''' 8GB (15GB to give room for expansion)
 +
* Medium-sized repository: 10,000 eprint items
 +
** Operating system: 5GB
 +
** Upload and associated files: 2MB x 10,000 = 20GB
 +
** Database: 1MB x 10,000 = 10GB
 +
** '''TOTAL:''' 35GB (50GB to give room for expansion)
 +
* Large repository: 100,000 eprint items
 +
** Operating system: 5GB
 +
** Upload and associated files: 2MB x 100,000 = 200GB
 +
** Database: 1MB x 100,000 = 100GB
 +
** '''TOTAL:''' 305GB (350-400GB to give room for expansion)
  
Proabably about 2 megabytes per eprint. At the time of writing a 120GB drive costs 50 pounds. That drive would hold approximately 60000 eprints.
+
== 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? ==
  
See also: [[Detailed disk usage statistics]].
+
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
 +
<syntaxhighlight lang="bash">
 +
./configure --help
 +
</syntaxhighlight>
 +
for details.
  
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?
+
== How do I get the body HTML of a page without the template around it? ==
Yes, just don't assign any value to required_formats in ArchiveConfigure?.pm, like so
+
This is handy for dynamically linking EPrints content into other sites.
  
$c->{required_formats} = [];
+
For "view" pages you need to add the option <code>include=>1</code> 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.
  
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>".
+
For dynamic pages, those under ''/cgi/'', you can add the cgi parameter <code>mainonly=yes</code>.  E.g. <code>http://tryme.demo.eprints-hosting.org/cgi/latest?mainonly=yes</code>
  
This keeps the key link to follow (to the full text) at the top of the screen.
+
== How do I get statistics on number of deposits per month? ==
  
I need to run apache as a user other than "eprints", what do I do to make EPrints work in this situation?
+
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.
 +
<syntaxhighlight lang="sql">
 +
select count(*), year(datestamp), month(datestamp)
 +
from archive
 +
group by year(datestamp),month(datestamp)
 +
order by year(datestamp),month(datestamp);
 +
</syntaxhighlight>
  
Example, apache is running as user "apache".
+
== I've edited the template (or other config file) but nothing seems to have changed - why? ==
  
    * Make all the eprints files owned by "apache" instead of "eprints"
+
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.
    * 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
+
= How to I add a metadata field to a live repository? =
 +
See [[Adding a Field to a Live Repository]].
  
  ./configure --help
+
= Installation Related Questions =
 +
   
 +
== When running a script I get the error; "Insecure dependency in mkdir while running with -T switch" ==
  
for details.
+
This usually indicates you are running an eprints script as root. Don't do that; become user 'eprints' instead.
  
How do I get the body HTML of a page without the template around it?
+
== title and fulltext search returns no results, but date search does ==
  
This is handy for dymnamically linking eprints content into other sites.
+
The indexer daemon is probably not running or is not working correctly, see [[API:bin/indexer]].
  
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.
+
== I don't want to give epadmin my mysql root password. What is the alternative? ==
 +
<syntaxhighlight lang="sql">
 +
mysql> CREATE DATABASE myrepo;
 +
Query OK, 1 row affected (0.06 sec)
  
For dynamic pages, those under /perl/, you can add the cgi parameter mainonly=yes
+
mysql> GRANT ALL PRIVILEGES ON myrepo.* TO myrepo@localhost IDENTIFIED BY 'secret';
 +
Query OK, 0 rows affected (0.52 sec)
 +
</syntaxhighlight>
  
eg.
+
Then provide the database name, user name and password to the '''[[API:bin/epadmin|epadmin]] create''' command.
  
http://eprints.ecs.soton.ac.uk/perl/latest?mainonly=yes
+
==  How do I get a value for a field of an eprint (without using any SQL)? ==
  
How do I get statistics on number of deposits per month?
+
(assuming the eprint is in the main archive, and has eprintid number 23)
  
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.
+
<syntaxhighlight lang="perl">
 +
my $ds = $repo->dataset( "eprint" );
 +
my $eprint = $ds->dataobj( 23 );
 +
my $value = $eprint->value( "editors" );
 +
</syntaxhighlight>
  
select count(*),year(datestamp), month(datestamp) from archive group by year(datestamp),month(datestamp) order by year(datestamp),month(datestamp);
+
See [[API:EPrints/DataObj]].
  
I\'ve edited the template (or other config file) but nothing seems to have changed - why?
+
== How can I get a utf8 string of the name of a subject, given its subjectid? ==
  
See HowEPrintsGeneratesWebPages
+
<syntaxhighlight lang="perl">
 +
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() );
 +
}
 +
</syntaxhighlight>

Latest revision as of 12:36, 21 January 2022


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 Linux operating system. We use Ubuntu (Debian) and Redhat Enterprise Linux.

Running EPrints on Microsoft Windows is possible but strongly not recommended. It can be very difficult to get all the necessary dependencies in place. If you want to get EPrints running but do not have as computer running a Linux operating system. You could install VirtualBox and then create a Ubuntu or Redhat "virtual machine" (VM) to run on top of your Windows operating system. Alternatively, you could install Docker Desktop for Windows and install EPrints using Docker. However, both these methods are only recommended for testing or demoing EPrints. If you intend to run EPrints long-term you should install on a dedicated Linux server or virtual machine.

What computer do we need?

Any modern physical PC (server or desktop) or a virtual machine should be more than capable of running EPrints. A suggested minimum specification for running a live service:

  • 2GB RAM
  • 15GB disk space
  • 100Mb/s network speed

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 disk space will we need?

The main usage of disk space will be the uploaded files for the publications, (e.g. PDF, Word documents, etc.). On average an eprint item will have associated files (e.g. uploaded PDF and thumbnail and preview images of that PDF) that take up 2MB of disk space. So for every extra 500 eprint items you will need an extra 1GB of disk. However, if you intend to upload lots of videos, images, are large documents, then this requirement will be higher. On top of the space needed for uploaded documents and associated files you will need approximately 5GB for installing the operating system. The disk space required by the database is difficult to determine, as this is dependent on a number of different factors but 1MB per eprint item.

Example usage requirements

  • Small repository: 1000 eprint items
    • Operating system: 5GB
    • Upload and associated files: 2MB x 1000 = 2GB
    • Database: 1MB x 1000 = 1GB
    • TOTAL: 8GB (15GB to give room for expansion)
  • Medium-sized repository: 10,000 eprint items
    • Operating system: 5GB
    • Upload and associated files: 2MB x 10,000 = 20GB
    • Database: 1MB x 10,000 = 10GB
    • TOTAL: 35GB (50GB to give room for expansion)
  • Large repository: 100,000 eprint items
    • Operating system: 5GB
    • Upload and associated files: 2MB x 100,000 = 200GB
    • Database: 1MB x 100,000 = 100GB
    • TOTAL: 305GB (350-400GB to give room for expansion)

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 dynamically 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 /cgi/, you can add the cgi parameter mainonly=yes. E.g. http://tryme.demo.eprints-hosting.org/cgi/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.

How to I add a metadata field to a live repository?

See Adding a Field to a Live Repository.

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() );
}