Reputation: 151
Hi I'm a fairly new programmer whos trying to install Solr on Windows 10
i download Solr from http://mirror.fibergrid.in/apache/lucene/solr/6.2.1
The only two requirements are a Solr release and Java 1.8 or later. I have installed Solr, and also verified my java -version to see what my java version is, which is 1.8.0_60.
I have went to the solr/solr/example
folder, which looks fine. Then I use java -jar start.jar
I am facing below issue:
Unable to access jarfile start.jar
Why is this doing this? My java version is as up to date as it says it should be?
Upvotes: 1
Views: 6537
Reputation: 8516
Below are the steps for setting up the Solr 7.4 (With SQL Server as data source) and explore the features of solr.
Download the solr 7.4 distribution from the below link
Extract the Solr distribution archive to your local home directory, for instance say F:\solr-7.4.0
After extracting the solr distribution zip file, the folder structure would be like F:\solr-7.4.0..
Download the Java Jdk 8 and install the jdk.
After installing the jdk, jdk and jre will be installed in the path C:\Program Files\Java.. (as shown in the screenshot below).
Also, make sure the java.exe file is present in the path C:\Program Files(x86)\Common Files\Oracle\Java\javapath\bin.. (Screenshot below)
Environment Variables Change for Javapath setup:-
Create variable with name ‘Path’ under ‘User variables’ section if not already exists.If variable with name ‘path’ already exists under ‘User Variables’ section , select the variable ‘Path’ and click ‘edit’ and add the entry ‘C:\Program Files\Java\jdk1.8.0_351\bin’ (Screnshot below).
Similarly, Create variable with name ‘JAVA_HOME’ under ‘System variables’ section if not already exists. If variable with name ‘JAVA_HOME’ already exists under ‘System Variables’ section , select the variable ‘JAVA_HOME’ and click ‘edit’ and add the entry ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath’ (Screnshot below).
Make sure the ‘apache-solr-dataimporthandler-..’,’mssql-jdbc-..’ and ‘sqljdbc42’ jar files are present in the location ‘F:\solr-7.4.0\solr-7.4.0\contrib\dataimporthandler’ (Screenshot below). These files are used for extracting the data from sql server database
Open the ‘solr.cmd’ command file under ‘F:\solr-7.4.0\solr-7.4.0\bin’ search for the text ‘log4j2’ and set the LOG4J_CONFIG path as below. (Screenshot also attached below).
set “LOG4J_CONFIG=file:///%SOLR_HOME%\server\resources\log4j2.xml”
Note:- (imp) If we don’t set the log4j2.xml path as above in the step 9, we will get the exception as shown below when we start the solr. Don’t forget to configure the step 10.
Now navigate to the bin folder of the solr (F:\solr-7.4.0\bin) and run the below command. (screenshot below)
Solr start
You can now see the solr is running on port 8983. Now, open the browser of your preference (say edge) and type http://localhost:8983/ and you should see solr running. (screenshot below).
You can also run solr at different port number if needed. (say 80). To do this, navigate back to command prompt and run ‘solr stop -all’. This command will stop all the running instances of solr. Now run ‘solr start -p 80’. (this command will run the solr instance in port 80) (screenshot below).
Upvotes: 0
Reputation: 41
I hope your problem is resolved but still if anyone trying to use Solr on Windows then I followed below steps for Solr8.5.2 -
Upvotes: 1
Reputation:
I will explain the approach on Widows 10 for solr-6.2.1:
Navigate to the solr-6.2.1 file and see whether you have below contents?
C:\Users\userName\Downloads\solr-6.2.1\solr-6.2.1\bin>ls
init.d oom_solr.sh solr solr.in.cmd
install_solr_service.sh post solr.cmd solr.in.sh
Once you see solr
you can smile :) and try this!!
C:\Users\Shivasai\Downloads\solr-6.2.1\solr-6.2.1\bin>solr start
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
After this you just have to access solr in bowser by localhost://8983
Upvotes: 3
Reputation: 31
You probably downloaded the source version, which doesn't include the start.jar file, try this one: http://mirror.fibergrid.in/apache/lucene/solr/6.2.1/solr-6.2.1.zip
Upvotes: 0