Вы находитесь на странице: 1из 4

Installing Dspace 3.x on Ubuntu 12.

04
Installation of prerequisite applications
Open Terminal
sudo apt-get install openjdk-7-jdk
sudo apt-get install tasksel
sudo tasksel

Select the following packages.


Use space bar for select applications from list.
[*] LAMP server [*] PostgreSQL database [*] Tomcat Java server
use tab to select OK button and enter. Packages will start to install.
On the way you have to give MySQL root password. MySQL not necessary for Dspace installation.

sudo apt-get install ant maven


Create the database user (dspace)
sudo su postgres
createuser -U postgres -d -A -P dspace
enter password for new role (select a password like dspace) Shall the new role be allowed to create
more new roles? (y/n) n
Exit from the promp, type exit
Allow the database user (dspace) to connect to the database [If the following command not open,
check the postgresql version number and apply in the command]

sudo gedit /etc/postgresql/9.1/main/pg_hba.conf


Add this line to the configuration file at the end:
local all dspace md5
save and close the file

Restart PostgreSQL : sudo su

enter,

then paste the following line and enter


/etc/init.d/postgresql restart
Create the Unix 'dspace' user, update the passwd, create the directory in which you will install dspace,
and ensure that the Unix 'dspace' user has write privileges on that directory:
sudo useradd -m dspace
sudo passwd dspace (enter any password like dspace for the new user dspace)
sudo mkdir /dspace
sudo chown dspace /dspace
Create the PostgreSQL 'dspace' database.
sudo -u dspace createdb -U dspace -E UNICODE dspace
Configure Tomcat to know about the DSpace webapps.
[If the following command not open, check the tomcat version number and apply in the command]
sudo gedit /etc/tomcat7/server.xml

Insert the following chunk of text just above the closing </Host>
<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai" docBase="/dspace/webapps/oai" allowLinking="true"/>
<Context path="/jspui" docBase="/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni" docBase="/dspace/webapps/lni" allowLinking="true"/>

<Context path="/solr" docBase="/dspace/webapps/solr" allowLinking="true"/>

save and close the file a

This following step downloads the compressed archive from SourceForge, and unpacks it in your
current directory. The dspace-1.x.x-src-release directory is typically referred to as [dspace-src]. You
can also download direct from Sourceforge website.
sudo mkdir /build
sudo chmod -R 777 /build
cd /build
wget http://downloads.sourceforge.net/project/dspace/DSpace%20Stable/3.1/dspace-3.1release.tar.bz2

tar -xvjf dspace-3.1-src-release.tar.bz2

cd /build/dspace-3.1-src-release
mvn -U package
cd dspace/target/dspace-3.1-build
sudo ant fresh_install
Fix Tomcat permissions, and restart the Tomcat server
sudo chown tomcat7:tomcat7 /dspace -R
Restart Tomcat
/etc/init.d/tomcat7 restart
Make an initial administrator account (an e-person) in DSpace:

/dspace/bin/dspace create-administrator
Test it out in your browser
That is all that is required to install DSpace on Ubuntu. There are two main webapps that provide a
similar turn-key repository interface
http://localhost:8080/xmlui
http://localhost:8080/jspui

Dspace Backup And Restore


After Searching alot for this topic i was unable to find the best tutorial. But i got very good
information from
http://linuxhalwa.blogspot.com/2011/12/installing-dspace-18-on-ubuntu-1004.html .
I will start after configuring tomcat6 from the above tutorial how to do back up and restore.
Backup your entire dspace directory by
tar zvcf - /dspace dspace.tar.gz on your server
Then backup the dspace database by
pg_dump dspace > dspace.sql
Copy the dspace directory and database to the new server you are setting up.
copy the directiory on /
then untar the file
tar -xzvf dspace.tar.gz
Restore the database
psql dspace < dspace.sql
Then change the permissions on /dspace to be owned by tomcat6
chown -R tomcat6.tomcat6 /dspace
It should be okay.
You can access it by typing ** represent ip
**.**.**.**:8080/xmlui
or
**.**.**.**:8080/jspui
to remove the port and either xmlui or jspui
port forward port 80 to 8080
by iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
To replace xmlui or jspui
locate ROOT which is in /var/lib/tomcat6/webapps
then cd /var/lib/tomcat6/webapps
mv ROOT ROOT_test
ln -s /dspace/webapps/xmlui ROOT
That should work

Вам также может понравиться