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
- apt-get update
- sudo apt-get install tomcat9
- Install OpenJDK URL: http://openjdk.java.net/install/ (sudo apt-get install openjdk-11-jre)
- Install Maven URL: http://maven.apache.org/download.html
- cd /opt
- wget https://dlcdn.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.zip
- unzip apache-maven-3.8.3.zip
- Add following line in /etc/environment
- 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"
- JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
- export PATH=/opt/apache-maven-3.8.3/bin:$PATH
- Install Apache Ant URL :http://ant.apache.org/ (sudo apt-get install ant)
- Solr Install wget https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz
- tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2
- sudo bash ./install_solr_service.sh solr-8.11.2.tgz -i /opt -d /var/solr -u solr -s solr -p 8983
- Install Postgresql (apt-get install postgresql postgresql-client postgresql-contrib libpg-java)
- /etc/postgresql/11/main/postgresql.conf listen_addresses = 'localhost'
- nano /etc/postgresql/11/main/postgresql.conf shared_buffers = 1024MB
- service postgresql restart
- /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
- service postgresql restart
- Creating the user “dspace” and the DBs “dspace” PostgreSQL
- sudo -u postgres psql
- postgres=# create database dspace;
- postgres=# create user dspace with encrypted password 'mypass';
- postgres=# grant all privileges on database dspace to dspace;
- service postgresql restart
- We connect to the PostgreSQL database server and enter the PostgreSQL shell.
- psql -U postgres -d dspace
- Set password for user “dspace” (specify your option):
- ALTER ROLE dspace WITH PASSWORD 'XXXXXX';
- Let the user “dspace” be the owner of the database “dspace”
- ALTER DATABASE dspace OWNER TO dspace;
- Give all privileges to the “dspace” database to “dspace”
- GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;
- Add the “crypto” extension to the “dspace” database.
- CREATE EXTENSION pgcrypto;
- Exit the shell of the database.
- \q
- If perl not exists install perl (sudo apt-get install perl)
- sudo useradd -m dspace
- sudo passwd dspace
- sudo mkdir /dspace
- sudo chown dspace /dspace
- sudo mkdir /build
- sudo chmod -R 777 /build
- cd /build
unzip dspace-7.1.zip
cd /build/dspace-7.1
mvn -U package
mvn -U package
cd /build/dspace-7.1/dspace/target/dspace-installer
ant fresh_install
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
- /dspace/bin/dspace database migrate
- /dspace/bin/dspace create-administrator
- /etc/init.d/tomcat9 restart
- 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 |