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
Filed under: Research Repository | Leave a Comment
Tags: eprints, fc, fedora core, hosts, mysql, redhat, repository
How to install ePrints 3.1 on Redhat 4
This is a record of my ePrints installation. It is heavily based on the wiki from http://www.eprints.org.
1. Change user to root:
$ su
2. Go to home directory:
# cd
3. Create a directory called eprints:
# mkdir eprints
4. Go to eprints directory:
# cd eprints
5. Download eprints from http://www.eprints.org
# wget http://files.eprints.org/447/1/eprints-3.1.3.tar.gz
6. Unarchive it
# tar xzvf eprints-3.1.3.tar.gz
7. Installing the dependencies:
# up2date –nox -u httpd wget gzip xpdf lynx unzip
# up2date –nox -u mod_perl perl-DBI perl-DBD-MySQL perl-XML-Parser
# up2date –nox -u mysql-server
8. Install perl modules:
# cpan
> install Data::ShowTable
> install MIME::Base64
> install Unicode::String
> install Term::ReadKey
> install Readonly
> install MIME::Lite
> install XML::LibXML
> install CGI
9. Make sure mysqld and httpd starts after the reboot:
# /sbin/chkconfig mysqld on
# /sbin/chkconfig httpd on
10. Install GDOME:
# wget http://gdome2.cs.unibo.it/rpm/gdome2-0.8.1-1.i386.rpm
# wget http://gdome2.cs.unibo.it/rpm/gdome2-devel-0.8.1-1.i386.rpm
# rpm -Uvh gdome2-0.8.1-1.i386.rpm gdome2-devel-0.8.1-1.i386.rpm
11. Fix the bug in gdome-config:
# vi /usr/bin/gdome-config
Change:
the_libs=”$the_libs -L${exec_prefix}/lib -lgdome ` –libs` `xml2-config –libs`”
the_flags=”$the_flags -I${prefix}/include -I${prefix}/include/libgdome ` –cflags` `xml2-config –cflags`”
To:
the_libs=”$the_libs -L${exec_prefix}/lib -lgdome `/usr/bin/glib-config –libs` `xml2-config –libs`”
the_flags=”$the_flags -I${prefix}/include -I${prefix}/include/libgdome `/usr/bin/glib-config –cflags` `xml2-config –cflags`”
12. Install XML::GDOME:
# wget http://cpan.uwinnipeg.ca/cpan/authors/id/T/TJ/TJMATHER/XML-GDOME-0.86.tar.gz
# tar xzvf XML-GDOME-0.86.tar.gz
# cd XML-GDOME-0.86
# perl Makefile.PL
# make
# make install
13. Add eprints user:
# useradd eprints
# passwd eprints
14. Install ePrints:
# cd ..
# cd eprints-3.1.3
# ./configure
# ./install.pl
15. Set MySQL root password:
# /etc/init.d/mysql start
# mysql -u root
> SET PASSWORD FOR ‘root’@localhost = PASSWORD(‘new_password’);
> exit
16. Setup eprints archive:
# su eprints
# cd /opt/eprints3
# ./bin/epadmin create
17. Edit apache configurations:
# vi /etc/httpd/conf/httpd.conf
Add the following line at the end:
Include /opt/eprints3/cfg/apache.conf
Chage user to eprints:
User eprints
Group eprints
18. Restart apache:
# /etc/init.d/httpd restart
Source:
http://wiki.eprints.org/w/Installing_EPrints_3_on_RedHat_Enterprise_4
http://www.eprints.org/software
Filed under: IT | Leave a Comment
Tags: eprints, linux, redhat
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
Filed under: IT | Leave a Comment
Tags: linux, mysql, password, reset, root, ubuntu
Free up spaces on Ubuntu machine
This is a follow up post after upgrading the ubuntu on my eeepc. I found that I only have a few hundred megabytes left on my netbook. The space can be checked by running a command: df
Of course, I’m a nerd. I love using Terminal — nah not really. It’s just that from time to time I always find myself struggling with finding the buttons that I want. So, I perfer using the commandline way of doing things.
Ok, let’s go back to our topic of freeing up some spaces. Firstly, I cleaned apt cache by running this command:
sudo apt-get autoclean
But, that’s not really enough so I did:
sudo rm -rf /var/cache/apt/archives/*.deb
This line is used to remove the unnecessary files that we don’t need after installation.
Then I removed everything from /tmp because I believe that it’s under /tmp, which mean temporary. I should be able to remove it without any problem. (Please don’t trust me entirely lol)
sudo rm -rf /tmp/*
Then I removed a few applications that I have never used to save a few hundred megabytes, such as, thunderbird, evolution, games and so on. Most applications can be removed by:
sudo apt-get autoremove APPLICATION NAME
For example, sudo apt-get autoremove evolution.
At the end I’m pretty happy with the result and nothing has crashed yet, which is great. Please feel free to try it and let me know how happy you are when getting a few hundreds MBs back.
Filed under: IT | Leave a Comment
Tags: free, space, ubuntu
Upgrading Ubuntu on EEEPC
I have an old EEEPC running ubuntu 8.10. I spent a lot of time seeking for a method to perform in order to upgrade it to the current version of ubuntu, which is 9.10. The only problem that I found is I don’t have enough space to perform an upgrade. After spending a few hours researching, here is a list of steps that I’ve done:
1. Download ubuntu alternate iso images for 9.04 and 9.10
2. Find a thumbdrive, something like 1GB will work just fine
3. Copy the image to the thumbdrive, start with 9.04
4. Plug it into a netbook, in my case it’s a 4GB eeepc
5. Open a Terminal. If you can’t find it, it’s under Applications > Accessories > Terminal
6. Type:
sudo mount /path/to/file.iso /cdrom -o loop
In my case, it was: sudo mount /media/UNTITLED/ubuntu9-4.iso /cdrom -o loop
(If you noticed my laziness on the thumb drive name, it’s a yes, I don’t bother renaming my thumb drive after formatting)
7. Perform an upgrade with a little trick by running this command
sudo /cdrom/cdromupgrade
8. Follow the usual upgrade steps
9. Remove the “cdrom” from apt sources.list
sudo vi /etc/apt/sources.list
10. Repeat [3] for ubuntu 9.10
Ok, there is the explanation of what it does:
Since there is not enough space on my netbook, I decided to perform and upgrade based on CD. However, this funky netbook does not have a CD rom or DVD and I don’t want to spend a few bucks on an external DVD. Therefore, I mount the usb image as an actual CD rom on the system. Yes, it’s pretty neat
Then I go to my “virtual CD rom” and perform an upgrade.
Filed under: IT | Leave a Comment
Tags: alternate, asus, cdrom, eeepc, iso, ubuntu, upgrade, usb
Recent Entries
- Installing ePrints from source on Fedora Core 11
- Installing ePrints 3.1 on Redhat 4
- Recover Reset MySql Root Password
- Free up spaces on Ubuntu machine
- Upgrading Ubuntu on EEEPC
- How do delete an autocomplete entry from Firefox
- Display php error at runtime
- Json header for prototype (PHP)
- A perfect Firefox Extension for copying and pasting
- Enabling dock on Ubuntu
- Empty a trash on mac like super users do …
Categories
- IT (46)
- Research Repository (5)