I'm kind of desperate now because I tried countless times to install Dspace 7 and I end up with the same error every time.
I tried with Centos 8, Debian 10/11, Ubuntu 21.04. I made sure only openJDK 11 was installed and used.
Maven home: /opt/maven
Java version: 11.0.12, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-305.19.1.el8_4.x86_64", arch: "amd64", family: "unix"
ANT_HOME="/opt/apache-ant-1.10.11"
PATH="$PATH:/opt/apache-ant-1.10.11/bin"
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64
export ANT_HOME
export PATH
# chmod +x /etc/profile.d/ant.sh
# source /etc/profile.d/ant.sh
# ant -version
Apache Ant(TM) version 1.10.11 compiled on July 10 2021
Solr
# tar xzf solr-8.10.1.tgz solr-8.10.1/bin/install_solr_service.sh --strip-components=2
# bash ./install_solr_service.sh solr-8.10.1.tgz
Tomcat
# groupadd tomcat
# useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
# tar xvzf apache-tomcat-10.0.12.tar.gz -C /opt/tomcat/
# chgrp -R tomcat /opt/tomcat
# chmod -R g+r /opt/tomcat/conf
# chmod g+x /opt/tomcat/conf
# chown -R tomcat /opt/tomcat/webapps/ /opt/tomcat/work/ /opt/tomcat/temp/ /opt/tomcat/logs/
# vim /etc/systemd/system/tomcat.service
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Xmx512M -Xms64M -Dfile.encoding=UTF-8'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
The connector in the /opt/tomcat/conf/server.xml file is:
<Connector port="8080"
minSpareThreads="25"
enableLookups="false"
redirectPort="8443"
connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="UTF-8"/>
# systemctl daemon-reload
# systemctl start tomcat // there should be no errors
# systemctl status tomcat // tomcat status should be active
# systemctl enable tomcat
PostgreSQL 11
# dnf -y install
https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm# dnf module disable postgresql
# dnf clean all
# dnf -y install postgresql11-server postgresql11 postgresql11-contrib
# /usr/pgsql-11/bin/postgresql-11-setup initdb
#systemctl enable --now postgresql-11
# sudo -u postgres psql -c "SELECT version();" // return psql 11
// The line `listen_addresses = 'localhost'` was uncommented in the file /var/lib/pgsql/11/data/postgresql.conf
// The line `host dspace dspace 127.0.0.1 255.255.255.255 md5` was added in the /var/lib/pgsql/11/data/file pg_hba.conf
# systemctl restart postgresql-11
# su postgres
# createuser dspace
# createdb dspace -E UNICODE
# psql -d dspace
# CREATE EXTENSION pgcrypto;
#ALTER ROLE dspace WITH PASSWORD 'XXXXX';
# ALTER DATABASE dspace OWNER TO dspace;
# GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;
# \l
# \q
# exit
# systemctl restart postgresql-11
Dspace 7
# cd /home/centos
# tar xvzf dspace-7.0.tar.gz
# mkdir /dspace
# cd /root/DSpace-dspace-7.0
# cp dspace/config/local.cfg.EXAMPLE dspace/config/local.cfg
# vim dspace/config/local.cfg
dspace.dir=/dspace
db.url = jdbc:postgresql://localhost:5432/dspace
db.username = dspace
db.password = XXXXX
# mvn package // no errors
# cd dspace/target/dspace-installer
# ant fresh_install // no errors
# cd /opt/tomcat/webapps/
# cp -R /dspace/webapps/server/* server/
# chown -R tomcat:tomcat server/
# systemctl restart tomcat
Test
Any idea why it doesn't work ?
A helping hand will be greatly appreciated ;)
Thanks !