Difference between revisions of "Issues with Installing EPrints on Ubuntu 18.04"

From EPrints Documentation
Jump to: navigation, search
(Created page with "==== epadmin script errors with Perl version ==== When trying to run epadmin you will may see a couple of error messages that prevents you from creating an archive, especially...")
 
(Added instruction about mysql)
Line 17: Line 17:
  
 
You should now be able to run "epadmin create" without issue.
 
You should now be able to run "epadmin create" without issue.
 +
 +
 +
==== MySQL root user cannot be used ====
 +
On Ubuntu 18.04 LTS rather than prompting you to set a password for MySQL server when installing this as a dependency, it just installs it without.  However, this means on the root user can login to MySQL to add a database.  As "epadmin create" runs at the eprints user, this will not be able to create a database for EPrints.  The get round this as the root user connect to MySQL (just type "mysql" at the command line) and type the following two commands.  You will want to set your own password (i.e. not 'changeme') , you may also want to restrict which databases the eprints user has control over.  If you know the "Archive ID" you are going to use.
 +
CREATE USER 'eprints'@'localhost' IDENTIFIED by 'changeme';
 +
GRANT ALL PRIVILEGES ON *.* TO 'eprints'@'localhost' WITH GRANT OPTION;

Revision as of 09:56, 1 April 2019

epadmin script errors with Perl version

When trying to run epadmin you will may see a couple of error messages that prevents you from creating an archive, especially if you are using the 3.4.0 tarball from files.eprints.org:

Experimental keys on scalar is now forbidden at EPRINTS_PATH/bin/epadmin line 384

To fix this add the following line at the top of the epadmin file just after the use lines:

no if $] >= 5.017011, warnings => 'experimental::smartmatch';

A second error message you may see is:

Type of arg 1 to keys must be hash or array (not single ref constructor) at /usr/share/eprints/bin/epadmin line 384, near "};"

Go to the line number reported and change it to:

my @flavours = keys %{$conf->{flavours}};

You should now be able to run "epadmin create" without issue.


MySQL root user cannot be used

On Ubuntu 18.04 LTS rather than prompting you to set a password for MySQL server when installing this as a dependency, it just installs it without. However, this means on the root user can login to MySQL to add a database. As "epadmin create" runs at the eprints user, this will not be able to create a database for EPrints. The get round this as the root user connect to MySQL (just type "mysql" at the command line) and type the following two commands. You will want to set your own password (i.e. not 'changeme') , you may also want to restrict which databases the eprints user has control over. If you know the "Archive ID" you are going to use.

CREATE USER 'eprints'@'localhost' IDENTIFIED by 'changeme';
GRANT ALL PRIVILEGES ON *.* TO 'eprints'@'localhost' WITH GRANT OPTION;