Quick reference card
|Cloud Servers||Virtual Machines||Native Installers|
|System user account||solr||solr||solr|
|Service control||sudo /opt/bitnami/ctlscript.sh start|stop|restart solr||sudo /opt/bitnami/ctlscript.sh start|stop|restart solr||install_dir/ctlscript.sh start|stop|restart solr|
How to start/stop the Apache Solr server?
You can use the "ctlscript.sh" utility which is in the installation directory.
$ ./ctlscript.sh start solr
On OS X: There is a "control" graphical tool in the installation directory or you can use the "ctlscript.sh" utility from a Terminal.
host:~ user$ cd /Applications/application-version host:~ user$ ./ctlscript.sh start solr
The Solr server is running in the 8983 port by default. If you are trying to connect your remote application to the Solr server, check that you have not any firewall running in that port. If you are runing it in Amazon EC2, check that your security group has this port open. You get more info about how open a firewall port for Virtual Appliances.
How to access to Sorl Admin page?
1. Get your SSH private key if you don't have it already. More info
2. Create the tunnel.
- If you are in Linux or Mac you can run the following in a console in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):
$ ssh -N -L 18983:127.0.0.1:8983 -i bitnami-hosting.pem email@example.com
- If you are using Windows, you can use Putty:
- Follow the steps described here
- Before opening the connection. Go to Connection -> SSH -> Tunnels, enter the values below and click "Add" button:
- Source port: "18983"
- Destination: "localhost:8983"
- Click Open
3. While the tunnel is active you can connect to the web application at http://127.0.0.1:18983/solr/admin in your browser.
The default access port of Solr is closed by default for the Google Cloud Platform and the virtual machines and we only open the 80 and 443 ports so if you want to access to your server using that port you have to make some changes.
How to disable authentication in Apache Solr server?
In order to disable authentication in Apache Solr server, you have to edit the file installdir/apache-solr/conf/solr.conf by removing these lines:
<LocationMatch "^/(solr)/.*?"> AuthType Basic AuthName "Introduce your Apache Solr credentials. If you have problems visit: https://wiki.bitnami.com/Infrastructure_Stacks/Bitnami_Sol\ r_Stack" AuthBasicProvider file AuthUserFile installdir/conf/password Require user user </LocationMatch>
After that, restart apache using the following command:
host:~ user$ ./ctlscript.sh restart apache
How to enable the Apache Solr logs?
Since 3.X version, Apache Solr log files are not enabled by default. If you want to enable the log files, you can uncomment the following section in the installdir/apache-solr/etc/jetty.xml
<Ref id="RequestLog"> <Set name="requestLog"> <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog"> <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set> <Set name="filenameDateFormat">yyyy_MM_dd</Set> <Set name="retainDays">90</Set> <Set name="append">true</Set> <Set name="extended">false</Set> <Set name="logCookies">false</Set> <Set name="LogTimeZone">GMT</Set> </New> </Set> </Ref>
Getting started with Solr
In order to execute solr commands, first you need to execute the following:
$ sudo installdir/use_solr
Solr contains scripts to start, stop or restart. You can execute:
$ cd installdir/apache-solr $ bin/solr stop $ bin/solr status $ bin/solr start $ bin/solr restart
If you want to create a core:
$ cd installdir/apache-solr $ sudo -u solr bin/solr create -c CORE_NAME -p PORT_NUMBER
To add documents:
$ cd installdir/apache-solr $ bin/post -c CORE_NAME FILES
NOTE: Currently the
bin/post tool does not have a comparable Windows script, but the underlying Java program invoked is available. See the Post Tool, Windows section for details.