Difference between revisions of "DSpace/C2/Getting-ready-for-DSpace-Installation-on-Ubuntu-Linux-OS/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "<div style="margin-left:0cm;margin-right:0cm;">'''Script: Getting ready for DSpace Installation'''</div> <div style="margin-left:0cm;margin-right:0cm;">'''Author : Pankaj Pa...")
 
Line 1: Line 1:
<div style="margin-left:0cm;margin-right:0cm;">'''Script: Getting ready for DSpace Installation'''</div>
+
<div style="margin-left:0cm;margin-right:0cm;">'''Script: Getting ready for DSpace Installation'''  
  
  
<div style="margin-left:0cm;margin-right:0cm;">'''Author : Pankaj Patil'''</div>
+
<div style="margin-left:0cm;margin-right:0cm;">'''Author : Pankaj Patil'''  
  
  
<div style="margin-left:0cm;margin-right:0cm;">'''Keywords : DSpace Installation, Tomcat Installation, postgresql installation, Configure tomcat server, Create DSpace database'''</div>
+
<div style="margin-left:0cm;margin-right:0cm;">'''Keywords : DSpace Installation, Tomcat Installation, postgresql installation, Configure tomcat server, Create DSpace database'''  
  
  
  
{| style="border-spacing:0;width:17.251cm;"
+
{| border =1
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|'''Visual Cue'''
| align=center| '''Visual Cue'''
+
|'''Narration'''
| align=center| '''Narration'''
+
|-
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : Title  
 
|| Slide : Title  
 
|| Welcome to this spoken tutorial on '''Getting ready for DSpace Installation.'''
 
|| Welcome to this spoken tutorial on '''Getting ready for DSpace Installation.'''
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide : Learning Objectives Slide
 
|| Slide : Learning Objectives Slide
|| In this tutorial we will learn to * <div style="margin-left:1.27cm;margin-right:0cm;">Install '''Java, Tomcat 8, Postgresql 10, Ant, Maven '''and '''git'''</div>
+
|| In this tutorial we will learn to  
* <div style="margin-left:1.27cm;margin-right:0cm;">Configure '''Tomcat 8 server '''and</div>
+
* Install '''Java, Tomcat 8, Postgresql 10, Ant, Maven '''and '''git'''  
* <div style="margin-left:1.27cm;margin-right:0cm;">Create '''dspace database''' in '''Postgresql 10'''</div>
+
* Configure '''Tomcat 8 server '''and  
 +
* Create '''dspace database''' in '''Postgresql 10'''  
  
 
+
|-  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : System requirements
 
|| Slide : System requirements
|| This tutorial is recorded using* <div style="margin-left:1.27cm;margin-right:0cm;">'''Ubuntu Linux OS''' '''18.04 '''and</div>
+
|| This tutorial is recorded using
* <div style="margin-left:1.27cm;margin-right:0cm;">'''gedit''' '''text editor'''</div>
+
* '''Ubuntu Linux OS''' 18.04 and  
 
+
* '''gedit text editor'''  
 
+
 
+
 
+
  
 
However you may use any other '''text editor''' of your choice.
 
However you may use any other '''text editor''' of your choice.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide : Pre-requisites  
 
|| Slide : Pre-requisites  
|| To practice this tutorial,* <div style="margin-left:1.27cm;margin-right:0cm;">You need an '''internet connection''' to install the necessary '''packages''' and</div>
+
|| To practice this tutorial,
* <div style="margin-left:1.27cm;margin-right:0cm;">You should be familiar with basic '''Linux commands.'''</div>
+
* You need an '''internet connection''' to install the necessary '''packages''' and  
 +
* You should be familiar with basic '''Linux commands.'''  
  
 
+
|-  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : Pre-requisites
 
|| Slide : Pre-requisites
 
|| If not then please go through the prerequisite '''Linux''' tutorials on this website.
 
|| If not then please go through the prerequisite '''Linux''' tutorials on this website.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide : Hardware requirements
 
|| Slide : Hardware requirements
|| The minimum hardware requirements for '''DSpace''' installation is* <div style="margin-left:1.27cm;margin-right:0cm;">'''i3 processor '''or above</div>
+
|| The minimum hardware requirements for '''DSpace''' installation is
* <div style="margin-left:1.27cm;margin-right:0cm;">'''100GB hard disk''' or more</div>
+
* '''i3 processor '''or above  
* <div style="margin-left:1.27cm;margin-right:0cm;">'''4GB RAM''' or above and</div>
+
* '''100GB hard disk''' or more  
* <div style="margin-left:1.27cm;margin-right:0cm;">A '''network '''facility</div>
+
* '''4GB RAM''' or above and  
 +
* A '''network '''facility  
  
 
+
|-  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : Code files
 
|| Slide : Code files
 
|| The '''commands''' used in this tutorial are available in the '''Code Files '''link on this tutorial page.
 
|| The '''commands''' used in this tutorial are available in the '''Code Files '''link on this tutorial page.
Line 56: Line 52:
  
 
Please download and extract the file before practicing.
 
Please download and extract the file before practicing.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Switch to '''gedit''' text editor and open the file
 
|| Switch to '''gedit''' text editor and open the file
 
|| I have opened the '''code file''' in the '''gedit text editor '''on my machine.
 
|| I have opened the '''code file''' in the '''gedit text editor '''on my machine.
Line 64: Line 60:
  
  
Shortcut to paste on the '''terminal''' is '''Shift, Ctrl '''and '''V '''keys'''.'''
+
Shortcut to paste on the '''terminal''' is '''Shift, Ctrl '''and '''V '''keys.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
 
|| Let us begin.
 
|| Let us begin.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Press '''Ctrl+Alt+T '''keys
 
|| Press '''Ctrl+Alt+T '''keys
 
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.
 
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.
Line 74: Line 70:
  
 
Ensure that you have '''root''' permissions to run the '''commands'''.
 
Ensure that you have '''root''' permissions to run the '''commands'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
 
 
 
'''sudo adduser dspace '''
 
'''sudo adduser dspace '''
 
 
 
 
|| First let us create a new '''user account '''and name it as '''dspace'''.
 
|| First let us create a new '''user account '''and name it as '''dspace'''.
  
  
 
To do so, type the '''command sudo adduser dspace '''and press '''Enter.'''
 
To do so, type the '''command sudo adduser dspace '''and press '''Enter.'''
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 97: Line 88:
  
 
The process of creating a new '''user''' has begun.
 
The process of creating a new '''user''' has begun.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only Narration
 
|| Only Narration
 
|| Here onwards please remember to press the '''Enter''' key after typing each '''command'''.
 
|| Here onwards please remember to press the '''Enter''' key after typing each '''command'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Enter new '''UNIX''' password
 
|| Enter new '''UNIX''' password
 
 
 
  
  
Line 119: Line 107:
  
 
You can give any '''password''' of your choice.
 
You can give any '''password''' of your choice.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Retype '''password''' as '''dupass'''
 
|| Retype '''password''' as '''dupass'''
 
|| Type the same '''password''' in '''Retype new UNIX password'''.
 
|| Type the same '''password''' in '''Retype new UNIX password'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Full Name: '''DSpace'''
 
|| Full Name: '''DSpace'''
 
  
  
 
|| Fill the rest of the details as shown here.
 
|| Fill the rest of the details as shown here.
 
  
 
We have now successfully created the '''user dspace.'''
 
We have now successfully created the '''user dspace.'''
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 143: Line 129:
  
 
In the '''terminal''', type '''sudo adduser dspace sudo'''  
 
In the '''terminal''', type '''sudo adduser dspace sudo'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 155: Line 141:
  
 
If prompted, type the '''password '''of''' user dspace '''to '''login'''.
 
If prompted, type the '''password '''of''' user dspace '''to '''login'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo apt-get update'''
 
'''sudo apt-get update'''
|| <div style="color:#252525;">Before proceeding further, let us update our system.</div>
+
|| Before proceeding further, let us update our system.  
  
  
<span style="color:#252525;">To do this, type </span>'''sudo apt-get update'''
+
To do this, type '''sudo apt-get update'''
  
  
<span style="color:#252525;">I</span>f prompted, type the '''password '''of''' user dspace'''<span style="color:#252525;"> to proceed further.</span>
+
If prompted, type the '''password '''of''' user dspace''' to proceed further.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
|| <span style="color:#252525;">The </span><span style="color:#252525;">'''updating'''</span><span style="color:#252525;"> process may take some time depending upon your </span><span style="color:#252525;">'''internet'''</span><span style="color:#252525;"> speed.</span>
+
|| The '''updating''' process may take some time depending upon your '''internet''' speed.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
<div style="color:#252525;">'''sudo dpkg --configure -a'''</div>
+
'''sudo dpkg --configure -a'''  
|| <span style="color:#252525;">To avoid </span><span style="color:#252525;">'''dpkg'''</span><span style="color:#252525;"> </span><span style="color:#252525;">'''interruption'''</span><span style="color:#252525;"> errors during installation, type the following </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;">:</span>
+
|| To avoid '''dpkg interruption''' errors during installation, type the following '''command'''
  
<div style="color:#252525;">'''sudo dpkg --configure -a'''</div>
+
'''sudo dpkg --configure -a'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo apt-get install openjdk-8-jdk -y'''
 
'''sudo apt-get install openjdk-8-jdk -y'''
|| <span style="color:#252525;">Next, let us install </span><span style="color:#252525;">'''Java Development Kit'''</span><span style="color:#252525;">.</span>
+
||Next, let us install '''Java Development Kit'''.
  
  
<span style="color:#252525;">To do so, type the following </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> </span>in the '''terminal'''.
+
To do so, type the following '''command''' in the '''terminal'''.
  
  
 
The installation may take some time depending upon your internet speed.
 
The installation may take some time depending upon your internet speed.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
|| <span style="color:#252525;">We have now successfully installed </span><span style="color:#252525;">'''JDK.'''</span>
+
|| We have now successfully installed '''JDK.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
 +
'''java -version'''
 +
|| Next, we will verify the installed '''JDK''' version.
  
<div style="color:#252525;">'''java -version'''</div>
+
To do so, type '''java -version'''  
|| <span style="color:#252525;">Next, we will verify the installed </span><span style="color:#252525;">'''JDK'''</span><span style="color:#252525;"> version. </span>
+
|-
 +
|| Highlight '''openjdk version “1.8.0_242”'''
 +
|| In the '''terminal''' , we can see '''openjdk version “1.8.0_242”'''
  
  
<span style="color:#252525;">To do so, type </span><span style="color:#252525;">'''java -version'''</span>
+
'''0_242 ''' in the '''openjdk version ''' is the release number, which may be different in your case.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
|| Highlight <span style="color:#252525;">'''openjdk version “1.8.0_242”'''</span>
+
|| <span style="color:#252525;">In the </span><span style="color:#252525;">'''terminal'''</span><span style="color:#252525;">, we can see </span><span style="color:#252525;">'''openjdk version “1.8.0_242”'''</span>
+
 
+
 
+
<span style="color:#252525;">'''0_242 '''</span><span style="color:#252525;">in the </span><span style="color:#252525;">'''openjdk version '''</span><span style="color:#252525;">is the release number, which may be different in your case.</span>
+
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : '''JDK''' version  
 
|| Slide : '''JDK''' version  
  
  
 +
'''sudo apt-get remove openjdk-11-jre-headless'''
 +
||
 +
* If the '''JDK''' version other than 8 is installed, then remove it.
 +
* For example, if '''JDK''' version 11 is installed then type the '''command''' as shown.
  
 
+
Switch to the '''terminal.'''  
<div style="color:#252525;">'''sudo apt-get remove openjdk-11-jre-headless'''</div>
+
|-  
 
+
 
+
 
+
|| * <div style="margin-left:1.27cm;margin-right:0cm;"><span style="color:#252525;">If the </span><span style="color:#252525;">'''JDK'''</span><span style="color:#252525;"> version other than 8 is installed, then remove it.</span></div>
+
* <div style="margin-left:1.27cm;margin-right:0cm;"><span style="color:#252525;">For example, if </span><span style="color:#252525;">'''JDK'''</span><span style="color:#252525;"> version 11 is installed then type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown.</span></div>
+
 
+
 
+
 
+
<div style="color:#252525;"></div>
+
 
+
<span style="color:#252525;">Switch to the </span><span style="color:#252525;">'''terminal.'''</span>
+
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
<div style="color:#252525;">'''sudo apt-get install git -y'''</div>
+
'''sudo apt-get install git -y'''  
|| <span style="color:#252525;">'''DSpace resource packages'''</span><span style="color:#252525;"> have to be pulled from the </span><span style="color:#252525;">'''git repository'''</span><span style="color:#252525;"> using the </span><span style="color:#252525;">'''git '''</span><span style="color:#252525;">tool.</span>
+
|| '''DSpace resource packages''' have to be pulled from the '''git repository''' using the '''git ''' tool.  
  
  
<span style="color:#252525;">So let us install the </span><span style="color:#252525;">'''git'''</span><span style="color:#252525;"> tool. </span>
+
So let us install the '''git''' tool.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here.</span>
+
To do so, type the '''command''' as shown here.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
<div style="color:#252525;">'''sudo apt-get install maven -y'''</div>
+
'''sudo apt-get install maven -y'''  
|| <span style="color:#252525;">Now, let us install an </span><span style="color:#252525;">'''Apache Maven, '''</span><span style="color:#252525;">which is used to</span><span style="color:#252525;">''' build DSpace source code. '''</span>
+
|| Now, let us install an '''Apache Maven, ''' which is used to ''' build DSpace source code. '''  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here.</span>
+
To do so, type the '''command''' as shown here.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
<div style="color:#252525;">'''sudo apt-get install ant ant-optional -y'''</div>
+
'''sudo apt-get install ant ant-optional -y'''  
|| <span style="color:#252525;">Next, we will install an </span><span style="color:#252525;">'''Apache Ant '''</span><span style="color:#252525;">tool,</span><span style="color:#252525;">''' '''</span><span style="color:#252525;">which</span><span style="color:#252525;">''' '''</span><span style="color:#252525;">is used to install </span><span style="color:#252525;">'''DSpace'''</span><span style="color:#252525;">. </span>
+
|| Next, we will install an '''Apache Ant ''' tool, which is used to install '''DSpace'''.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown.</span>
+
To do so, type the '''command''' as shown.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo apt-get install tomcat8 -y'''
 
'''sudo apt-get install tomcat8 -y'''
|| <span style="color:#252525;">Next, let us install </span><span style="color:#252525;">'''Tomcat 8. '''</span>
+
|| Next, let us install '''Tomcat 8. '''  
  
  
To install '''Tomcat''', type <span style="color:#252525;">the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here.</span>
+
To install '''Tomcat''', type the '''command''' as shown here.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo gedit /etc/tomcat8/policy.d/05dspace.policy'''
 
'''sudo gedit /etc/tomcat8/policy.d/05dspace.policy'''
|| <span style="color:#252525;">Next we have to create a </span><span style="color:#252525;">'''DSpace security policy. '''</span>
+
|| Next we have to create a '''DSpace security policy. '''  
  
  
<span style="color:#252525;">This will provide all </span><span style="color:#252525;">'''Java security permissions'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''DSpace'''</span><span style="color:#252525;">.</span><span style="color:#252525;">''' '''</span>
+
This will provide all '''Java security permissions''' to '''DSpace'''.  
  
  
Line 275: Line 251:
  
 
You can do this in your '''editor, '''as well.
 
You can do this in your '''editor, '''as well.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 290: Line 266:
  
 
'''};'''
 
'''};'''
|| <span style="color:#252525;">A new file opens in the</span><span style="color:#252525;">''' text editor'''</span><span style="color:#252525;">.</span>
+
|| A new file opens in the ''' text editor'''.  
  
  
<span style="color:#252525;">Type </span><span style="color:#252525;">'''DSpace security policy '''</span><span style="color:#252525;">as shown here.</span>
+
Type '''DSpace security policy ''' as shown here.  
  
  
<span style="color:#252525;">You can copy-paste this piece of </span><span style="color:#252525;">'''code'''</span><span style="color:#252525;"> from the </span><span style="color:#252525;">'''Code File'''</span><span style="color:#252525;">, as demonstrated here.</span>
+
You can copy-paste this piece of '''code''' from the '''Code File''', as demonstrated here.  
 
+
 
+
|-  
<div style="color:#252525;"></div>
+
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Press '''Ctrl+S''' >> close the file
 
|| Press '''Ctrl+S''' >> close the file
 
|| Now save and close the file.
 
|| Now save and close the file.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal]
 
|| [Terminal]
 
|| We’re back on the '''terminal'''.
 
|| We’re back on the '''terminal'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo chown root.tomcat8 /etc/tomcat8/policy.d/05dspace.policy'''
 
'''sudo chown root.tomcat8 /etc/tomcat8/policy.d/05dspace.policy'''
|| <span style="color:#252525;">To provide </span><span style="color:#252525;">'''ownership'''</span><span style="color:#252525;"> of </span><span style="color:#252525;">'''DSpace security policy'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''Tomcat, '''</span>type the '''command''' as shown.
+
|| To provide '''ownership''' of '''DSpace security policy''' to '''Tomcat, ''' type the '''command''' as shown.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
 
 
  
  
 
'''sudo adduser tomcat8 dspace'''
 
'''sudo adduser tomcat8 dspace'''
|| <span style="color:#252525;">To permit </span><span style="color:#252525;">'''access'''</span><span style="color:#252525;"> of </span><span style="color:#252525;">'''DSpace '''</span><span style="color:#252525;">to</span><span style="color:#252525;">''' Tomcat 8'''</span><span style="color:#252525;">, we have to add the </span><span style="color:#252525;">'''Tomcat8 user'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''DSpace user group'''</span><span style="color:#252525;">.</span>
+
|| To permit '''access''' of '''DSpace ''' to ''' Tomcat 8''' , we have to add the '''Tomcat8 user''' to '''DSpace user group'''.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here</span>'''.'''
+
To do so, type the '''command''' as shown here.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
 
 
  
  
 
'''sudo adduser dspace tomcat8'''
 
'''sudo adduser dspace tomcat8'''
|| <span style="color:#252525;">To permit </span><span style="color:#252525;">'''access'''</span><span style="color:#252525;"> of </span><span style="color:#252525;">'''Tomcat 8'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''DSpace'''</span><span style="color:#252525;">, we have to add the </span><span style="color:#252525;">'''DSpace user'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''Tomcat8 group'''</span><span style="color:#252525;">.</span>
+
|| To permit '''access''' of '''Tomcat 8''' to '''DSpace''' , we have to add the '''DSpace user''' to '''Tomcat8 group'''.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here</span>'''.'''
+
To do so, type the '''command''' as shown here.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo service tomcat8 restart'''
 
'''sudo service tomcat8 restart'''
|| <span style="color:#252525;">Now, restart </span><span style="color:#252525;">'''tomcat server'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''update'''</span><span style="color:#252525;"> the changes.</span>
+
|| Now, restart '''tomcat server''' to '''update''' the changes.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here</span>'''.'''
+
To do so, type the '''command''' as shown here.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
 
'''sudo apt-get install postgresql-10 postgresql-contrib postgresql-contrib-10 libpg-java -y'''
 
'''sudo apt-get install postgresql-10 postgresql-contrib postgresql-contrib-10 libpg-java -y'''
|| <span style="color:#252525;">Next, we’ll install </span><span style="color:#252525;">'''Postgresql, '''</span><span style="color:#252525;">which is used as a </span><span style="color:#252525;">'''database'''</span><span style="color:#252525;"> for </span><span style="color:#252525;">'''DSpace.'''</span>
+
|| Next, we’ll install '''Postgresql, ''' which is used as a '''database''' for '''DSpace.'''  
  
  
<span style="color:#252525;">Type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown in the </span><span style="color:#252525;">'''terminal'''</span><span style="color:#252525;"> to install </span><span style="color:#252525;">'''postgresql.'''</span>
+
Type the '''command''' as shown in the '''terminal''' to install '''postgresql.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Change database permissions to trust
 
|| Change database permissions to trust
 
|| Next, we have to restrict the '''database''' to be accessed by '''trust method''' only.
 
|| Next, we have to restrict the '''database''' to be accessed by '''trust method''' only.
Line 357: Line 327:
  
 
To do that, we have to change '''peer, md5''' and '''ident''' to '''trust.'''
 
To do that, we have to change '''peer, md5''' and '''ident''' to '''trust.'''
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 363: Line 333:
 
'''sudo sed -i 's/peer/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
'''sudo sed -i 's/peer/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
|| To change '''database permissions''' from '''peer''' to '''trust''', type the '''command''' as shown.  
 
|| To change '''database permissions''' from '''peer''' to '''trust''', type the '''command''' as shown.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 369: Line 339:
 
'''sudo sed -i 's/md5/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
'''sudo sed -i 's/md5/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
|| To change '''database permissions''' from '''md5''' to '''trust''', type the '''command''' as shown here.  
 
|| To change '''database permissions''' from '''md5''' to '''trust''', type the '''command''' as shown here.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 375: Line 345:
 
'''sudo sed -i 's/ident/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
'''sudo sed -i 's/ident/trust/' /etc/postgresql/10/main/pg_hba.conf'''
 
|| To change '''database permissions''' from '''ident''' to '''trust''', type the '''command''' as shown.  
 
|| To change '''database permissions''' from '''ident''' to '''trust''', type the '''command''' as shown.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''sudo service postgresql restart '''
 
'''sudo service postgresql restart '''
|| <span style="color:#252525;">We have to restart </span><span style="color:#252525;">'''postgresql '''</span><span style="color:#252525;">to </span><span style="color:#252525;">'''update'''</span><span style="color:#252525;"> the changes we just made.</span>
+
|| We have to restart '''postgresql ''' to '''update''' the changes we just made.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here</span>'''.'''
+
To do so, type the '''command''' as shown here.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
|| <span style="color:#252525;">Now, we will create a </span><span style="color:#252525;">'''dspace user'''</span><span style="color:#252525;"> in </span><span style="color:#252525;">'''postgresql database.'''</span>
+
|| Now, we will create a '''dspace user''' in '''postgresql database.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
 
'''createuser -U postgres -d -A -P dspace'''
 
'''createuser -U postgres -d -A -P dspace'''
|| <span style="color:#252525;">Type this </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown in the </span><span style="color:#252525;">'''terminal'''</span><span style="color:#252525;">.</span>
+
|| Type this '''command''' as shown in the '''terminal'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
||  
 
||  
 +
Type the '''password''' as '''dbuserpass'''
 +
|| Set a '''password''' for the '''user dspace''' for the '''database.'''
  
  
 
+
I will set the '''password''' as '''dbuserpass.'''  
Type the '''password''' as
+
 
+
<div style="color:#252525;">'''dbuserpass'''</div>
+
|| <span style="color:#252525;">Set a </span><span style="color:#252525;">'''password'''</span><span style="color:#252525;"> for the </span><span style="color:#252525;">'''user dspace'''</span><span style="color:#252525;"> for the </span><span style="color:#252525;">'''database.'''</span>
+
 
+
 
+
<span style="color:#252525;">I will set the </span><span style="color:#252525;">'''password'''</span><span style="color:#252525;"> as </span><span style="color:#252525;">'''dbuserpass.'''</span>
+
  
  
 
You can give any '''password''' of your choice.
 
You can give any '''password''' of your choice.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
|| Type the '''password''' as <span style="color:#252525;">'''dbuserpass'''</span>
+
|| Type the '''password''' as '''dbuserpass'''  
|| <span style="color:#252525;">Retype the same </span><span style="color:#252525;">'''password'''</span><span style="color:#252525;"> once again.</span>
+
|| Retype the same '''password''' once again.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Type '''n'''
 
|| Type '''n'''
  
  
  
|| <span style="color:#252525;">If prompted, respond </span><span style="color:#252525;">'''‘n’'''</span><span style="color:#252525;"> to the question ‘</span><span style="color:#252525;">'''Shall the new role be allowed to create more new roles? (y/n)’.'''</span>
+
|| If prompted, respond '''‘n’''' to the question ‘ '''Shall the new role be allowed to create more new roles? (y/n)’.'''  
  
  
<span style="color:#252525;">We have successfully created the </span><span style="color:#252525;">'''user dspace'''</span><span style="color:#252525;"> in </span><span style="color:#252525;">'''postgresql.'''</span>
+
We have successfully created the '''user dspace''' in '''postgresql.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
Line 429: Line 394:
  
 
To do so type the '''command''' as shown.
 
To do so type the '''command''' as shown.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
<div style="color:#252525;">'''createdb -E UNICODE dspace'''</div>
+
'''createdb -E UNICODE dspace'''  
|| <span style="color:#252525;">Next, we have to create a </span><span style="color:#252525;">'''database '''</span><span style="color:#252525;">named</span><span style="color:#252525;">''' ‘dspace’'''</span><span style="color:#252525;">. </span>
+
|| Next, we have to create a '''database ''' named ''' ‘dspace’'''.  
  
  
<span style="color:#252525;">To do so, type the following </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;">.</span>
+
To do so, type the following '''command'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
 
'''psql -U postgres -d dspace'''
 
'''psql -U postgres -d dspace'''
|| <span style="color:#252525;">Type </span>'''psql -U postgres -d dspace'''<span style="color:#252525;"> to connect to the </span><span style="color:#252525;">'''database'''</span><span style="color:#252525;">.</span>
+
|| Type '''psql -U postgres -d dspace''' to connect to the '''database'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
<div style="color:#252525;">'''ALTER DATABASE dspace OWNER TO dspace;'''</div>
+
'''ALTER DATABASE dspace OWNER TO dspace;'''  
|| <span style="color:#252525;">Next, we have to provide</span><span style="color:#252525;">''' dspace database ownership'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''user dspace'''</span><span style="color:#252525;">.</span>
+
|| Next, we have to provide ''' dspace database ownership''' to '''user dspace'''.  
  
  
<div style="color:#252525;">To do so, type the following command.</div>
+
To do so, type the following command.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
<div style="color:#252525;">'''GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;'''</div>
+
'''GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;'''  
|| <div style="color:#222222;"></div>
+
|| To grant '''privileges''' to '''user dspace''' , type the '''command''' as shown.  
 
+
|-  
<div style="color:#222222;"></div>
+
 
+
<span style="color:#222222;">To </span><span style="color:#252525;">grant </span><span style="color:#252525;">'''privileges'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''user dspace'''</span><span style="color:#252525;">, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown.</span>
+
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
<div style="color:#252525;">'''CREATE EXTENSION pgcrypto;'''</div>
+
'''CREATE EXTENSION pgcrypto;'''  
  
  
  
|| <span style="color:#333333;">The </span><span style="color:#333333;">'''pgcrypto extension'''</span><span style="color:#333333;"> allows </span><span style="color:#333333;">'''DSpace'''</span><span style="color:#333333;"> to create </span><span style="color:#333333;">universally unique </span><span style="color:#333333;">'''identifiers'''</span><span style="color:#333333;"> for all </span><span style="color:#333333;">'''objects'''</span><span style="color:#333333;"> in </span><span style="color:#333333;">'''DSpace'''</span><span style="color:#333333;">.</span>
+
|| '''pgcrypto extension''' allows '''DSpace''' to create universally unique '''identifiers''' for all '''objects''' in '''DSpace'''.  
  
  
<span style="color:#252525;">We will now add </span><span style="color:#252525;">'''crypto extension'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''DSpace database.'''</span>
+
We will now add '''crypto extension''' to '''DSpace database.'''  
  
  
<span style="color:#252525;">So type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here.</span>
+
So type the '''command''' as shown here.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
|| [Terminal] Type: <span style="color:#222222;">'''\q'''</span>
+
|| [Terminal] Type: '''\q'''  
|| <span style="color:#222222;">Type </span><span style="color:#222222;">'''backslash q'''</span><span style="color:#222222;"> in the </span><span style="color:#222222;">'''terminal '''</span><span style="color:#222222;">to quit the</span><span style="color:#222222;">''' database shell.'''</span>
+
|| Type '''backslash q''' in the '''terminal ''' to quit the ''' database shell.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type: '''exit'''
 
|| [Terminal] Type: '''exit'''
|| <span style="color:#222222;">Type </span><span style="color:#222222;">'''exit'''</span><span style="color:#222222;"> in the </span><span style="color:#222222;">'''terminal'''</span><span style="color:#222222;"> and press </span><span style="color:#222222;">'''Enter,'''</span><span style="color:#222222;"> to switch back to </span><span style="color:#222222;">'''DSpace user'''</span><span style="color:#222222;">.</span>
+
|| Type '''exit''' in the '''terminal''' and press '''Enter,''' to switch back to '''DSpace user''' .  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
|| <span style="color:#252525;">Now, we have to allow the </span><span style="color:#252525;">'''database user dspace'''</span><span style="color:#252525;"> to connect to the </span><span style="color:#252525;">'''database'''</span><span style="color:#252525;">.</span>
+
|| Now, we have to allow the '''database user dspace''' to connect to the '''database'''.  
  
  
<span style="color:#252525;">To do so, we will require </span><span style="color:#252525;">'''root permissions'''</span><span style="color:#252525;">.</span>
+
To do so, we will require '''root permissions'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type: '''sudo -i'''
 
|| [Terminal] Type: '''sudo -i'''
|| <span style="color:#222222;">Type </span><span style="color:#222222;">'''sudo -i '''</span><span style="color:#222222;">in the </span><span style="color:#222222;">'''terminal.'''</span>
+
|| Type '''sudo -i ''' in the '''terminal.'''  
  
  
<span style="color:#222222;">Enter the </span><span style="color:#222222;">'''root user password'''</span><span style="color:#222222;"> if prompted.</span>
+
Enter the '''root user password''' if prompted.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
 
'''sudo echo "host dspace dspace 127.0.0.1/32 md5" >> /etc/postgresql/10/main/pg_hba.conf'''
 
'''sudo echo "host dspace dspace 127.0.0.1/32 md5" >> /etc/postgresql/10/main/pg_hba.conf'''
|| <span style="color:#252525;">Next, type the following </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> in the </span><span style="color:#252525;">'''terminal.'''</span>
+
|| Next, type the following '''command''' in the '''terminal.'''  
 
+
|-  
 
+
<div style="color:#252525;"></div>
+
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| [Terminal] Type: '''exit '''
 
|| [Terminal] Type: '''exit '''
|| <span style="color:#252525;">Type </span><span style="color:#252525;">'''exit '''</span><span style="color:#252525;">in the </span><span style="color:#252525;">'''terminal'''</span><span style="color:#252525;"> to switch to the </span><span style="color:#252525;">'''dspace account'''</span><span style="color:#252525;">.</span>
+
|| Type '''exit ''' in the '''terminal''' to switch to the '''dspace account'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
 
'''sudo service postgresql restart'''  
 
'''sudo service postgresql restart'''  
|| <span style="color:#252525;">Lastly, we have to restart the </span><span style="color:#252525;">'''postgresql server '''</span><span style="color:#252525;">once again.</span>
+
|| Lastly, we have to restart the '''postgresql server ''' once again.  
  
  
<span style="color:#252525;">To do so, type the </span><span style="color:#252525;">'''command'''</span><span style="color:#252525;"> as shown here</span>'''.'''
+
To do so, type the '''command''' as shown here.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
  
<div style="color:#252525;">'''sudo gedit $HOME/.bashrc'''</div>
+
'''sudo gedit $HOME/.bashrc'''  
|| <span style="color:#252525;">Now, we will set up </span><span style="color:#252525;">'''file creation permissions'''</span><span style="color:#252525;"> for </span><span style="color:#252525;">'''DSpace.'''</span>
+
|| Now, we will set up '''file creation permissions''' for '''DSpace.'''  
  
  
<span style="color:#252525;">To do so, type </span><span style="color:#252525;">'''sudo gedit $HOME/.bashrc'''</span>
+
To do so, type '''sudo gedit $HOME/.bashrc'''  
  
  
<span style="color:#252525;">You can open this file in any </span><span style="color:#252525;">'''text editor'''</span><span style="color:#252525;"> of your choice.</span>
+
You can open this file in any '''text editor''' of your choice.  
  
  
<span style="color:#252525;">'''bashrc'''</span><span style="color:#252525;"> file opens in the </span><span style="color:#252525;">'''text editor.'''</span>
+
'''bashrc''' file opens in the '''text editor.'''  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Gedit] Type
 
|| [Gedit] Type
  
  
<div style="color:#252525;">'''umask 002'''</div>
+
'''umask 002'''  
|| <div style="color:#252525;">Scroll to the end of the file.</div>
+
|| Scroll to the end of the file.  
  
  
<span style="color:#252525;">Type </span><span style="color:#252525;">'''umask 002'''</span>
+
Type '''umask 002'''  
  
  
<span style="color:#252525;">'''umask 002'''</span><span style="color:#252525;"> sets default </span><span style="color:#252525;">'''directory permissions'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''775 '''</span><span style="color:#252525;">and default </span><span style="color:#252525;">'''file permissions'''</span><span style="color:#252525;"> to </span><span style="color:#252525;">'''664'''</span><span style="color:#252525;">.</span>
+
'''umask 002''' sets default '''directory permissions''' to '''775 ''' and default '''file permissions''' to '''664'''.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
| style="color:#252525;" | Save and close the file
 
| style="color:#252525;" | Save and close the file
 
| style="color:#252525;" | Now save and close the file.
 
| style="color:#252525;" | Now save and close the file.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| [Terminal] Type:
 
|| [Terminal] Type:
  
 
'''sudo reboot'''
 
'''sudo reboot'''
|| <span style="color:#252525;">Finally restart the system, to flush </span><span style="color:#252525;">'''umask 002 type permissions. '''</span>
+
|| Finally restart the system, to flush '''umask 002 type permissions. '''  
  
  
<span style="color:#252525;">To do so, type </span><span style="color:#252525;">'''sudo reboot'''</span><span style="color:#252525;"> in the </span><span style="color:#252525;">'''terminal'''</span><span style="color:#252525;">.</span>
+
To do so, type '''sudo reboot''' in the '''terminal'''.  
  
  
<div style="color:#252525;">This will restart your computer.</div>
+
This will restart your computer.  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only narration
 
|| Only narration
 
|| With this we have successfully configured the '''database''' and '''tomcat server''' to install''' DSpace'''.
 
|| With this we have successfully configured the '''database''' and '''tomcat server''' to install''' DSpace'''.
Line 561: Line 519:
  
 
Let us summarize.
 
Let us summarize.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide : Summary
 
|| Slide : Summary
  
  
  
|| In this tutorial we learnt to-* <div style="margin-left:1.27cm;margin-right:0cm;">Install '''Java, Tomcat8, Postgresql 10, Ant, Maven, '''and '''git'''</div>
+
|| In this tutorial we learnt to-
* <div style="margin-left:1.27cm;margin-right:0cm;">Configure '''Tomcat8 server '''and</div>
+
* Install '''Java, Tomcat8, Postgresql 10, Ant, Maven, '''and '''git'''  
* <div style="margin-left:1.27cm;margin-right:0cm;">Create '''dspace database''' in '''Postgresql 10'''</div>
+
* Configure '''Tomcat8 server '''and  
 +
* Create '''dspace database''' in '''Postgresql 10'''  
  
 
+
|-  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide : About Spoken Tutorial project
 
|| Slide : About Spoken Tutorial project
 
|| The video at the following link summarises the '''Spoken Tutorial project.'''
 
|| The video at the following link summarises the '''Spoken Tutorial project.'''
Line 577: Line 535:
  
 
Please download and watch it.
 
Please download and watch it.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide: Spoken Tutorial workshops
 
|| Slide: Spoken Tutorial workshops
 
 
  
 
|| The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.
 
|| The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.
Line 590: Line 546:
  
  
 
+
||  
|| Do you have questions in THIS Spoken Tutorial?* <div style="margin-left:1.27cm;margin-right:0cm;">Please visit this site.</div>
+
* Do you have questions in THIS Spoken Tutorial? Please visit this site.  
* <div style="margin-left:1.27cm;margin-right:0cm;">Choose the minute and second where you have the question.</div>
+
* Choose the minute and second where you have the question.  
* <div style="margin-left:1.27cm;margin-right:0cm;">Explain your question briefly.</div>
+
* Explain your question briefly.  
* <div style="margin-left:1.27cm;margin-right:0cm;">The Spoken Tutorial project will ensure an answer.</div>
+
* The Spoken Tutorial project will ensure an answer.  
* <div style="margin-left:1.27cm;margin-right:0cm;">You will have to register to ask questions.</div>
+
* You will have to register to ask questions.  
 
+
  
 
|- style="background-color:#ffffff;border:1pt solid #000000;padding:0.176cm;"
 
|- style="background-color:#ffffff;border:1pt solid #000000;padding:0.176cm;"
 
|| Slide : Forum for specific questions
 
|| Slide : Forum for specific questions
|| The Spoken Tutorial forum is for specific questions on this tutorial.* <div style="margin-left:1.27cm;margin-right:0cm;">Please do not post unrelated and general questions on them.</div>
+
||  
* <div style="margin-left:1.27cm;margin-right:0cm;">This will help reduce the clutter.</div>
+
* The Spoken Tutorial forum is for specific questions on this tutorial.
* <div style="margin-left:1.27cm;margin-right:0cm;">With less clutter, we can use these discussions as instructional material.</div>
+
* Please do not post unrelated and general questions on them.  
 +
* This will help reduce the clutter.  
 +
* With less clutter, we can use these discussions as instructional material.  
  
 
+
|-  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
|| Slide: Acknowledgement -I
 
|| Slide: Acknowledgement -I
 
|| '''Spoken Tutorial project''' is funded by MHRD, Government of India.
 
|| '''Spoken Tutorial project''' is funded by MHRD, Government of India.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide: Acknowledgement -II
 
|| Slide: Acknowledgement -II
 
  
  
 
|| '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.
 
|| '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| 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.
|| 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.
+
 
|-
 
|-
 
|}
 
|}

Revision as of 19:03, 29 May 2020

Script: Getting ready for DSpace Installation


Author : Pankaj Patil


Keywords : DSpace Installation, Tomcat Installation, postgresql installation, Configure tomcat server, Create DSpace database


Visual Cue Narration
Slide : Title Welcome to this spoken tutorial on Getting ready for DSpace Installation.
Slide : Learning Objectives Slide In this tutorial we will learn to
  • Install Java, Tomcat 8, Postgresql 10, Ant, Maven and git
  • Configure Tomcat 8 server and
  • Create dspace database in Postgresql 10
Slide : System requirements This tutorial is recorded using
  • Ubuntu Linux OS 18.04 and
  • gedit text editor

However you may use any other text editor of your choice.

Slide : Pre-requisites To practice this tutorial,
  • You need an internet connection to install the necessary packages and
  • You should be familiar with basic Linux commands.
Slide : Pre-requisites If not then please go through the prerequisite Linux tutorials on this website.
Slide : Hardware requirements The minimum hardware requirements for DSpace installation is
  • i3 processor or above
  • 100GB hard disk or more
  • 4GB RAM or above and
  • A network facility
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 the 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.

[Terminal] Type:

sudo adduser dspace

First let us create a new user account and name it as dspace.


To do so, type the command sudo adduser dspace and press Enter.

[Terminal] Type:

admin password

Immediately, we are prompted to type the admin password.


So, type the admin password and press Enter.


The process of creating a new user has begun.

Only Narration Here onwards please remember to press the Enter key after typing each command.
Enter new UNIX password


Type password as dupass

The terminal will now prompt a message, “Enter new UNIX password”.


Here we have to set the password for the user dspace.


I will set the password as dupass.


You can give any password of your choice.

Retype password as dupass Type the same password in Retype new UNIX password.
Full Name: DSpace


Fill the rest of the details as shown here.

We have now successfully created the user dspace.

[Terminal] Type:


sudo adduser dspace sudo

Next let us add this new user dspace to the sudoers group.


By doing this, the user dspace will have full control of the system.


In the terminal, type sudo adduser dspace sudo

[Terminal] Type:


sudo su - dspace

Now, let us login as user dspace.


Type sudo su - dspace


If prompted, type the password of user dspace to login.

[Terminal] Type:


sudo apt-get update

Before proceeding further, let us update our system.


To do this, type sudo apt-get update


If prompted, type the password of user dspace to proceed further.

Narration only The updating process may take some time depending upon your internet speed.
[Terminal] Type:

sudo dpkg --configure -a

To avoid dpkg interruption errors during installation, type the following command

sudo dpkg --configure -a

[Terminal] Type:


sudo apt-get install openjdk-8-jdk -y

Next, let us install Java Development Kit.


To do so, type the following command in the terminal.


The installation may take some time depending upon your internet speed.

Narration only We have now successfully installed JDK.
[Terminal] Type:

java -version

Next, we will verify the installed JDK version.

To do so, type java -version

Highlight openjdk version “1.8.0_242” In the terminal , we can see openjdk version “1.8.0_242”


0_242 in the openjdk version is the release number, which may be different in your case.

Slide : JDK version


sudo apt-get remove openjdk-11-jre-headless

  • If the JDK version other than 8 is installed, then remove it.
  • For example, if JDK version 11 is installed then type the command as shown.

Switch to the terminal.

[Terminal] Type:

sudo apt-get install git -y

DSpace resource packages have to be pulled from the git repository using the git tool.


So let us install the git tool.


To do so, type the command as shown here.

[Terminal] Type:

sudo apt-get install maven -y

Now, let us install an Apache Maven, which is used to build DSpace source code.


To do so, type the command as shown here.

[Terminal] Type:

sudo apt-get install ant ant-optional -y

Next, we will install an Apache Ant tool, which is used to install DSpace.


To do so, type the command as shown.

[Terminal] Type:


sudo apt-get install tomcat8 -y

Next, let us install Tomcat 8.


To install Tomcat, type the command as shown here.

[Terminal] Type:


sudo gedit /etc/tomcat8/policy.d/05dspace.policy

Next we have to create a DSpace security policy.


This will provide all Java security permissions to DSpace.


Type the command as shown, to open a new policy file in gedit text editor.


You can do this in your editor, as well.

[Terminal] Type:


grant codeBase "file:/home/dspace/-" {

permission java.security.AllPermission;

};

grant codeBase "file:/tmp/-" {

permission java.security.AllPermission;

};

A new file opens in the text editor.


Type DSpace security policy as shown here.


You can copy-paste this piece of code from the Code File, as demonstrated here.

Press Ctrl+S >> close the file Now save and close the file.
[Terminal] We’re back on the terminal.
[Terminal] Type:


sudo chown root.tomcat8 /etc/tomcat8/policy.d/05dspace.policy

To provide ownership of DSpace security policy to Tomcat, type the command as shown.
[Terminal] Type:


sudo adduser tomcat8 dspace

To permit access of DSpace to Tomcat 8 , we have to add the Tomcat8 user to DSpace user group.


To do so, type the command as shown here.

[Terminal] Type:


sudo adduser dspace tomcat8

To permit access of Tomcat 8 to DSpace , we have to add the DSpace user to Tomcat8 group.


To do so, type the command as shown here.

[Terminal] Type:


sudo service tomcat8 restart

Now, restart tomcat server to update the changes.


To do so, type the command as shown here.

[Terminal] Type:

sudo apt-get install postgresql-10 postgresql-contrib postgresql-contrib-10 libpg-java -y

Next, we’ll install Postgresql, which is used as a database for DSpace.


Type the command as shown in the terminal to install postgresql.

Change database permissions to trust Next, we have to restrict the database to be accessed by trust method only.


To do that, we have to change peer, md5 and ident to trust.

[Terminal] Type:


sudo sed -i 's/peer/trust/' /etc/postgresql/10/main/pg_hba.conf

To change database permissions from peer to trust, type the command as shown.
[Terminal] Type:


sudo sed -i 's/md5/trust/' /etc/postgresql/10/main/pg_hba.conf

To change database permissions from md5 to trust, type the command as shown here.
[Terminal] Type:


sudo sed -i 's/ident/trust/' /etc/postgresql/10/main/pg_hba.conf

To change database permissions from ident to trust, type the command as shown.
[Terminal] Type:


sudo service postgresql restart

We have to restart postgresql to update the changes we just made.


To do so, type the command as shown here.

Narration only Now, we will create a dspace user in postgresql database.
[Terminal] Type:


createuser -U postgres -d -A -P dspace

Type this command as shown in the terminal.

Type the password as dbuserpass

Set a password for the user dspace for the database.


I will set the password as dbuserpass.


You can give any password of your choice.

Type the password as dbuserpass Retype the same password once again.
Type n


If prompted, respond ‘n’ to the question ‘ Shall the new role be allowed to create more new roles? (y/n)’.


We have successfully created the user dspace in postgresql.

[Terminal] Type:


sudo su - postgres

Let us login as user postgres.


To do so type the command as shown.

[Terminal] Type:


createdb -E UNICODE dspace

Next, we have to create a database named ‘dspace’.


To do so, type the following command.

[Terminal] Type:

psql -U postgres -d dspace

Type psql -U postgres -d dspace to connect to the database.
[Terminal] Type:


ALTER DATABASE dspace OWNER TO dspace;

Next, we have to provide dspace database ownership to user dspace.


To do so, type the following command.

[Terminal] Type:


GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;

To grant privileges to user dspace , type the command as shown.
[Terminal] Type:


CREATE EXTENSION pgcrypto;


pgcrypto extension allows DSpace to create universally unique identifiers for all objects in DSpace.


We will now add crypto extension to DSpace database.


So type the command as shown here.

[Terminal] Type: \q Type backslash q in the terminal to quit the database shell.
[Terminal] Type: exit Type exit in the terminal and press Enter, to switch back to DSpace user .
Narration only Now, we have to allow the database user dspace to connect to the database.


To do so, we will require root permissions.

[Terminal] Type: sudo -i Type sudo -i in the terminal.


Enter the root user password if prompted.

[Terminal] Type:

sudo echo "host dspace dspace 127.0.0.1/32 md5" >> /etc/postgresql/10/main/pg_hba.conf

Next, type the following command in the terminal.
[Terminal] Type: exit Type exit in the terminal to switch to the dspace account.
[Terminal] Type:

sudo service postgresql restart

Lastly, we have to restart the postgresql server once again.


To do so, type the command as shown here.

[Terminal] Type:


sudo gedit $HOME/.bashrc

Now, we will set up file creation permissions for DSpace.


To do so, type sudo gedit $HOME/.bashrc


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


bashrc file opens in the text editor.

[Gedit] Type


umask 002

Scroll to the end of the file.


Type umask 002


umask 002 sets default directory permissions to 775 and default file permissions to 664.

Save and close the file Now save and close the file.
[Terminal] Type:

sudo reboot

Finally restart the system, to flush umask 002 type permissions.


To do so, type sudo reboot in the terminal.


This will restart your computer.

Only narration With this we have successfully configured the database and tomcat server to install DSpace.


Let us summarize.

Slide : Summary


In this tutorial we learnt to-
  • Install Java, Tomcat8, Postgresql 10, Ant, Maven, and git
  • Configure Tomcat8 server and
  • Create dspace database in Postgresql 10
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


  • Do you have questions in THIS Spoken Tutorial? Please visit this site.
  • Choose the minute and second where you have the question.
  • Explain your question briefly.
  • The Spoken Tutorial project will ensure an answer.
  • You will have to register to ask questions.
Slide : Forum for specific questions
  • The Spoken Tutorial forum is for specific questions on this tutorial.
  • Please do not post unrelated and general questions on them.
  • This will help reduce the clutter.
  • With less clutter, we can use these discussions as instructional material.
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