Difference between revisions of "DSpace/C2/Setting-up-Tomcat-and-Postgresql-on-Windows-OS/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "'''Script: Setting Tomcat and Postgresql on Windows 10''' '''Author : Pankaj Patil''' '''Keywords: Tomcat Installation, Tomcat8 installation on Windows 10, postgresql insta...")
 
 
Line 45: Line 45:
 
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.
 
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.
 
And I will use the same file to copy-paste the '''commands''' during the demonstration.
 
And I will use the same file to copy-paste the '''commands''' during the demonstration.
 +
 
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''
 
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''
 
|-  
 
|-  
 
|| Narration only
 
|| Narration only
|| Generally, DSpace is deployed on '''Tomcat8 server'''.
+
|| Generally, '''DSpace''' is deployed on '''Tomcat8 server'''.
 
Let us now '''install Apache tomcat 8.'''
 
Let us now '''install Apache tomcat 8.'''
 +
 
Open a '''web browser.'''
 
Open a '''web browser.'''
 
|-  
 
|-  
Line 64: Line 66:
 
Double click on '''Tomcat''' installer
 
Double click on '''Tomcat''' installer
 
|| Go to the place where you have downloaded the file on your machine.
 
|| Go to the place where you have downloaded the file on your machine.
In my case it is in the '''Downloads folder.'''
+
In my case, it is in the '''Downloads folder.'''
 +
 
 
Double-click on the '''Tomcat installer''' file.
 
Double-click on the '''Tomcat installer''' file.
 
|-  
 
|-  
Line 135: Line 138:
 
|| So, we have installed '''Tomcat '''and '''configured''' it.
 
|| So, we have installed '''Tomcat '''and '''configured''' it.
 
Next let us '''install postgresql'''.
 
Next let us '''install postgresql'''.
 +
 
Switch back to the '''browser.'''
 
Switch back to the '''browser.'''
 
|-  
 
|-  
Line 174: Line 178:
 
|| In the '''password setup''' page, set the '''root user password.'''
 
|| In the '''password setup''' page, set the '''root user password.'''
 
I will type my '''password''' as ‘'''root’.'''
 
I will type my '''password''' as ‘'''root’.'''
 +
 
Retype the same password to confirm it.
 
Retype the same password to confirm it.
 
|-  
 
|-  
Line 270: Line 275:
 
|-  
 
|-  
 
|| Select '''dspace'''
 
|| Select '''dspace'''
|| Select '''dspace '''as the '''owner''' to this '''database'''.
+
|| Select '''dspace '''as the '''owner''' of this '''database'''.
 
|-  
 
|-  
 
|| Click '''Definition''' tab
 
|| Click '''Definition''' tab
Line 348: Line 353:
 
|  | Narration only
 
|  | Narration only
 
|  | This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''
 
|  | 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.
+
And this is '''Nancy Varkey''' signing off.  
 +
 
 +
Thanks for joining.
 
|-
 
|-
 
|}
 
|}

Latest revision as of 21:30, 13 January 2021

Script: Setting Tomcat and Postgresql on Windows 10


Author : Pankaj Patil

Keywords: Tomcat Installation, Tomcat8 installation on Windows 10, postgresql installation, Configure tomcat server, Create DSpace database

Visual Cue Narration
Slide : Title Welcome to this spoken tutorial on Setting up Tomcat and Postgresql on Windows 10.
Slide: Learning Objectives Slide In this tutorial, we will learn to
  • Install and configure Tomcat 8
  • Install Postgresql 11
  • Create dspace database in Postgresql 11
Slide: System requirements This tutorial is recorded using
  • Windows 10 64 bit OS
  • WordPad 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 an internet connection to install the necessary packages
  • You should also have installed 7Zip file archiver
Slide: Pre-requisites
  • Environment Variables for Java, Ant, and Maven should be set as well
  • If not then please go through the prerequisite tutorials on this website.
Slide : Code files
  • The commands used in this tutorial are in a file in the Code Files link on this tutorial page.
  • Please download and extract the file before practicing.
Switch to WordPad and open the file I have opened the commands file in WordPad editor on my machine.

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

The shortcut to paste on the Command Prompt is Ctrl and V keys.

Narration only Generally, DSpace is deployed on Tomcat8 server.

Let us now install Apache tomcat 8.

Open a web browser.

[Browser] Type:

https://downloads.apache.org/tomcat/tomcat-8/v8.5.60/bin/apache-tomcat-8.5.60.exe

In the address bar, type the URL as shown to download Apache tomcat 8 installer.
Click on the Save file If prompted, click on the Save file button to download the installer.

The download begins in the default downloads folder.

Open Downloads folder Double click on Tomcat installer

Go to the place where you have downloaded the file on your machine.

In my case, it is in the Downloads folder.

Double-click on the Tomcat installer file.

Click on Yes In the User Account Control dialog box, click on Yes or Run button.
Click Next button In the Setup dialog box, click on the Next button to continue.
Click I Agree button Click on the I Agree button to accept the terms of agreement.
Click Next button To proceed with the default components selection, click the Next button.
Click Next button Click the Next button to continue the installation with basic configurations.
Click Next button Keep the default path of JRE and click on the Next button to continue.
Click Install button Keep the default path for Tomcat installation and click on the Install button.
Narration only The installation is successfully completed.
Uncheck checkbox of Show Readme and click Finish button Uncheck the Show Readme option.

And click on the Finish button to close the dialog box.

Narration only Apache Tomcat service begins.

Now let us configure Tomcat to start on system restart.

Type Control Panel in search box of taskbar Go to the search bar located at the bottom left of the taskbar.

Then type “Control Panel”.

Click on Control Panel Application Click on the Control Panel application.
Click System and Security settings -> Administrative Tools Next, go to System and Security settings and then on the Administrative Tools menu.
Point to Administrative Tools Administrative Tools dialog box opens up.
Double Click on Services Double-click on Services.
Locate Apache Tomcat service and Right click on it

Select Properties

Locate Apache Tomcat service.

Then right-click and select Properties.

Point to Window Apache Tomcat8 properties dialog box opens up.
Click on dropdown of Startup type -> Choose Automatic Click on the Startup type drop-down and select Automatic from the list.
Click Apply button Click the Apply button and then on the OK button at the bottom right corner of the window.
Close Service, Administrative Tools, Control Panel window Now, close the Services, Administrative Tools, and Control Panel windows.
Narration only So, we have installed Tomcat and configured it.

Next let us install postgresql.

Switch back to the browser.

[Browser] Type:

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

In the address bar type the URL as shown to view the installer packages of postgresql.
Click download button for version 11.10 and 64 bit OS Download the postgresql version 11.10 for Windows 64 bit OS.
Click on the Save file If prompted, click on the Save file button to download the installer.
Open Downloads folder Once again go to the Downloads folder.
Right-click on the postgresql installer and select Run as administrator Right-click on the postgresql installer and select Run as administrator.
Click on Yes In the User Account Control dialog box, click on Yes or Run button.
Click Next to begin installation process Click on the Next button to begin the installation process.
Click Next button Keep the default settings for Installation location and click on the Next button.
Click Next button Keep the default selected components and click on the Next button.
Click Next button Keep the default Data directory and click on the Next button.
Only narration

Enter the Password as ‘root’ Retype the same password

In the password setup page, set the root user password.

I will type my password as ‘root’.

Retype the same password to confirm it.

Click Next button repeatedly Then, Click the Next button repeatedly to install postgresql with the default configuration.
Uncheck Checkbox of View release notes Once the installation is over, uncheck the checkbox of “stack builder”.
Click Finish button Then click the Finish button.
Narration only Now let us create a database and a user for it.
Type pgadmin4 in search box of taskbar Go to the search bar located at the bottom left of the taskbar.

Then type pgadmin4.

Click on pgadmin4 Click on the pgadmin4 application.
Narration only pgAdmin is a management tool for PostgreSQL.
Point t o the pgAdmin page in the browser pgAdmin page opens in the default web browser.
Point to Set Master Password It might prompt us to set the master password for pgAdmin.
Type password as ‘root’ and Click OK button I will set the password as ‘root’ and click on the OK button
Double click on Servers in the left panel On the left panel, double-click on Servers.
Enter password of the postgres user: root

Click OK button

Type the postgres user password to connect to the database server and click on the OK button.
Narration only Now let us create a user for the database.
Right click on Login/Group Roles under PostgreSQL 11 In the left panel, under PostgreSQL 11 right-click on the Login/Group Roles.
Select Create option -> Login/Group Roles option From the context menu, select Create and then on Login/Group Roles option.
Point to Create- Login/Group Roles A Pop-up window opens up to create a user for the database.
Enter Name

dspace

Under General tab, type the name of the database user in the Name field.

So, I will type dspace.

Click Definition tab Click on the Definition tab.
Enter Password

dbuserpass

In the Password field, type the password for the database user.

I will type dbuserpass.

Click Privileges tab Now, go to the Privileges tab.
Toggle buttons to change all values to Yes To provide all privileges to the user, toggle the buttons and change all the values to Yes.
Click Save button Then click on the Save button and close the pop-up window.
Narration only Now let us create a database named dspace.
Right click on Login/Group Roles under Databases In the left panel, under PostgreSQL 11 right-click on the Databases.
Select Create option -> Database option From the context menu, select Create and then on Database option.
Point to Create- Database A pop-up window opens up to create a database.
Enter name of the database

Type: dspace

Under the General tab, type the name of the database.

I will type dspace.

Click on dropdown next to owner field Click on the drop-down next to the owner field.

A list of database users is seen.

Select dspace Select dspace as the owner of this database.
Click Definition tab Go to the Definition tab.
Click on dropdown next to Tablespace field -> Select pg_default Click on the drop-down next to the Tablespace field and select pg_default
Click Save button Then click on the Save button and close the pop-up window.
Point to dspace under Databases. In the left panel, under PostgreSQL 11, under Databases, we see the newly created database dspace.
Click on dspace database. Click on the dspace database.
Slide: pgcrypto extension We will now add a pgcrypto extension to the DSpace database.

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

Click on the arrow adjacent to the dspace database If submenus are not shown, Expand the dspace database by clicking on the arrow adjacent to it.
Right click on Extensions

Create -> Extensions

Right-click on Extensions.

Then from the context menu, select Create and then click on Extensions.

Point to Create Extensions The Create Extensions pop-up opens up.
Click on dropdown next to Name field Under the General tab, click on the drop-down next to the Name field.
Select pgcrypto Scroll and select pgcrypto as an Extension.
Click Save button Then click on the Save button and close the pop-up window.
Narration only Pgcrypto extension is created.
Close the pgAdmin4 tab

Restart the System

Close the pgAdmin4 tab and restart the system to bring all configurations into effect.
Only narration So now, we have installed postgresql and created a dspace database.

Let us summarize.

Slide : Summary In this tutorial, we learnt to-
  • Install and configure Tomcat 8
  • Install Postgresql 11
  • Create dspace database in Postgresql 11
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 Ministry of Education (MoE), 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

Pankajpatil694, Pravin1389