Install D Space
Install D Space
Install D Space
sudo -i -u postgres
Enter the password for new role: [Enter a password e.g. dspace]
Shall the new role be allowed to create more new roles? (y/n) n
Type exit
[If the following command not open, check the postgresql version number and apply in the
command]
Restart PostgreSQL :
sudo su
/etc/init.d/postgresql restart
1
Create the PostgreSQL 'dspace' database
sudo su postgres
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
exit
Create a directory to build, give all permissions and Download DSpace into /build directory
sudo mkdir /build && sudo chmod -R 777 /build && cd /build && sudo wget
https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-
release.tar.gz
You can find the latest updated of Dspace 6.x version from this page and copy the link to
download the latest version.
Remove the following group of codes. Carefully check the lines in the file.
<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>
2
</execution>
</executions>
</plugin>
Installation of DSpace
Enter into the Dspace package folder and apply the following commands one by one.
cd /build/dspace-6.3-src-release
sudo mvn -U package
cd dspace/target/dspace-installer && sudo ant fresh_install
Installation of Tomcat
Or you can visit the Tomcat website and download the latest package.
Rename folder "apache-tomcat-9.0.37" to "tomcat" and Delete the Tomcat archive file from
/opt folder
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export CATALINA_HOME=/opt/tomcat
Copy Dspace web apps files to Tomcat folder
3
Running Tomcat automatically
You can set up to start the Tomcat server start automatically at the time of system turn on.
#!/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
sudo service tomcat start && sudo service tomcat stop && sudo service tomcat restart && sudo
4
/etc/init.d/postgresql restart && sudo /etc/init.d/tomcat restart
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.
http://localhost:8080/xmlui
http://localhost:8080/jspui