Showing posts with label Dspace. Show all posts
Showing posts with label Dspace. Show all posts

New Username and Password create Dspace

New user account from command line 

Dspace administrator can add new user through command line besides email registration. 

Open Terminal and apply following commands, 

 sudo su /dspace/bin/dspace user --add --email user@gmail.com -g Tom -s User --password userpassword 

 Replace with your email and desired user password. 

Reference 

Dspace Geek

https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts

Installation of DSpace 6.3 on Ubuntu 20.04 LTS

 Installation of prerequisite applications


·                     Java Development Kit (JDK)

·                     PostgreSQL Database

·                     DSpace Software

·                     Apache Ant (Pure Java Build Tool)

·                     Apache Maven (Apache Build Automation Tool for Java Projects)

·                     Apache Tomcat (Web Server for hosting Dspace)

 

Open Applications > Accessories > Terminal and execute the following commands.

 

 

1.      Log in as Root

 sudo su 

Enter password…..

·                     Update the Ubuntu : apt-get update

·                     Upgrade the Ubuntu : apt-get upgrade

·                     Install OpenJDK 8 : apt-get install openjdk-8-jdk

·           Apache Maven 3.x (Java build tool) and Apache ant : apt-get install ant maven

·                     Relational Database (PostgreSQL) : apt-get install postgresql

2.    Create Dspace user

      useradd -m dspace

      passwd dspace [enter a password for the new user dspace]

      mkdir /dspace

      chown dspace /dspace

  3. Configure Postgresql and create database

- Create the PostgreSQL "dspace" user

Log in to postgresql:

sudo su postgres

Next, we will create a database called “dspace” and database user called “dspace” with password “dspace”. Don’t confuse database user with normal user. Both are different.

createuser -U postgres -d -A -P dspace

Enter password for new role: ## Enter password for the user dsapce

Enter it again: ## Re-enter password

If asked the following:

Shall the new role be allowed to create more new roles? (y/n) y

Answer "y" for yes.

Than type exit and come to root

Open up the /etc/postgresql/12/main/pg_hba.conf file:

nano /etc/postgresql/12/main/pg_hba.conf

Add the following line shown in red color at last of the file.

local all dspace md5

Type the following to restart:

/ETC/INIT.D/POSTGRESQL RESTAR

4.Create the postgreSQl “dspace” database

 Login as:

sudo su dspace

createdb -U dspace -E UNICODE dspace

Than type exit and come to root

sudo su postgres

Now type the following command to create extension pgcrypto

PSQL --USERNAME=POSTGRES DSPACE -C "CREATE EXTENSION PGCRYPTO;"

Type the following to restart postgres:

/ETC/INIT.D/POSTGRESQL RESTART  

NOTE: while deleting or creating the database log in to the concern user, like for dspace user (sudo su dspace) than apply the commands 

exit    

 GO TO ROOT

 

5.Create dspace directory

mkdir /build

chmod -R 777 /build

cd /build

6. Download Dspace to/build directory

You can check latest version of Dspace from here.

Run the command mentioned below at command prompt. (Ensure that Internet is working).

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

tar -zxf dspace-6.3-src-release.tar.gz

cd /build/dspace-6.3-src-release

mvn -fn package

(Please note in case of build failure delete the following lines from /build/dspace-6.0-src-release/dspace-api/pom.xml its due to some known Bug)

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>buildnumber-maven-plugin</artifactId>

<version>1.4</version>

<executions>

<execution>

<phase>validate</phase>

<goals>

<goal>create</goal>

</goals>

</execution>

</executions>

</plugin>

cd dspace/target/dspace-installer

ant fresh_install

7.Inastallation of Tomcat 

Download the and extract the Tomcat package,

cd /opt

sudo wget http://apachemirror.wuchna.com/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz

Or you can visit the Tomcat website and download the latest package.

8. Extract Tomcat package


sudo tar xvzf apache-tomcat-9.0.37.tar.gz

9. Rename folder "apache-tomcat-9.0.37" to "tomcat" and Delete the Tomcat archive file from /opt folder

sudo mv apache-tomcat-9.0.37 tomcat

sudo rm apache-tomcat-9.0.37.tar.gz

Open the following file,

10. Configure Tomcat

sudo nano /etc/profile
Setup environment variables

Environment variables to find JAVA.

Add following lines at the bottom of the file,

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export CATALINA_HOME=/opt/tomcat

Copy Dspace web apps files to Tomcat folder

sudo cp -r /dspace/webapps/* /opt/tomcat/webapps

Running Tomcat automatically

You can set up to start the Tomcat server start automatically at the time of system turn on.

Open the following file in a Terminal,

sudo nano  /etc/init.d/tomcat

Add following lines in the file,

#!/bin/bash
### BEGIN INIT INFO
# Provides:        tomcat8
# Required-Start:  $network
# Required-Stop:   $network
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
 sh /opt/tomcat/bin/startup.sh
}

stop() {
 sh /opt/tomcat/bin/shutdown.sh
}

case $1 in
  start|stop) $1;;
  restart) stop; start;;
  *) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac


save and close the file.

Apply the following commands too;

sudo chmod +x /etc/init.d/tomcat

      sudo update-rc.d tomcat defaults

Restart Tomcat server and PostgreSQL database

sudo service tomcat start

sudo service tomcat stop

sudo service tomcat restart

sudo /etc/init.d/postgresql restart

sudo /etc/init.d/tomcat restart

11. Make an initial administrator account (an e-person) in DSpace:

Apply following command in a terminal,

sudo /dspace/bin/dspace create-administrator

It will ask to enter the email address for the user login.
Enter an email address (e.g. dspace@localhost).
Enter First name and surname (e.g. dspace)
Enter a password.

Open DSpace in your browser
DSpace has two interfaces; xmlui and jspui. You can load either one Dspace interface in a browser.

http://localhost:8080/xmlui
http://localhost:8080/jspui

Reference:- http://kohageek.blogspot.com/

                      http://libtechnophile.blogspot.com/

 

 

 

 

 

How to Add Recent submission Page on dspace opac

Recent Submission count no. add

Open the terminal
Follow the command

1. gedit /dspace/config/dspace.cfg

Open the file and search Recent submission Count

Add How many submission you want to add


Ex- I choose 20 count


Save and close the file

How to Remove top news and side news bar

Remove Top news bar

1. Open the trerminal

Sudo su
password

Follow the the command
2. Go to the home.jsp file
 gedit /dspace/webapps/jspui/home.jsp 

3. Remove this  selected Portion
 



Then save and close the file

How to edit Top and Side bar News in dspace jspui interface

1. Login Dspace With email and Password

2. Go Administration->General setting->Edit news

3. Edit Top news and Sidebar news 

4.  Top news as example

<h3>DSpace is Live</h3><p>Welcome to our digital repository of My University research!</p><p>More exciting news to appear here.</p>

5. Side bar news as a Example
<!DOCTYPE html><html><head><style>table, th, td {border: 1px solid black;}</style></head><body><table align="center" style="background-color:#d9f6ff" width="100%" cellpadding="2"><tr><td align="center" style="border: 1px solid black" bgcolor="green" colspan="2"><b><font color="white">Useful Links</font></b></td> </tr><tr align="center"><td style="border: 1px solid black"><a href="http://www.rieajmer.raj.nic.in/Home/HomePage.aspx" target="blank">About RIE Ajmer</font></a></td><td style="border: 1px solid black"><a href="http://172.30.2.40/library/wordpress/" target="blank">About Library RIE Ajmer</font></a></td> </tr><tr align="center"><td style="border: 1px solid black"><a href="https://shodhganga.inflibnet.ac.in/" target="blank"> ShodhGanga</font></a></td><td style="border: 1px solid black"><a href="https://shodhgangotri.inflibnet.ac.in/" target="blank"> ShodhGangotri</font></a></td></tr><tr align="center"><td style="border: 1px solid black"><a href="http://ncert.nic.in/" target="blank">NCERT</font></a></td><td style="border: 1px solid black"><a href="http://ncert.nic.in/textbook/textbook.htm" target="blank">NCERT Textbooks</font></a></td></tr><tr align="center"><td style="border: 1px solid black"><a href="http://ncert.nic.in/statebooks/state_ebooks.html" target="blank">NCERT State Textbook</font></a></td><td style="border: 1px solid black"><a href="http://ncert.nic.in/vocational/vocational.htm" target="blank">NCERT Vocational Textbooks</font></a></td></tr><tr align="center"><td style="border: 1px solid black"><a href="https://ncertbooks.ncert.gov.in/login" target="blank">NCERT Online Textbook</font></a></td><td style="border: 1px solid black"><a href="http://epathshala.nic.in/" target="blank">NCERT e-Pathshala</font></a></td></tr><tr><td align="center" style="border: 1px solid black" colspan="2"><a href="https://ndl.iitkgp.ac.in/" target="blank">National Digital Library of India</font></a></td> </tr><tr><td align="center" bgcolor="green" colspan="2"><b><font color="#FFFFFF">Submission Guidelines</font></b></td></tr><tr align="center"><td><a href="#" target="blank">Submission Guidelines</font></a></td><td><a href="http://www.sherpa.ac.uk/romeo/" target="blank">SHERPA Copyright</font></a></td></tr><tr align="center"><td style="border: 1px solid black"><a href="http://172.30.1.157:8080/jspui/feed/rss_1.0/site" target="blank">Latest Submissions (RSS Feed)</font></a></td><td style="border: 1px solid black"><font color="#FFFFFF"><a href="http://172.30.1.157:8080/jspui/help/index.html" target="blank">DSpace-Help</font></a></font></td></tr><tr><td align="center" style="border: 1px solid black" colspan="2"><a href="http://www.rieajmer.raj.nic.in/Home/ContactUs.aspx" target="blank">Contact Us</font></a></td></tr></table></body></html>



Change the site name (Institute IR)

Open the terminal

sudo su
password
 Go the dspace configration file

gedit /dspace/config/dspace.cfg


 Change The Name
Ex- IR@M.G.University

Save and Close the file

How to change the header image in Dspace JSPUI page/Interface



 1. Prepare a header image and place in Dspace folder

Ex-header.jpg 

ex - cp header.jpg /dspace/webapps/jspui/image
   
2. Hide Dspace brand heading
  Open header-default.jsp file using Terminal. Apply following commands


gedit /dspace/webapps/jspui/layout/header-default.jsp
 Replace this portion for header image setting

<div class="container banner">
    <div class="row">
        <div class="col-md-9 brand">
            <h1><fmt:message key="jsp.layout.header-default.brand.heading" /></h1>
            <fmt:message key="jsp.layout.header-default.brand.description" />
        </div>
        <div class="col-md-3"><img class="pull-right" src="<%= request.getContextPath() %>/image/logo.gif" alt="DSpace logo" />
        </div>
    </div>
</div> 


Replace
<main id="content" role="main">
<p align="middle" topmargin="0"><img src="/jspui/image/header.jpg" width=1135"></P>



Save and close the file.