How to Upgrade/Update the Solr-Jetty ubuntu package?
I am using Solr for my front-end webapp and in order to install it in Ubuntu 1开发者_Go百科0.04 I did a simply apt-get solr-jetty and everything was fine.
The problem now is that I need some new features of Solr that exist in the latest release of Solr, but the version of Solr in the ubuntu package is still at 1.4!
My question is how can I upgrade the Solr version to the latest? Can someone give me some tips how can I do that plz????
EDIT: or may how to make a clean install of Solr with Jetty..
EDIT: at the end wasn't so difficult to install Solr with an already installed Jetty in my VPS.In case that someone found it helpfull I followed the bellow steps:
- Placed the solr.war file in the Dist folder in the webapps folder of jetty
- Placed the example/solr folder into the /var/share/solr folder in my machine as the Solr home folder
- Edited the solrconfig.xml and schema.xml into my needs
- Finally in order Jetty knows where is the Solr Home Dir, I edited the Jetty file into the /etc/default directory, by uncomment the JAVA_OPTIONS var and add it the following option: JAVA_OPTIONS="-Dsolr.solr.home=/var/share/solr $JAVA_OPTIONS"
and that's it. I am not sure about the last step if it is the best way to do it but since Solr is working, should be the right way (solr documentation says something about JNDI lookup but I didn't manage to find it out).
Cheers
UPDATE: playing with a small ubuntu machine in digitalocean i found this very useful article on how to install the latest solr version in ubuntu. Disclaimer: i am not working or have any relationship with digitalocean..
The best way to deal with mission critical packages like this on Ubuntu, is to ignore the Ubuntu packaging system entirely, and that includes Launchpad. They are always lagging behind because to them, SOLR is not important. It is the same with Erlang, RabbitMQ, Python, etc. I try to build these packages from source myself, and install them outside of Ubuntu's system, either in /usr/local or in /home/packagename.
SOLR 3.2 is available for download from apache.org as a ready to run package named apache-solr-3.2.0.tgz
including jetty. You simply unzip wherever you want it. Change directories into the example directory and type java -jar start.jar
.
You can then change the schema.xml etc. to meet your needs.
Because this is a Java package you don't need to mess around with building from source, because the same compiled package will run anywhere that java is installed.
In addition to the xml files for configuring SOLR, you will have to look at .properties files to change the jetty configuration such as the port number used.
If you have Java developers at your company, there is another way to deal with this. Simply refuse to install SOLR, period. SOLR is a Java app. The Java developers already have a continuous integration system that collects dependencies, bundles them up into JARs or WARs and deploys them to production servers. Tell them to take care of SOLR the same way. It is not much work for a Java developer to set this up because there is no coding to do, just packaging. Then you manage deployment of configuration changes the same way you would do it for any other Java app.
Only use the Ubuntu packages (or any other distro's packages) to play around and evaluate tools. When a tool becomes mission critical to your business, take control of it and deal with the "upstream developers" directly. No need for distro middlemen to muddy the waters.
the most straightforward way: file a merge request at launchpad (whoever maintains the debian package)
Or get the source, update it and build your own package
sudo apt-get build-dep solr
apt-get source solr
cd solr-*/
review the files under debian/ to see whether it contains the upstream source URL; Follow your common sense, or http://www.infodrom.org/Debian/doc/maint/Maintenance-pkgbuild.html#s9.5 to get the latest versions to build.
Prepare for some conflict resolution because Debian/Ubuntu frequently sprinkle their secret sauce in the form of patches/quilts; these might not work with a newer upstream tar ball
I forget about package for solr and jetty. I use this script https://github.com/gagarine/solr-install (you have to adapt) with success on debian to automatize the installation. The script should work on other Linux distribution.
To use the latest from both solr and jetty you may try my github repo:
https://github.com/umars/jetty-solr.git
To get an overview check out my blog post : http://blog.simplyphi.com/2012/06/solr-upgrade-to-jetty-8.html
You will need git installed on your system,
sudo apt-get install git-core
git clone https://github.com/umars/jetty-solr.git
cd jetty-solr
java -jar start.jar
This will give you the latest release solr+jetty configuration.
I found https://launchpad.net/~gasol-wu/+archive/oneiric
Haven't tested yet, but will report back here.
精彩评论