Difference between revisions of "SUNScholar/Install DSpace"

From Libopedia
Jump to navigation Jump to search
 
(230 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  '''<font size="3" color="red">It is vitally essential that you have first completed the [[SUNScholar/Prepare_Ubuntu|preparation of Ubuntu]] for the installation of DSpace.</font>'''
+
=PROCEDURE 3 - INSTALL DSPACE=
 +
<center>
 +
  '''<font color="red">This procedure assumes that your server is open on the campus firewall OR proxy server.<br>Open access to the internet is needed to be able to download Java packages from various websites during the build of the various DSpace web applications.</font>'''
  
If you have not, please do so now.
+
'''<font color="red">*** Complete the following steps as the "dspace" user, unless otherwise explicitly specified ***</font>'''
=Introduction=
+
</center>
=Step 1. Login to the remote server=
+
===[[SUNScholar/Install DSpace/S01|Step 1. Login to the remote server]]===
On your client PC with the Ubuntu desktop live CD, click on: '''Applications => Accessories => Terminal''' to open a command line terminal.
+
===[[SUNScholar/Install DSpace/S02|Step 2. Get DSpace]]===
 +
===[[SUNScholar/Install DSpace/S03|Step 3. Unpack DSpace]]===
 +
===[[SUNScholar/Install DSpace/S04|Step 4. *** Edit the DSpace configuration ***]]===
 +
===[[SUNScholar/Install DSpace/S05|Step 5. Build the DSpace Java webapps]]===
 +
===[[SUNScholar/Install DSpace/S06|Step 6. Install the DSpace Java webapps]]===
 +
===[[SUNScholar/Install DSpace/S07|Step 7.  *** Create the DSpace super-admin user ***]]===
 +
===[[SUNScholar/Install DSpace/S08|Step 8. Enable the DSpace Java webapps on the Tomcat Java webapp server]]===
 +
===[[SUNScholar/Install DSpace/S09|Step 9. Perform system tests]]===
 +
===[[SUNScholar/Install DSpace/S10|Step 10. Login to the DSpace application as the "super-admin" user]]===
 +
===[[SUNScholar/Install DSpace/S11|Step 11. After installation tasks]]===
  
'''<font color="red">Login to your remote server as the "dspace" user by typing as follows in the terminal</font>'''
+
===[https://youtu.be/CyW6j5J3Rzg YouTube Video]===
  
ssh dspace@%hostname%
+
===References===
Replace %hostname% with the hostname of your server.
+
*https://wiki.duraspace.org/display/DSDOC6x/Installing+DSpace#InstallingDSpace-Installation
 
+
*https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace#InstallingDSpace-Installation
=Step 2. Get [http://wiki.dspace.org/index.php/Main_Page DSpace]=
+
*https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-Installation
Click on the link above and download the DSpace 1.6.2 tarball (.tgz file) to the dspace home folder.
+
*https://wiki.duraspace.org/display/DSDOC3x/Installation#Installation-Installation
 
+
<center>
=Step 3. Unpack DSpace=
+
'''<big>[[SUNScholar/Prepare_Ubuntu|PREVIOUS - PREPARE UBUNTU]]</big>'''
Type the following to untar the source code.
+
</center>
tar -xzvf /home/dspace/dspace-1.6.2-src-release.tar.gz
+
[[Category:Installation]]
 
+
__NOTOC__
=Step 4. *** Edit the DSpace configuration ***=
 
Type the following to edit the Dspace (dspace.cfg) config file:
 
 
 
nano /home/dspace/dspace-1.6.2-src-release/dspace/config/dspace.cfg
 
 
 
Replace all the places with a pair of percent signs (%something%) with the settings for your campus.
 
 
 
<pre>
 
dspace.dir = /home/dspace
 
dspace.url = http://%hostname%
 
dspace.hostname = %hostname%
 
dspace.name = DSpace for My University
 
db.name = postgres
 
db.url = jdbc:postgresql://localhost:5432/dspace
 
db.driver = org.postgresql.Driver
 
db.username = dspace
 
db.password = dspace
 
mail.server = %my_university_mail_server_address%
 
mail.from.address = %my_email_address%
 
feedback.recipient = %my_email_address%
 
mail.admin = %my_email_address%
 
alert.recipient = %my_email_address%
 
registration.notify = %my_email_address%
 
default.language = en_ZA
 
</pre>
 
 
 
=Step 5. Download the Maven2 packages from the Internet=
 
Type the following to enable a connection to internet: (This is for use on the campus of the University of Stellenbosch only.)
 
 
 
export http_proxy="http://lib-proxy.sun.ac.za:3128"
 
 
 
Now change to the source folder as follows:
 
 
 
cd /home/dspace/dspace-1.6.2-src-release
 
 
 
Type the following to download the maven2 packages. Ensure you have an open connection to the internet first.
 
 
 
mvn package
 
 
 
A lot of stuff will be downloaded and scroll on the screen.
 
 
 
If nothing downloads, then check your Maven 2 config file and your campus proxy environment variable. ''The Maven 2 config file and the campus proxy environment variable must point to the same server.''
 
 
 
If the downloads start, then go make a cup coffee and check your emails.. this takes quite a while with slow internet connections !!
 
 
 
When complete you will get a message like this:
 
<pre>
 
[INFO] Copying 861 files to /home/dspace/dspace-1.6.2-release/dspace/target/dspace-1.6.2-build.dir
 
[INFO]
 
[INFO]
 
[INFO] ------------------------------------------------------------------------
 
[INFO] Reactor Summary:
 
[INFO] ------------------------------------------------------------------------
 
[INFO] DSpace Addon Modules .................................. SUCCESS [30.453s]
 
[INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [1:14.611s]
 
[INFO] DSpace LNI :: Web Application ......................... SUCCESS [10.261s]
 
[INFO] DSpace OAI :: Web Application ......................... SUCCESS [6.427s]
 
[INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [8.017s]
 
[INFO] DSpace SWORD :: Web Application ....................... SUCCESS [5.869s]
 
[INFO] DSpace Assembly and Configuration ..................... SUCCESS [43.018s]
 
[INFO] ------------------------------------------------------------------------
 
[INFO] ------------------------------------------------------------------------
 
[INFO] BUILD SUCCESSFUL
 
[INFO] ------------------------------------------------------------------------
 
[INFO] Total time: 2 minutes 59 seconds
 
[INFO] Finished at: Sun Apr 12 07:40:07 BST 2009
 
[INFO] Final Memory: 25M/255M
 
[INFO] ------------------------------------------------------------------------
 
</pre>
 
 
 
=Step 6. Compile the DSpace Java webapp=
 
Change directory to the build directory by typing as follows:
 
 
 
cd /home/dspace/dspace-1.6.2-src-release/dspace/target/dspace-1.6.2-build.dir
 
 
 
Type the following in the above named directory:
 
 
 
ant fresh_install
 
 
 
A lot of information now appears on the screen. Below are shown the last lines confirming success:
 
<pre>
 
[echo] ====================================================================
 
[echo] The DSpace code has been installed, and the database initialized.
 
[echo]
 
[echo] To complete installation, you should do the following:
 
[echo]
 
[echo] * Setup your Web servlet container (e.g. Tomcat) to look for your
 
[echo] DSpace web applications in: /home/dspace/webapps/
 
[echo]
 
[echo] OR, copy any web applications from /home/dspace/webapps/ to
 
[echo] the appropriate place for your servlet container.
 
[echo] (e.g. '$CATALINA_HOME/webapps' for Tomcat)
 
[echo]
 
[echo] * Make an initial administrator account (an e-person) in DSpace:
 
[echo]
 
[echo] /home/dspace/bin/create-administrator
 
[echo]
 
[echo] * Start up your servlet container (Tomcat etc.)
 
[echo]
 
[echo] You should then be able to access your DSpace's 'home page':
 
[echo]
 
[echo] http://vleinternal.bromley.ac.uk/dspace
 
[echo]
 
[echo] You should also be able to access the administrator UI:
 
[echo]
 
[echo] http://vleinternal.bromley.ac.uk/dspace/dspace-admin
 
[echo] ====================================================================
 
[echo]
 
BUILD SUCCESSFUL
 
</pre>
 
 
 
'''Please note:''' If you change anything later then [[SUNScholar/Rebuild_Dspace|rebuild your Dspace]].
 
 
 
=Step 7. *** Create the DSpace admin user ***=
 
If you get a "build successful" message from the previous step, then add an admin user for your Dspace installation as follows:
 
/home/dspace/bin/create-administrator
 
Fill in all the details when prompted and keep the credentials a secret.
 
 
 
<pre>
 
Creating an initial administrator account
 
E-mail address: %emailaddress%
 
First name: Hilton
 
Last name: Gibson
 
WARNING: Password will appear on-screen.
 
Password: dspace
 
Again to confirm: dspace
 
Is the above data correct? (y or n): y
 
Administrator account created
 
</pre>
 
 
 
This is what should happen. Change the %emailaddress% to your email address.
 
 
 
'''<font color="red">*** Do not let any unauthorised persons have access to your Dspace admin account. ***</font>'''
 
 
 
=Step 8. Enable the DSpace java webapps on the java Tomcat webapp server=
 
The Dspace webapp has been compiled in the '''/home/dspace/webapps''' folder but Tomcat only serves up webapps in the '''/usr/share/tomcat6/webapps''' folder.
 
 
 
So, how do we get all the files into the Tomcat webapps folder ?
 
 
 
There are several methods, but we are going to set it up so that if you change anything in the Dspace '''/home/dspace/webapps''' folder and re-compile then the changes automatically occur in the Tomcat '''/usr/share/tomcat6/webapps''' folder.
 
 
 
To achieve this become the root user by typing as follows:
 
sudo -i
 
 
 
Now we create the shortcuts to the Dspace webapps in the default Tomcat6 webapps folder by typing as follows:
 
 
 
cd /usr/share/tomcat6/webapps
 
 
 
ln -s /home/dspace/webapps/xmlui
 
 
 
ln -s /home/dspace/webapps/jspui
 
 
 
ln -s /home/dspace/webapps/sword
 
 
 
ln -s /home/dspace/webapps/oai
 
 
 
ln -s /home/dspace/webapps/lni
 
 
 
=Step 9. *** Setup UNIX file permissions for DSpace folders ***=
 
''Note: Do not change any of the folders in '''/usr/share/tomcat6''' or '''/var/lib/tomcat6/webapps''' because during server software updates your customisation will be lost.''
 
 
 
We need to setup the correct UNIX file permissions on the DSpace sub directories. The user account which Tomcat 6 uses, should have full read and write access to the following directories:
 
 
 
* webapps
 
* handle server
 
* assetstore
 
* log
 
* search
 
* upload
 
* config
 
 
 
To do this we will give the user "tomcat6" full user write permission and the user "dspace" full group write permission to the above folders as follows:
 
==Become "root" user==
 
To achieve this become the root user by typing as follows:
 
sudo -i
 
==Setup "webapps" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/webapps
 
 
 
chmod g+w -R /home/dspace/webapps
 
 
 
==Setup "handle-server" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/handle-server
 
 
 
chmod g+w -R /home/dspace/handle-server
 
 
 
==Setup "assetstore" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/assetstore
 
 
 
chmod g+w -R /home/dspace/assetstore
 
 
 
==Setup "log" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/log
 
 
 
chmod g+w -R /home/dspace/log
 
 
 
==Setup "upload" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/upload
 
 
 
chmod g+w -R /home/dspace/upload
 
 
 
==Setup "config" ownership and file permissions==
 
Type the following;
 
 
 
chown tomcat6.dspace -R /home/dspace/config
 
 
 
chmod g+w -R /home/dspace/config
 
 
 
==Setup "exports" ownership and file permissions==
 
Type the following;
 
 
 
mkdir /home/dspace/exports
 
 
 
chown tomcat6.dspace -R /home/dspace/exports
 
 
 
chmod g+w -R /home/dspace/exports
 
 
 
==Check folder properties==
 
Type the following to check the links are correct:
 
ls -l /usr/share/tomcat6/webapps/
 
You should get the following output:
 
<pre>
 
root@server:/usr/share/tomcat6/webapps# ls -l
 
total 24
 
lrwxrwxrwx 1 root root 27 2009-11-22 13:13 jspui -> /home/dspace/webapps/jspui/
 
lrwxrwxrwx 1 root root 25 2009-11-22 13:13 lni -> /home/dspace/webapps/lni/
 
lrwxrwxrwx 1 root root 25 2009-11-22 13:13 oai -> /home/dspace/webapps/oai/
 
lrwxrwxrwx 1 root root 27 2009-11-22 13:13 sword -> /home/dspace/webapps/sword/
 
lrwxrwxrwx 1 root root 27 2009-11-22 13:13 xmlui -> /home/dspace/webapps/xmlui/
 
</pre>
 
Now go to the "/home/dspace" folder:
 
cd /home/dspace
 
Type the following to check file and folder permissions:
 
ls -l
 
You should get the following output:
 
<pre>
 
root@server:/home/dspace# ls -l
 
total 4592
 
drwxrwxr-x 5 tomcat6 dspace    4096 2009-11-19 09:03 assetstore
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-22 11:33 bin
 
drwxrwxr-x 6 tomcat6 dspace    4096 2009-11-22 11:33 config
 
drwxr-xr-x 9 dspace  dspace    4096 2009-04-14 10:23 dspace-1.6.2-src-release
 
-rw-r--r-- 1 dspace  dspace 4626034 2009-08-18 16:27 dspace-1.6.2-src-release.tar.gz
 
drwxr-xr-x 3 dspace  dspace    4096 2009-11-22 11:33 etc
 
drwxrwxr-x 2 tomcat6 dspace    4096 2009-10-22 13:22 exports
 
drwxrwxr-x 2 tomcat6 dspace    4096 2009-10-22 13:17 handle-server
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-22 11:33 lib
 
drwxrwxr-x 2 tomcat6 dspace    4096 2009-11-22 01:10 log
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-22 02:10 reports
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-06 19:43 scripts
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-22 03:00 search
 
drwxr-xr-x 2 dspace  dspace    4096 2009-11-12 06:00 sitemaps
 
drwxrwxr-x 2 tomcat6 dspace    4096 2009-11-19 09:03 upload
 
drwxrwxr-x 8 tomcat6 dspace    4096 2009-11-22 11:58 webapps
 
</pre>
 
Check that the "tomcat6" user owns the correct folders.
 
 
 
=[[SUNScholar/Default_Interface|Step 10. Setup the "jspui" or "xmlui" interface as the default interface.]]=
 
Click on the heading above.
 
 
 
=Step 11. Login to the DSpace application as the "admin" user=
 
 
 
Type the following in your browser address bar:
 
 
 
http://%hostname-of-your-new-repository%
 
 
 
Click on "Edit Profile" and login with the DSpace admin email address and password.
 
 
 
=Conclusion=
 
Well done with the Dspace installation !!
 
 
 
Now you can pat yourself on the back for a job well done. Download and consult the Dspace 1.6.2 manual for further configuration.
 

Latest revision as of 14:17, 30 October 2019