How to Install DSpace on NixOS Latest

DSpace is a digital repository software which can be used for managing and preserving digital content. In this tutorial, you will learn how to install DSpace on NixOS latest version.

Prerequisites

Installation Steps

  1. Open a terminal window on your NixOS machine.

  2. Install Git by running the command:

    sudo nix-env -iA nixos.git
    
  3. Clone DSpace repository by running the command:

    git clone https://github.com/DSpace/DSpace.git
    
  4. Navigate to the cloned repository directory:

    cd DSpace/
    
  5. Checkout the latest release stable branch:

    git checkout dspace-6.3
    
  6. Initialize the submodules by running the command:

    git submodule update --init --recursive
    
  7. Open the dspace/config/local.cfg file:

    nano dspace/config/local.cfg
    

    Uncomment the db.url line and replace the existing value with the following:

    db.url = jdbc:postgresql://localhost:5432/dspace?ssl=true&sslmode=require
    
  8. Save and exit the file by pressing Ctrl + X, then Y and Enter.

  9. Install PostgreSQL by running the command:

    sudo nix-env -iA nixos.postgresql
    
  10. Create a new PostgreSQL database:

sudo -u postgres createdb dspace
  1. Install Ant by running the command:
sudo nix-env -iA nixos.ant
  1. Build DSpace by running the command:
mvn package
  1. Install Tomcat by running the command:
sudo nix-env -iA nixos.tomcat
  1. Start Tomcat by running the command:
sudo systemctl start tomcat
  1. Deploy DSpace to Tomcat by running the command:
sudo ant deploy
  1. Restart Tomcat by running the command:
sudo systemctl restart tomcat
  1. Open a web browser and navigate to http://localhost:8080/xmlui/ to access DSpace.

Conclusion

Congratulations, you have successfully installed DSpace on NixOS latest version. You can now use DSpace for managing and preserving digital content.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!