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 firstname.lastname@example.org
- 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 configure the Apache Solr server?
The BitNami Apache Solr Stack contains an example configuration in the installdir/apache-solr/solr folder. You can configure the conf/schema.xml and conf/solrconfig.xml files.
You can find a Drupal 7 with Solr configuration example at http://blog.bitnami.org/2012/05/new-bitnami-apache-solr-stack.html.
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
If Solr have been installed as root, it's necessary to run commands below as solr. For example:
$ sudo -u solr bin/solr -e techproducts
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
Since version 5.0, scripts have more funcionality. For example, to launch "techproducts" example, you should do:
$ cd installdir/apache-solr $ bin/solr -e techproducts
If you want to create a core:
$ cd installdir/apache-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.