- Change the value of the following line in etc\jetty.xml:
When this value has been changed, the java -jar start.jar command will launch Solr on the new port.<Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
- Change the port as a command line option:
C:\solr-4.8.1\example>java -jar start.jar -Djetty.port=9999
- Set up as a service using https://github.com/serbrech/SolrWindowsService, which allows defining the port in configuration. See http://alsagile.com/post/25153448145/running-solr-as-a-windows-service, which shows the configuration options.
Note that if you change the port, and you want to work through the Solr tutorial, you will need to change all the example links, which are all written with port 8983, and you will need to specify the new port when uploading documents using post.jar:
C:\solr-4.8.1\example>
java -Durl=http://localhost:9999/solr/update -jar post.jar solr.xml monitor.xml
The " portion in order to get the post.jar utility to work with the new port number.
-Durl
bit needs to come before the "-jar post.jar
Was looking for where it sets the port! Thanks!
ReplyDelete