DSpace/C2/DSpace-Installation-on-Ubuntu-Linux-OS/English

From Script | Spoken-Tutorial
Revision as of 14:52, 29 May 2020 by Pankajpatil694 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Script: Dspace installation on Ubuntu Linux OS


Author : Pankaj Patil


Keywords: DSpace installation, DSpace build, DSpace deployment, DSpace administrator account, local.cfg configuration


Visual Cue Narration
Slide : Title Welcome to this spoken tutorial on installation of DSpace on Ubuntu Linux OS.
Slide: Learning Objectives Slide In this tutorial, we will learn to *
Install DSpace on Ubuntu Linux OS
  • Crossverify DSpace installation and
  • Create a DSpace administrator account


Slide: System requirements This tutorial is recorded using*
Ubuntu Linux OS 18.04
  • gedit text editor and
  • Firefox web browser



However you may use any other editor or browser of your choice.

Slide: Pre-requisites To practice this tutorial, you should have *
installed Java, Tomcat 8, Postgresql 10, Ant, Maven, and git.
  • configured Tomcat 8 server and
  • created a dspace database in Postgresql 10.


Slide: Pre-requisites You will also need minimum 5 unique email ids for practising various roles in DSpace.


If you don’t have, then please create them before proceeding ahead.

Slide: Pre-requisites Pre-requisites:*
You should have familiarity with basic Linux commands.
  • If not then please go through the prerequisite Linux tutorials on this website.


Slide : Code files *
The commands used in this tutorial are available in the Code Files link on this tutorial page.


  • Please download and extract the file before practicing.


Switch to gedit text editor and open the file I have opened the code file in gedit text editor on my machine.


And I will use the same file to copy-paste the commands during the demonstration.


Shortcut to paste on the terminal is Shift, Ctrl and V keys.

Narration only Let us begin.
Press Ctrl+Alt+T keys Open the terminal by pressing Ctrl ,Alt and T keys simultaneously on the keyboard.


Ensure that you have root permissions to run the commands.

Only Narration Here onwards please remember to press the Enter key after typing each command.
[Terminal] Type:


sudo su - dspace

Now, we will login as user dspace.


Type sudo su - dspace


If prompted, then type the admin password to login.

[Terminal] Type:

cd $HOME

Make sure that your present working directory in the terminal is DSpace’s Home directory.


If not, type cd $HOME to switch to the Home directory.

[Terminal] Type:


wget https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.tar.gz

To download DSpace 6.3 source code, type the command as shown here.
[Terminal] Type:


tar -xzvf $HOME/dspace-6.3-src-release.tar.gz

Now let us extract the DSpace tar file which we downloaded.


To do so, type the command as shown here.

[Terminal] Type:


ls dspace-6.3-src-release/dspace/config/

To see the contents of the DSpace configure folder.


Type this command.

Point to local.cfg.EXAMPLE in folder view


HOME Directory >> dspace-6.3-src-release >> dspace >> config>>local.cfg.EXAMPLE

DSpace source code has local.cfg.EXAMPLE, which is a sample DSpace configuration.



DSpace checks for the configuration in the local.cfg file.

Slide : local.cfg file local.cfg file can be created in two ways.#
Renaming local.cfg.EXAMPLE as local.cfg
  1. Copy local.cfg.EXAMPLE as local.cfg



Switch to the terminal.

[Terminal] Type:

cp $HOME/dspace-6.3-src-release/dspace/config/local.cfg.EXAMPLE $HOME/dspace-6.3-src-release/dspace/config/local.cfg

We’ll create a copy of local.cfg.EXAMPLE file as local.cfg for DSpace configuration.


To do so, type the command as shown.


[Terminal] Type:

sudo gedit /home/dspace/dspace-6.3-src-release/dspace/config/local.cfg

Open the local.cfg file by typing the following command.


If prompted, type the dspace user password.


You may open this file in any text editor of your choice.


Configuration file opens in the text editor.

SERVER CONFIGURATION Locate the SERVER CONFIGURATION section.

dspace.dir=/home/dspace/dspace-install


Here, I have set the values for some parameters.


Kindly update in your configuration file also.


Webapps created during dspace installation will be stored in dspace.dir path.


Value for dspace.dir is /home/dspace/dspace-install

dspace.ui = xmlui



dspace.ui =


Default value of dspace.ui is xmlui.


We will remove that value and leave it as blank.


dspace.ui is left blank, to enable email-based user verification.

Highlight


dspace.hostname = localhost


dspace.baseUrl = http://localhost:8080


solr.server = http://localhost:8080/solr

Suppose if we are working on a remote machine.


Then set the machine ip as a value for dspace.hostname, dspace.baseUrl and solr.server.

Point to DATABASE CONFIGURATION


db.username = dspace

db.password = dbuserpass

Locate DATABASE CONFIGURATION section.



Enter the value for db.username as dspace and db.password as dbuserpass.

Press Ctrl + S >> Close File Save and close the file.
[Terminal] Type:

sudo chown dspace.dspace -R $HOME


Now, let us provide ownership of the Home directory to the dspace user.


To do so, type the command as shown here.


Type the root user password if prompted.

[Terminal] Type:

sudo chmod 0777 -R $HOME

Next, let us provide the read, write and execute permissions to the Home directory of dspace user.


To do so, type the command as shown here.

[Terminal] Type:

cd dspace-6.3-src-release

Using cd command go to the directory dspace-6.3-src-release in the Home folder.
[Terminal] Type:


mvn -U clean package


Maven package is used to download external java libraries and build the source code.


To build DSpace, type the command as shown here.


The download may take some time depending on your internet speed.

[Terminal] Highlight:

BUILD SUCCESSFUL message

Once the download is complete, BUILD SUCCESSFUL message will be displayed on the terminal.
Slide: Troubleshoot for build failure


In case you get BUILD FAILED message, do the following-


  • Verify all steps executed earlier by referring to the prerequisite tutorial.
  • Also check the version of all the packages installed.


[Terminal] Type:

cd dspace/target/dspace-installer

Now, using the cd command, go to the directory dspace-installer.
[Terminal] Type:


ant fresh_install

Apache Ant is a tool used to build DSpace binaries.


To install DSpace using ant, type the command as shown.

[Terminal] Highlight:

BUILD SUCCESSFUL message

Once the installation is complete, BUILD SUCCESSFUL message will be displayed on the terminal.
[Terminal] Type:


sudo $HOME/dspace-install/bin/dspace create-administrator

Next, we will create a DSpace administrator account and set the credentials.


To do so, type the command as shown here.


If prompted, type the admin user password.

Email: dspace.u1@gmail.com


First name : User1

Type the values for email address and First name as shown.


These are mandatory fields.

Last name : I’m skipping the Last name field.
Password : u1pass Now set the password for the dspace admin account.


I will type u1pass and press Enter.

Retype the admin password

Password: u1pass

Type the password once again and press Enter.
Type Y to confirm entered details. The prompt will ask you to type Y to confirm the newly added details.


Type Y and press Enter.

Only narration Administrator’s credentials are used to login to DSpace portal with Administrator authority.
Narration only Now, let us proceed to deploy dspace webapps on tomcat.
[Terminal] Type:

cd /var/lib/tomcat8/webapps/

Type the command as shown to navigate to tomcat webapps.
[Terminal] Type: ls Type ls to see the folder contents.
Point to ROOT directory ROOT is the default webapp created during tomcat installation.

Tomcat server redirects client requests to default ROOT webapp.

[Terminal] Type:


sudo rm -rf ROOT

For DSpace, we need to set up JSPUI as a ROOT web app.


Therefore, we will delete the default ROOT webapp on tomcat server.


To do so, type the command as shown.


If prompted, enter the root user password.

Narration only Now, we will deploy DSpace webapps on tomcat.


DSpace offers JSP and XML based user interfaces.

[Terminal] Type:


sudo ln -s /home/dspace/dspace-install/webapps/jspui ROOT

We will deploy DSpace with JSPUI interface as a default.


To do so, type the command as shown.

sudo ln -s /home/dspace/dspace-install/webapps/rest Next we’ll deploy rest webapp, by typing the command as shown.
sudo ln -s /home/dspace/dspace-install/webapps/solr Now, we will deploy solr webapp, by typing this command.


sudo ln -s /home/dspace/dspace-install/webapps/oai And then to deploy oai webapp, type the command as shown.


sudo ln -s /home/dspace/dspace-install/webapps/sword Lastly, we’ll deploy sword webapp, by typing this command.


[Terminal] Type:


sudo service tomcat8 restart

Restart tomcat server by typing the following command.


If tomcat is not restarted, then deployed applications will not be effective to handle client requests.

[Terminal] Type:


sudo reboot

Finally, restart the system before accessing DSpace.


To do so, type sudo reboot in the terminal.


Our system will get restarted.

Narration only We have now successfully installed DSpace.


Next, proceed to access DSpace through the browser.

Browser >>

http://localhost:8080

Open a web browser.


Type http://localhost:8080 in the address bar.


If you have set any ip address in the configuration, then type that ip instead of localhost.


Then press Enter.


DSpace home page appears on the browser.

Narration only Now, we will login to DSpace with our administrator account.
Click Sign on to tab > My DSpace Click on Sign on to tab at the top right corner.


Select My DSpace from the drop-down.


Log In to DSpace form opens.

Enter Email Address and Password


Email: dspace.u1@gmail.com

Password: u1pass

Type in the email address and password of the administrator.
Click on Log In button Then click on the Log In button below the password field.
Point to My DSpace section The administrator login is successful and My DSpace page appears.
Narration only This brings us to the end of this tutorial.


Let us summarize.

Slide : Summary


In this tutorial we learnt to-*
Install DSpace on Ubuntu Linux OS
  • Crossverify the DSpace installation and
  • Create a DSpace administrator account


Slide : About Spoken Tutorial project The video at the following link summarises the Spoken Tutorial project.


Please download and watch it.

Slide : Spoken Tutorial workshops


The Spoken Tutorial Project team conducts workshops and gives certificates.


For more details, please write to us.

Slide: Answers for THIS Spoken Tutorial Please post your timed queries in this Forum.
Slide: Acknowledgement -I Spoken Tutorial project is funded by MHRD, Government of India.
Slide: Acknowledgement -II


DSpace spoken tutorial series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.
Narration only


This script and video for this tutorial was contributed by Pankaj Patil from IIT Bombay.


And this is Nancy Varkey signing off. Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Pankajpatil694