Installing ePrints from source on Fedora Core 11

Download eprints-3.1.x.tar.gz from http://www.eprints.org

Terminal:
1. Empowered as super users

su

2. Install required packages

yum install -y rpmbuild wget elinks tetex-latex mod_perl perl-Unicode-String perl-MIME-Lite perl-XML-LibXML perl-XML-Parser perl-DBI perl-DBD-mysql xpdf gdome2 gdome2-devel ImageMagick

3. RPM Build

rpmbuild -ta eprints-x.x.x.tar.gz

4. Install the rpm

rpm -i /path/to/eprints … rpm (ie. /root/rpmbuild/RPMS/noarch/eprints3-eprints-1.fc11.noarch.rpm)

5. Install MySQL

yum install -y mysql mysql-server

6. Start MySQL

/etc/init.d/mysqld start

7. Set MySQL root password

mysql -u root
SET PASSWORD FOR ‘root’@localhost = PASSWORD(‘new_password’);

8. Change user to ‘eprints’

su eprints

9. Go to eprints directory

cd (Should be in /opt/eprints3)

10. Create a repository archive

./bin/epadmin create
(follows the installation process)

11. Update apache configuration file

vi /etc/httpd/conf/httpd.conf
Add: Include /opt/eprints3/cfg/apache.conf
Save and Exit

12. Restart Apache

Restart Apache
/etc/init.d/httpd restart

13. Using eprints

ePrints can be accessed via a web browser

Note: For testing purposes only!!! Running eprints on a ‘fake’ hostname is done by editing the hosts file:
For example if eprints is set to run under http://eprints.mydomain.com but we haven’t got that domain. Getting around it is to:
1. Edit hosts file

vi /etc/hosts
Add: 127.0.0.1    eprints.mydomain.com

2. Restart the interface

service network restart

3. ePrints can be accessible from http://eprints.mydomain.com

Recover Reset MySql Root Password

It has been a few weeks since I last touched the server and I couldn’t remember the root password for MySql. I’m lucky enough to find the following website, which tells me how to get around it.

http://blog.taragana.com/index.php/archive/how-to-recover-mysql-root-password/

The whole idea is very clever, all we need to do is to stop MySql process and start it without the permission mode. Then we can choose to reset the password and restart the MySql again.

$ sudo /etc/init.d/mysql stop

$ sudo mysqld_safe –skip-grant-tables &

$ mysql -u root

Now that we are in …

> use mysql

> UPDATE user SET password = PASSWORD(‘NEW-PASSWORD’) WHERE user = ‘root’;

> flush privileges;

> quit

Then re can restart the MySql and try to login with the new password.

$ sudo /etc/init.d/mysql restart

# mysql -u root -p