Search

dSpace 7.1 Install on Debian 10 OS

  • Share this:
post-title

DSpace 7 Install on Debian 10

Step 1: Update Source List

deb http://ftp.ua.debian.org/debian/ buster main contrib non-free

deb-src http://ftp.ua.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/ buster / updates contrib main

deb-src http://security.debian.org/ buster / updates contrib main

deb http://ftp.ua.debian.org/debian/ buster-updates contrib main non-free

deb-src http://ftp.ua.debian.org/debian/ buster-updates contrib main non-free

 

deb http://ftp.us.debian.org/debian buster main contrib non-free
deb-src http://ftp.us.debian.org/debian buster main contrib non-free

Run Following Commands

  1. apt-get update
  2. sudo apt-get install tomcat9
  3. Install OpenJDK URL: http://openjdk.java.net/install/ (sudo apt-get install openjdk-11-jre)
  4. Install Maven URL: http://maven.apache.org/download.html
    1. cd /opt
    2. wget https://dlcdn.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.zip
    3. unzip apache-maven-3.8.3.zip
    4. Add following line in /etc/environment
      1. JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
        JRE_HOME="/usr/lib/jvm/java-11-openjdk-amd64/jre"
        CATALINA_HOME="/usr/share/tomcat9"
        CATALINA_BASE="/var/lib/tomcat9"
        TOMCAT_HOME="/usr/share/tomcat9"
        JAVA_OPTS="-Xms2048m -Xmx7168m -Dfile.encoding=UTF-8"
        CATALINA_OPTS="-server -Xms384M -Xmx512M"
  5. export PATH=/opt/apache-maven-3.8.3/bin:$PATH
  6. Install Apache Ant URL :http://ant.apache.org/ (sudo apt-get install ant)
  7.  Solr Install wget https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz
    1. tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2
    2. sudo bash ./install_solr_service.sh solr-8.11.2.tgz -i /opt -d /var/solr -u solr -s solr -p 8983
  8. Install Postgresql (apt-get install postgresql postgresql-client postgresql-contrib libpg-java)
    1. /etc/postgresql/11/main/postgresql.conf   listen_addresses = 'localhost'
    2. nano /etc/postgresql/11/main/postgresql.conf    shared_buffers = 1024MB
    3. service postgresql restart
    4. /etc/postgresql/11/main/pg_hba.conf  replace local all postgres peer with local all postgres trust and local all all peer with local all all md5
    5. service postgresql restart
  9. Creating the user “dspace” and the DBs “dspace” PostgreSQL
    1. sudo -u postgres psql
    2. postgres=# create database dspace;
    3. postgres=# create user dspace with encrypted password 'mypass';
    4. postgres=# grant all privileges on database dspace to dspace;
    5. service postgresql restart
    6. We connect to the PostgreSQL database server and enter the PostgreSQL shell.
    7. psql -U postgres -d dspace
    8. Set password for user “dspace” (specify your option):
    9. ALTER ROLE dspace WITH PASSWORD 'XXXXXX';
    10. Let the user “dspace” be the owner of the database “dspace”
    11. ALTER DATABASE dspace OWNER TO dspace;
    12. Give all privileges to the “dspace” database to “dspace”
    13. GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;
    14. Add the “crypto” extension to the “dspace” database.
    15. CREATE EXTENSION pgcrypto;
    16. Exit the shell of the database.
    17. \q
  1. If perl not exists install perl (sudo apt-get install perl)
  2. sudo useradd -m dspace
  3. sudo passwd dspace
  4. sudo mkdir /dspace
  5. sudo chown dspace /dspace
  6. sudo mkdir /build
  7. sudo chmod -R 777 /build
  8. cd /build
  1. wget https://github.com/DSpace/DSpace/archive/refs/tags/dspace-7.1.zip
  1. unzip dspace-7.1.zip
  2. cd /build/dspace-7.1
  3. mvn -U package
  4. mvn -U package
  5. cd /build/dspace-7.1/dspace/target/dspace-installer
  6. ant fresh_install
  7. Create file in /etc/tomcat9/Catalina/localhost/server.xml
<>
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/server" 
    docBase="/dspace/webapps/server"
    />

or

sudo cp -R /dspace/webapps/* /var/lib/tomcat10/webapps

sudo cp -R /dspace/solr/* /var/solr/data

sudo chown -R solr:solr /var/solr/data

sudo systemctl restart solr

  1. /dspace/bin/dspace database migrate
  2. /dspace/bin/dspace create-administrator
  3. /etc/init.d/tomcat9 restart
  4. http://localhost:8080/server

dSpace Frontend Installation

Step 1: Node.js 14 Install

curl -fsSL https://deb.nodesource.com/setup_14.x | bash -

apt-get install -y nodejs

 

Step 2: Yarn (V1.x) Install

apt install npm

npm install --global yarn

 

Step 3: dspace-angular install

wget https://github.com/DSpace/dspace-angular/archive/refs/tags/dspace-7.1.zip

 

unzip dspace-7.1.zip

cd /build/dspace-angular/

 

yarn install

Step 4: Create a Production Configuration file at [dspace-angular]/src/environments/environment.prod.ts.

export const environment = {

// The "ui" section defines where you want Node.js to run/respond. It often is a *localhost* (non-public) URL, especially if you are using a Proxy.

// In this example, we are setting up our UI to just use localhost, port 4000.

// This is a common setup for when you want to use Apache or Nginx to handle HTTPS and proxy requests to Node on port 4000

ui: {

ssl: false,

host: 'localhost',

port: 4000,

// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript

nameSpace: '/'

},

// This example is valid if your Backend is publicly available at https://api.mydspace.edu/server/

// The REST settings MUST correspond to the primary URL of the backend. Usually, this means they must be kept in sync

// with the value of "dspace.server.url" in the backend's local.cfg

rest: {

ssl: true,

host: 'api.mydspace.edu',

port: 443,

// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript

nameSpace: '/server'

}

};

Build the User Interface for Production. This uses your environment.prod.ts and the source code to create a compiled version of the UI in the [dspace-angular]/dist folder

yarn run build:prod

 

 

 

 

Yusuf Khalil

Yusuf Khalil