Dspace 7 Installation On Windows 10

Prerequisites

  • Windows 10 (64-bit)
  • Java Development Kit (JDK) 11 or higher
  • Apache Maven 3.6.3 or higher
  • Git 2.20.1 or higher
  • PostgreSQL 12 or higher
  • Java Runtime Environment (JRE) 11 or higher

Step 1: Install Java Development Kit (JDK)

  1. Download the JDK 11 or higher from the official Oracle website: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
  2. Run the installer and follow the prompts to install the JDK.
  3. Set the JAVA_HOME environment variable:
    • Right-click on Computer or This PC and select Properties.
    • Click on Advanced system settings on the left side.
    • Click on Environment Variables.
    • Under System Variables, scroll down and find the New button.
    • Enter JAVA_HOME as the variable name and the path to the JDK installation directory (e.g., C:\Program Files\Java\jdk-11.0.7) as the variable value.
    • Click OK to close all the windows.

Step 2: Install Apache Maven

  1. Download Apache Maven 3.6.3 or higher from the official Apache website: https://maven.apache.org/download.cgi
  2. Extract the downloaded zip file to a directory of your choice (e.g., C:\Program Files\Apache Software Foundation\apache-maven-3.6.3).
  3. Set the M2_HOME environment variable:
    • Follow the same steps as in Step 1 to create a new environment variable.
    • Enter M2_HOME as the variable name and the path to the Apache Maven installation directory (e.g., C:\Program Files\Apache Software Foundation\apache-maven-3.6.3) as the variable value.
    • Click OK to close all the windows.
  4. Add Maven to the system's PATH:
    • Right-click on Computer or This PC and select Properties.
    • Click on Advanced system settings on the left side.
    • Click on Environment Variables.
    • Under System Variables, scroll down and find the Path variable.
    • Click Edit.
    • Click New and enter the path to the Maven bin directory (e.g., C:\Program Files\Apache Software Foundation\apache-maven-3.6.3\bin).
    • Click OK to close all the windows.

Step 3: Install Git

  1. Download Git 2.20.1 or higher from the official Git website: https://git-scm.com/download/win
  2. Run the installer and follow the prompts to install Git.
  3. Add Git to the system's PATH:
    • Follow the same steps as in Step 2 to add Git to the system's PATH.

Step 4: Install PostgreSQL

  1. Download PostgreSQL 12 or higher from the official PostgreSQL website: https://www.postgresql.org/download/
  2. Run the installer and follow the prompts to install PostgreSQL.
  3. Create a new database and user for DSpace:
    • Open a command prompt and run the following command: psql -U postgres
    • Create a new database: CREATE DATABASE dspace;
    • Create a new user: CREATE ROLE dspace WITH PASSWORD 'dspace';
    • Grant privileges to the new user: GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;
    • Quit the psql shell: \q

Step 5: Clone the DSpace 7 Repository

  1. Open a command prompt and navigate to a directory of your choice (e.g., C:\Users\username\Documents).
  2. Clone the DSpace 7 repository: git clone https://github.com/DSpace/DSpace.git
  3. Change into the cloned repository: cd DSpace

Step 6: Build and Install DSpace 7

  1. Build DSpace 7 using Maven: mvn clean package
  2. Install DSpace 7: mvn install

Step 7: Configure DSpace 7

  1. Create a new configuration file: copy config/dspace.cfg.example config/dspace.cfg
  2. Edit the configuration file: notepad config/dspace.cfg
    • Update the database settings:
      • db.name = dspace
      • db.user = dspace
      • db.password = dspace
    • Update the other settings as needed.

Step 8: Run DSpace 7

  1. Start the DSpace 7 server: mvn exec:java -Dexec.mainClass="org.dspace.app.launcher.DSpaceLauncher"
  2. Access DSpace 7 in your web browser: http://localhost:8080

Congratulations! You have successfully installed DSpace 7 on Windows 10.

Step-by-Step: Installing DSpace 7 on Windows 10 Setting up DSpace 7 on Windows 10 is a major leap forward for digital repository management, but it involves a complex dance of backend and frontend components. Unlike previous versions, DSpace 7 uses a modern Angular frontend that talks to a Java-based REST API backend

If you're ready to modernize your repository, here is the roadmap to get your local development or testing environment up and running. 1. Pre-Installation: System Requirements

Before starting, ensure your Windows 10 machine meets these minimum specs to avoid performance bottlenecks: Processor: 2 GHz dual-core or better. 8–12 GB RAM dspace 7 installation on windows 10

is recommended for DSpace 7. While 4 GB is the absolute minimum, it often leads to memory errors during bulk uploads or heavy use. 20 GB of free disk space. 2. The Dependency Checklist

DSpace 7 relies on a specific stack. Install these in order and add their folders to your Windows System Environment Variables Java JDK 11 or 17: (Oracle or OpenJDK). Set to your JDK path. Apache Maven 3.3+: For building the backend source code. Apache Ant 1.10+: For installing the built binaries. PostgreSQL (12.x to 17.x): The database engine. You must enable the extension on your DSpace database. Apache Solr 8.x: Handles searching and indexing. Apache Tomcat 9.x: The servlet container for the backend API. Node.js & Yarn: Required for the Angular frontend. 3. Backend Installation

The backend provides the API that stores and manages your data. Database Setup: Create a PostgreSQL user and database named . Use the command CREATE EXTENSION pgcrypto; within the Download the DSpace 7 source code and locate the folder. Rename local.cfg.EXAMPLE

and update the database credentials and installation directory (e.g., Build with Maven: mvn package from the source root to compile the code. Install with Ant: Navigate to dspace/target/dspace-installer ant fresh_install . This populates your installation directory. Deploy to Tomcat: folder from your installation's directory into Tomcat’s 4. Frontend (Angular) Installation This is the interface users will see. Install Dependencies: dspace-angular source folder, run yarn install Configuration: config.prod.yml config.dev.yml ) and point the host to your local Tomcat API (usually localhost:8080/server Build & Run: yarn build:prod to compile. On Windows, it is often best to use to manage the frontend process. Quick Tips for Success Admin Account: Don't forget to create your first user! Run dspace create-administrator directory of your installed backend. Solr Config:

Copy the Solr cores from your DSpace installation directory to the Solr server directory to enable search functionality. Easier Path: If this manual process feels daunting, consider Docker Desktop

. DSpace 7 has an official Docker setup that automates all these dependencies into containers, which is highly recommended for local testing on Windows. or setting up PM2 for the frontend 1 Minimum System requirements for DSpace installation

DSpace 7 represents a massive shift in architecture, moving to a modern Angular-based frontend and a REST API backend. Installing it on Windows 10 requires a specific environment to handle its Java and Node.js dependencies.

This guide provides a step-by-step walkthrough for a local development or evaluation installation. Prerequisites and Dependencies

Before starting, ensure your Windows 10 machine has at least 8GB of RAM (16GB recommended) and the following software installed:

Java Development Kit (JDK) 11 or 17: DSpace 7 requires a 64-bit JDK. Set your JAVA_HOME environment variable.

Apache Maven 3.6+: Used for building the backend source code.

Apache Tomcat 9: The servlet container to host the REST API. Prerequisites

PostgreSQL 12-15: The database engine. Ensure the 'pgcrypto' extension is available.

Node.js (v16 or v18) and NPM: Required for the Angular frontend. Yarn: The preferred package manager for the frontend. Git for Windows: To clone the repositories. Solr 8.11: The search and indexing engine. Step 1: Database Setup Open pgAdmin or use the psql command line. Create a new login role named dspace with a password.

Create a new database named dspace, owned by the dspace user.

Enable the pgcrypto extension on the dspace database:CREATE EXTENSION pgcrypto; Step 2: Configure Solr

DSpace 7 requires Solr to be running as a standalone service. Download Solr 8.11.x and extract it to C:\solr.

DSpace provides specific Solr cores. You will copy the config directories from the DSpace source code (once downloaded) to your Solr server's server/solr/configsets directory. Start Solr using the command line: bin/solr.cmd start. Step 3: Install the Backend (REST API)

Clone the Source: Open PowerShell and run:git clone -b dspace-7.6 https://github.com

Configure: Navigate to dspace/config/ and copy local.cfg.EXAMPLE to local.cfg. Edit local.cfg to set your: dspace.dir: e.g., C:/dspace db.url: Connection string for PostgreSQL. solr.server: http://localhost:8983/solr Build: In the root directory, run:mvn package

Install: Navigate to dspace/target/dspace-installer and run:ant fresh_install

Deploy to Tomcat: Copy the server webapp from your C:/dspace/webapps folder into the Tomcat webapps directory, renaming it to server.war. Step 4: Install the Frontend (User Interface) Clone the UI:git clone -b dspace-7.6 https://github.com

Install Dependencies: Navigate into the folder and run:yarn install

Configure Environment: Copy src/environments/environment.common.ts to src/environments/environment.dev.ts and ensure the rest settings point to http://localhost:8080/server. Start the UI:yarn start:dev Step 5: Finalizing the Installation Windows 10 (64-bit) Java Development Kit (JDK) 11

Create an Administrator: You must create the first user via the backend command line. Navigate to C:/dspace/bin and run:./dspace create-administratorFollow the prompts to set an email and password. Access the Site: Frontend: http://localhost:4000 Backend (API): http://localhost:8080/server Common Troubleshooting on Windows

Memory Issues: If Maven or Node.js crashes, increase the heap size using the NODE_OPTIONS=--max_old_space_size=4096 environment variable.

Path Lengths: Windows has a 260-character path limit. Try to keep your installation directories close to the drive root (e.g., C:/ds).

File Permissions: Ensure the user running Tomcat has full "Read/Write" permissions to the C:/dspace directory.

💡 Pro Tip: For a smoother experience on Windows 10, consider using WSL2 (Windows Subsystem for Linux) with Ubuntu. It handles DSpace dependencies much more natively than a direct Windows installation.

To help you get this running smoothly, would you like the specific PostgreSQL connection string format for your local.cfg or the Tomcat memory optimization settings for Windows?

Step 3: Install Apache Maven and Build Tools

  1. Extract the Maven zip (e.g., apache-maven-3.9.5-bin.zip) to C:\maven.
  2. Create environment variable:
    • MAVEN_HOME = C:\maven
    • Add %MAVEN_HOME%\bin to Path
  3. Test:
    mvn -version
    
    You should see Java version and Maven version.

Feature Proposal: DSpace 7 Windows Quick-Start Installation Guide

Solr (embedded by default in 7.x – no separate install needed)

solr.server = http://localhost:8983/solr

We'll start with embedded Solr (no extra config needed).

8.3 Initialize Database and Solr Indexes

Run the DSpace database migration tool:

cd C:\tomcat9\webapps
mkdir C:\dspace
cd C:\dspace-src
mvn antrun:run@initialize -Dconfig=C:\dspace-src\local.cfg

Wait for "BUILD SUCCESS". This creates tables in PostgreSQL and Solr cores.

Step 4: Install Apache Maven

DSpace uses Maven to build the backend.

  1. Download Maven 3.8.x from maven.apache.org.
  2. Extract to C:\maven.
  3. Set environment variables:
    • MAVEN_HOME = C:\maven
    • Add %MAVEN_HOME%\bin to Path
  4. Verify: mvn -version → should show Java 11.

Step 4: Install Node.js and Angular CLI

DSpace 7 uses an Angular 12+ front-end.

  1. Run the Node.js MSI installer – it will add Node and npm to your PATH.
  2. After installation, open a new command prompt and verify:
    node --version   (v18.x or later)
    npm --version
    
  3. Install Angular CLI globally:
    npm install -g @angular/cli@13.3.0
    
    (DSpace 7.6 works best with Angular 13.3.x)
  4. Optional but recommended: Install Yarn (DSpace UI uses Yarn internally):
    npm install -g yarn
    

Issue 3: Solr not starting – port 8983 busy

Solution: Run netstat -ano | findstr :8983 to find the process, then kill it or change Solr port in solr.in.cmd.