Difference between revisions of "DSpace/C2/Getting-ready-for-DSpace-Installation-on-Ubuntu-Linux-OS/English"
(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...") |
Nancyvarkey (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | <div style="margin-left:0cm;margin-right:0cm;">'''Script: Getting ready for DSpace Installation''' | + | <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 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 style="margin-left:0cm;margin-right:0cm;">'''Keywords : DSpace Installation, Tomcat Installation, postgresql installation, Configure tomcat server, Create DSpace database''' |
− | {| | + | {| border =1 |
− | + | |'''Visual Cue''' | |
− | + | |'''Narration''' | |
− | + | |- | |
− | |- | + | |
|| 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.''' | ||
− | |- | + | |- |
|| Slide : Learning Objectives Slide | || Slide : Learning Objectives Slide | ||
− | || In this tutorial we will learn to * | + | || 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 | || Slide : System requirements | ||
− | || This tutorial is recorded using* | + | || 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. | However you may use any other '''text editor''' of your choice. | ||
− | |- | + | |- |
|| Slide : Pre-requisites | || Slide : Pre-requisites | ||
− | || To practice this tutorial,* | + | || 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 | || 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. | ||
− | |- | + | |- |
|| Slide : Hardware requirements | || Slide : Hardware requirements | ||
− | || The minimum hardware requirements for '''DSpace''' installation is* | + | || 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 | || 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. | ||
− | |- | + | |- |
|| 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. |
− | |- | + | |- |
|| Narration only | || Narration only | ||
|| Let us begin. | || Let us begin. | ||
− | |- | + | |- |
|| 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'''. | ||
− | |- | + | |- |
|| [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.''' | ||
− | |- | + | |- |
|| [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. | ||
− | |- | + | |- |
|| 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'''. | ||
− | |- | + | |- |
|| 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. | ||
− | |- | + | |- |
|| 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'''. | ||
− | |- | + | |- |
|| 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.''' | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
Line 143: | Line 129: | ||
In the '''terminal''', type '''sudo adduser dspace sudo''' | In the '''terminal''', type '''sudo adduser dspace sudo''' | ||
− | |- | + | |- |
|| [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'''. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo apt-get update''' | '''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 | || Narration only | ||
− | || | + | || The '''updating''' process may take some time depending upon your '''internet''' speed. |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
− | + | '''sudo dpkg --configure -a''' | |
− | || | + | || To avoid '''dpkg interruption''' errors during installation, type the following '''command''' |
− | + | '''sudo dpkg --configure -a''' | |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo apt-get install openjdk-8-jdk -y''' | '''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. | The installation may take some time depending upon your internet speed. | ||
− | |- | + | |- |
|| Narration only | || Narration only | ||
− | || | + | || We have now successfully installed '''JDK.''' |
− | |- | + | |- |
|| [Terminal] Type: | || [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 | || 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: | || [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: | || [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: | || [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: | || [Terminal] Type: | ||
'''sudo apt-get install tomcat8 -y''' | '''sudo apt-get install tomcat8 -y''' | ||
− | || | + | || Next, let us install '''Tomcat 8. ''' |
− | To install '''Tomcat''', type | + | To install '''Tomcat''', type the '''command''' as shown here. |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo gedit /etc/tomcat8/policy.d/05dspace.policy''' | '''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'''. | |
Line 275: | Line 251: | ||
You can do this in your '''editor, '''as well. | You can do this in your '''editor, '''as well. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
Line 290: | Line 266: | ||
'''};''' | '''};''' | ||
− | || | + | || 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 | || Press '''Ctrl+S''' >> close the file | ||
|| Now save and close the file. | || Now save and close the file. | ||
− | |- | + | |- |
|| [Terminal] | || [Terminal] | ||
|| We’re back on the '''terminal'''. | || We’re back on the '''terminal'''. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo chown root.tomcat8 /etc/tomcat8/policy.d/05dspace.policy''' | '''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: | || [Terminal] Type: | ||
− | |||
− | |||
'''sudo adduser tomcat8 dspace''' | '''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: | || [Terminal] Type: | ||
− | |||
− | |||
'''sudo adduser dspace tomcat8''' | '''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: | || [Terminal] Type: | ||
'''sudo service tomcat8 restart''' | '''sudo service tomcat8 restart''' | ||
− | || | + | || Now, restart '''tomcat server''' to '''update''' the changes. |
− | + | To do so, type the '''command''' as shown here. | |
− | |- | + | |- |
|| [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''' | ||
− | || | + | || 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 | || 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.''' | ||
− | |- | + | |- |
|| [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. | ||
− | |- | + | |- |
|| [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. | ||
− | |- | + | |- |
|| [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. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo service postgresql restart ''' | '''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 | || Narration only | ||
− | || | + | || Now, we will create a '''dspace user''' in '''postgresql database.''' |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''createuser -U postgres -d -A -P dspace''' | '''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. | You can give any '''password''' of your choice. | ||
− | |- | + | |- |
− | || Type the '''password''' as | + | || Type the '''password''' as '''dbuserpass''' |
− | || | + | || Retype the same '''password''' once again. |
− | |- | + | |- |
|| Type '''n''' | || 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: | || [Terminal] Type: | ||
Line 429: | Line 394: | ||
To do so type the '''command''' as shown. | To do so type the '''command''' as shown. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
− | + | '''createdb -E UNICODE dspace''' | |
− | || | + | || Next, we have to create a '''database ''' named ''' ‘dspace’'''. |
− | + | To do so, type the following '''command'''. | |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''psql -U postgres -d dspace''' | '''psql -U postgres -d dspace''' | ||
− | || | + | || Type '''psql -U postgres -d dspace''' to connect to the '''database'''. |
− | |- | + | |- |
|| [Terminal] Type: | || [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: | || [Terminal] Type: | ||
− | + | '''GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;''' | |
− | || | + | || To grant '''privileges''' to '''user dspace''' , type the '''command''' as shown. |
− | + | |- | |
− | + | ||
− | + | ||
− | + | ||
− | |- | + | |
|| [Terminal] Type: | || [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: | + | || [Terminal] Type: '''\q''' |
− | || | + | || Type '''backslash q''' in the '''terminal ''' to quit the ''' database shell.''' |
− | |- | + | |- |
|| [Terminal] Type: '''exit''' | || [Terminal] Type: '''exit''' | ||
− | || | + | || Type '''exit''' in the '''terminal''' and press '''Enter,''' to switch back to '''DSpace user''' . |
− | |- | + | |- |
|| Narration only | || 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''' | || [Terminal] Type: '''sudo -i''' | ||
− | || | + | || Type '''sudo -i ''' in the '''terminal.''' |
− | + | Enter the '''root user password''' if prompted. | |
− | |- | + | |- |
|| [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''' | ||
− | || | + | || Next, type the following '''command''' in the '''terminal.''' |
− | + | |- | |
− | + | ||
− | + | ||
− | |- | + | |
|| [Terminal] Type: '''exit ''' | || [Terminal] Type: '''exit ''' | ||
− | || | + | || Type '''exit ''' in the '''terminal''' to switch to the '''dspace account'''. |
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo service postgresql restart''' | '''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: | || [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 | || [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'''. | |
− | |- | + | |- |
| 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. | ||
− | |- | + | |- |
|| [Terminal] Type: | || [Terminal] Type: | ||
'''sudo reboot''' | '''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 | || 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. | ||
− | |- | + | |- |
|| Slide : Summary | || Slide : Summary | ||
− | || In this tutorial we learnt to-* | + | || 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 | || 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. | ||
− | |- | + | |- |
|| 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? | + | * 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. |
− | + | ||
|- 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.* | + | || |
− | * | + | * 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 | || Slide: Acknowledgement -I | ||
|| '''Spoken Tutorial project''' is funded by MHRD, Government of India. | || '''Spoken Tutorial project''' is funded by MHRD, Government of India. | ||
− | |- | + | |- |
|| 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. | ||
− | |- | + | |- |
|| 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. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|} | |} |
Revision as of 19:03, 29 May 2020
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
|
Slide : System requirements | This tutorial is recorded using
However you may use any other text editor of your choice. |
Slide : Pre-requisites | To practice this tutorial,
|
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
|
Slide : Code files | The commands used in this tutorial are available in the Code Files link on this tutorial page.
|
Switch to gedit text editor and open the file | I have opened the code file in the gedit text editor on my machine.
|
Narration only | Let us begin. |
Press Ctrl+Alt+T keys | Open the terminal by pressing Ctrl,Alt and T keys simultaneously on the keyboard.
|
[Terminal] Type:
sudo adduser dspace |
First let us create a new user account and name it as dspace.
|
[Terminal] Type:
admin password |
Immediately, we are prompted to type the admin password.
|
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”.
|
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:
|
Next let us add this new user dspace to the sudoers group.
|
[Terminal] Type:
|
Now, let us login as user dspace.
|
[Terminal] Type:
|
Before proceeding further, let us update our system.
|
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:
|
Next, let us install Java Development Kit.
|
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”
|
Slide : JDK version
|
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.
|
[Terminal] Type:
sudo apt-get install maven -y |
Now, let us install an Apache Maven, which is used to build DSpace source code.
|
[Terminal] Type:
sudo apt-get install ant ant-optional -y |
Next, we will install an Apache Ant tool, which is used to install DSpace.
|
[Terminal] Type:
|
Next, let us install Tomcat 8.
|
[Terminal] Type:
|
Next we have to create a DSpace security policy.
|
[Terminal] Type:
permission java.security.AllPermission; }; grant codeBase "file:/tmp/-" { permission java.security.AllPermission; }; |
A new file opens in the text editor.
|
Press Ctrl+S >> close the file | Now save and close the file. |
[Terminal] | We’re back on the terminal. |
[Terminal] Type:
|
To provide ownership of DSpace security policy to Tomcat, type the command as shown. |
[Terminal] Type:
|
To permit access of DSpace to Tomcat 8 , we have to add the Tomcat8 user to DSpace user group.
|
[Terminal] Type:
|
To permit access of Tomcat 8 to DSpace , we have to add the DSpace user to Tomcat8 group.
|
[Terminal] Type:
|
Now, restart tomcat server to update the changes.
|
[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.
|
Change database permissions to trust | Next, we have to restrict the database to be accessed by trust method only.
|
[Terminal] Type:
|
To change database permissions from peer to trust, type the command as shown. |
[Terminal] Type:
|
To change database permissions from md5 to trust, type the command as shown here. |
[Terminal] Type:
|
To change database permissions from ident to trust, type the command as shown. |
[Terminal] Type:
|
We have to restart postgresql to update the changes we just made.
|
Narration only | Now, we will create a dspace user in postgresql database. |
[Terminal] Type:
|
Type this command as shown in the terminal. |
Type the password as dbuserpass |
Set a password for the user dspace for the database.
|
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)’.
|
[Terminal] Type:
|
Let us login as user postgres.
|
[Terminal] Type:
|
Next, we have to create a database named ‘dspace’.
|
[Terminal] Type:
psql -U postgres -d dspace |
Type psql -U postgres -d dspace to connect to the database. |
[Terminal] Type:
|
Next, we have to provide dspace database ownership to user dspace.
|
[Terminal] Type:
|
To grant privileges to user dspace , type the command as shown. |
[Terminal] Type:
|
pgcrypto extension allows DSpace to create universally unique identifiers for all objects in DSpace.
|
[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.
|
[Terminal] Type: sudo -i | Type sudo -i in the terminal.
|
[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.
|
[Terminal] Type:
|
Now, we will set up file creation permissions for DSpace.
|
[Gedit] Type
|
Scroll to the end of the file.
|
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.
|
Only narration | With this we have successfully configured the database and tomcat server to install DSpace.
|
Slide : Summary
|
In this tutorial we learnt to-
|
Slide : About Spoken Tutorial project | The video at the following link summarises the Spoken Tutorial project.
|
Slide: Spoken Tutorial workshops | The Spoken Tutorial Project team conducts workshops and gives certificates.
|
Slide: Answers for THIS Spoken Tutorial
|
|
Slide : Forum for specific questions |
|
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.
|