Hello Nadeems, Some tutorials you find on the net are total mess. It will make things more complicated instead of making simpler and easier. You need to go back and remove Java and Solr and start over by following the steps you see below in the sequence you see them.
####################### Java OpenJDK 11 Installation ####################### 1) apt install default-jdk -y 2) java -version 3) echo "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/" >> /etc/environment 4) export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ ####################### End of Java OpenJDK 11 installation ####################### ####################### Apache Maven and Ant Installation ####################### 1) apt install maven ant ant-optional -y 2) mvn -v 3) ant -version ################### End of Apache Maven and Ant installation #################### ####################### Solr 8.11.1 Installation ####################### 1) mkdir /build 2) cd /build 3) apt install lsof -y 4) wget https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz 5) tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2 6) bash ./install_solr_service.sh solr-8.11.2.tgz -f 7) cp -r /opt/dspace/solr/* /var/solr/data/ # Do this step after installing dspace backend (REST API server). You need to change /opt/dspace to the folder you installed dspace backend into. 8) chown -R solr:solr /var/solr/data/ 9) systemctl enable solr 10) systemctl restart solr ####################### End of Solr 8.11.1 installation ####################### Good luck On Saturday, November 26, 2022 at 9:16:30 AM UTC+3 nadeems...@gmail.com wrote: > Dear All Friends, > I am installing Dspace 7 on cloud server Ubuntu 22.04. I am facing a > problem to starting solr: > when I run the command : > root@repository:~# cd /opt > root@repository:/opt# su dspace > $ /opt/solr/bin/solr start > The currently defined JAVA_HOME (”/usr/lib/jvm/java-11-openjdk-amd64”) > refers > to a location where Java could not be found. Aborting. > Either fix the JAVA_HOME variable or remove it from the > environment so that the system PATH will be searched. > > *While I am following the instruction as:* > Solr Installation > > Solr is an open-source search platform, written in Java. Its major > features include full-text search, hit highlighting, faceted search, > real-time indexing, dynamic clustering, database integration, NoSQL > features, and rich document handling. > > Download the Solr software package from the website and save it to the opt > folder in the operating system. > > Enter into the /opt folder. > > *cd /opt* > > Download the Solr (version 8) package using the following command line, > > *sudo wget > https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.1/solr-8.11.1.zip?action=download > > <https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.1/solr-8.11.1.zip?action=download>* > > Rename the Zip file, > > *sudo mv solr-8.11.1.zip\?action\=download solr-8.11.1.zip* > > Unzip the package, > > *sudo unzip solr-8.11.1.zip* > > Rename Solr directory > > *sudo mv solr-8.11.1 solr* > > Downloaded Solr ZIP files not required, delete it, > > *sudo rm solr-8.11.1.zip* > > Apply the following command to check Solr directory available at /opt > > *ls* > > Change the folder permission to Dspace user, > > *sudo chown -R dspace:dspace solr* > > Check whether the folder permission changed or not. > > *ls -la* > > Login to the dspace user account to start Solr. > > *su dspace* > > Start Solr by applying the command, > > */opt/solr/bin/solr start* > Please may anyone guide me how to reslove this error? > > With kindest regards, > ............................................ > *Nadeem Sohail* > Head > Learning Resource Center (LRC) > University of Management &Technology, Sialkot Campus > Site: http://www.skt.umt.edu.pk/lrc/Home.aspx > Email: nadeem...@skt.umt.edu.pk > Office Ph: +92 523575234-6 Ext. 118 > > > > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4bf50ec2-ce66-459e-acaf-52968b0d60dfn%40googlegroups.com.