Solr is a open source Enterprise Search Engine. It can be deployed as war file in servlet containers like tomcat or jetty.
This short howto show you run solr with the current Tomcat 7 version:
- Download Solr as Zip
- Unzip it e.g. in /usr/share/ with folder structure
- mv apache-solr-3.5.0.zip /usr/share
- cd /usr/share
- unzip apache-solr-3.5.0.zip
- result is a folder /usr/share/apache-solr-3.5.0
- Create a new folder e.g /usr/share/solr as base folder for the configuration
- cp -a /usr/share/apache-solr-3.5.0/example/solr /usr/share/solr
- cp /usr/share/apache-solr-3.5.0/dist/*.war /usr/share/solr
- ln -s /usr/share/solr/apache-solr-3.5.0.war /usr/share/solr.war
- mkdir /usr/share/solr/data< for index data/li>
- mkdir /usr/share/solr/lib for additional jars
- cp /usr/share/apache-solr-3.5.0/dist/apache-solr-velocity-3.5.0.jar /usr/share/solr/lib
- cp -a /usr/share/apache-solr-3.5.0/contrib/ /usr/share/solr/
- nano /usr/share/solr/conf/solrconfig.xml and change the lib settings
- chown -R tomcat:tomcat /usr/share/solr if tomcat server runs as user tomcat
- Add URIEncoding to tomcat connector settings
- nano /usr/share/tomcat7/conf/server.xml
- search for the connector on port 8080
- add the URIEncoding like this:
- Create a tomcat configuration file for solr (CATALINA_HOME is /usr/share/tomcat7)
- cd /usr/share/tomcat7/conf
- mkdir Catalina (if not exists)
- cd Catalina
- mkdir localhost (if not exists)
- cd localhost
- nano solr.xml
- Paste the following configuration and save the file
- Set properties for tomcat and solr inside /usr/share/tomcat7/bin/setenv.sh
- Paste the following configuration and save the file
export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/usr/share/solr"
export JAVA_OPTS="$JAVA_OPTS -Dsolr.data.dir=/usr/share/solr/data"
export JAVA_OPTS="$JAVA_OPTS -Dsolr.velocity.enabled=true"
- (Re)start tomcat
- /etc/init.d/tomcat7 restart
- Open browser and go to http://YOUR_SERVER_HOSTNAME:8080/solr/admin/ assuming that tomcat runs under default port 8080
I use the provided sample xml files to see if import and query functionality works:
- cd /usr/share/apache-solr-3.5.0/example/exampledocs
- nano post.sh
- change the URL parameter to your environment e.g. to URL=http://localhost:8080/solr/update
- ./post.sh *.xml
- Open the admin ui under http://YOUR_SERVER_HOSTNAME:8080/solr/admin/
- click the search button
see my follow up post for Configuring solr, tomcat 7 with mod_jk and apache 2.2
JEE based projects with maven build artifacts like war or ear files is the cargo plugin the right choice for automatic deployments during the build process.
First step is to define in the build section of your pom.xml the cargo plugin:
Notice the variables with the url and the credentials. The will filled with the used profile section for the build:
The activeByDefault settings marks the remote section as default profile if nothing is set by command line parameters.
you first undeploy the current application and then deploy the new build application to the remote tomcat instance. The command line parameter-Ptomcat6x_ide force maven to use the local tomcat instance for deployments.
mvn -Ptomcat6x_ide org.codehaus.cargo:cargo-maven2-plugin:redeploy
Hudson or Jenkins as continuous integration server can then be setup to use a primary project with the goal “clean deploy” to have a full test and maven repo deployment on success. The seconday project have the goal “clean package org.codehaus.cargo:cargo-maven2-plugin:redeploy -Dmaven.test.skip=true”. Inside the configuration of the primary job is the section with post build actions. Define here the secondary project to be build only on success of the primary build. Deployments can go wrong and should not have any effect on the primary build. Build trigger for the primary project is source code changes checked every minute (“* * * * *” as time plan). Changes by each developer force a complete junit and integration test of the module and new deployed artifacts inside the maven repo like nexus for the rest of the team. A little bit later is then the new application ready to use. With different profiles is it possible to define DEV,QA and PROD target server inside one maven project pom.
Tomcat needs credentials of a user with explicit rights granted for successful remote deployments. See the following excerpt of the tomcat-user.xml inside the conf folder of your tomcat instance:
Centos recently published v6.2.
Out of the box is Firefox 3.x and no Google Chrome installed.
Steps to install Google Chrome 16 (as root)
Steps to install Firefox 9 (as before as root).
To install the Virtual box Guest Additions:
- yum update
- yum install gcc
- yum install kernel-devel
- Mount Guest Additions iso image
- Run autostart on the cd
- Enter root password
- After install reboot vm
I had recently updated my Samsung Galaxy S2 via Kies to Android 2.3.6 with vodafone branding. So far seems to be all working but GPS based Apps fails because of missing satellite fix. Looking around at twitter i found one tweet and with this several forums:
Android Hilfe (german)
Vodafone Germany (german): 1 / 2
The short term solution is to install the “GPS Test” app from the market and do the following steps:
- Hold the power button (optional)
- Disable data transfer (optional)
- Enable GPS
- Start GPS Test
- Go to settings
- Push “Clear AGPS” button
- Push “Update AGPS” button
- Press home button
- Start GPS based app like Google Maps…
Vodafone UK had a seperate topic
to notify customers with updates to the problem.
Other solution for vodafone customers is to root their phone, make an debranding and update to latest official firmware without any guarantee. SGS2 without branding seems to be not affected by that bug.
the bug on server/provider side. Seems to be now working.
For the latest eclipse release 3.7 called indigo is a plugin available to watch and control your build server based on hudson or jenkins. It is part of mylyn 3.5 as a view called “Builds”. See here for more information about the new features of mylyn 3.5. Their is as well a commercial plugin suite called tasktop available.
- Go to help -> install new software
- Click on “Available software sites”
- Click on add with name “mylyn” and url “http://download.eclipse.org/mylyn/releases/latest”
- Click ok to go back to site list
- Click ok to go back to available software
- Choose under “Work with” mylyn
- Choose under “Mylyn integrations” the point “Mylyn Builds Connector: Hudson/Jenkins (Incubation)”
- Choose under “Mylyn SDKs and Frameworks” the point “Mylyn Builds (Incubation)”
- Click on next
- Go through install process and restart eclipse
- Choose from menu “Window” -> “show view”
- Choose “Mylyn” -> “Builds”
With the blue server icon on the left side of the title bar you can add a new build server. Choose “Hudson” inside the wizard and click next. Enter the url of your jenkins server and enter a label. Click on refresh at the right side under build plans. Choose your favorite builds and click on finish. After that you should have a view similar to the one above. You can start a new build and get updates as notification during the build process.