Installing Apache Solr on Debian Squeeze 6.0 and tomcat7

Apache solr logoDue to the lack of an official Apache Solr Package in Debian Squeeze 6.0 this post will briefly describe the installation of tomcat7 together with Apache (Lucene) Solr from Source.

Install tomcat7 package:

apt-get install tomcat7

Download Apache Solr from here, for example:

cd /opt/ && wget http://apache.lehtivihrea.org//lucene/solr/3.4.0/apache-solr-3.4.0.tgz

unpack the package

tar xzfv apache-solr-3.4.0.tgz

copy the solr file to tomcat webapps directory

cp apache-solr-3.4.0/dist/apache-solr-3.4.0.war /var/lib/tomcat7/webapps/solr.war

copy example configs and files to tomcat solr directory

cp -fr example/solr/ /var/lib/tomcat7/

change owner to tomcat

chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr/

restart tomcat

/etc/init.d/tomcat restart

If everything went well you should be able to see the Solr Admin page on http://yourhost.com:8080/solr/admin.
Have Fun!

Related Posts:

Internet Nutzungsbestimmungen in China

Nationalflagge von ChinaGerade hab ich beim Aufräumen eines Dropbox Ordners eine Kopie der Nutzungsbestimmungen des Radisson Hotel Shanghai Hong Quan (Stand April 2010) gefunden.

Diese wollte ich einfach mal öffentlich dokumentieren. Interessante Passagen sind fett hervorgehoben ;)

Use of Internet – Conditions of Use

By using this Internet service provided by Radisson Hotel Shanghai Hong Quan (the “Hotel”), I unconditionally accept the following terms and conditions:

  • The Internet is a public network and the Hotel has no control over any of the Internet service providers, information service providers, network providers, content providers or such other similar or equivalent systems and services. The Hotel cannot be held liable for any acts or omissions of the abovementioned.
  • My use of the Internet service (including all communication and information placed and sent through use of the service) may be monitored for all authorized governmental purposes and the Hotel makes no guarantee of confidentiality or privacy of such communication or information transmitted by me through use of this service. I acknowledge that such communication or information may be examined, recorded, stored, copied and used for authorized purposes and the Hotel will not be responsible for the privacy of the information, e-mail addresses, registration and identification information, disk space, communications, confidential or trade-secret information, or any other content accessed or transmitted by me through use of this service.
  • I am using the Internet service at my own risk. The Hotel cannot be held liable in the event of any (a) electronic, mechanical and data failure or corruption or (b) damage to my computer whilst connected to this service or due to suspension, termination or failure of this service.
  • Whilst every effort will be made to make this service available, I accept that this service may be unavailable if the Hotel in its discretion decides as such.
  • The Internet service is provided, and may only be used, on the following basis:

    (A) I ASSUME FULL RESPONSIBILITY FOR ALL CLAIMS, LIABILITIES, LOSSES, DAMAGE OR CONSEQUENCES RESULTING DIRECTLY OR INDIRECTLY FROM MY USE OF THIS SERVICE.

    (B) I AGREE THAT THE HOTEL AND ITS AGENTS WILL NOT BE LIABLE FOR ANY HARM, DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES. I AGREE TO PROTECT AND FULLY COMPENSATE THE HOTEL, ITS AFFILIATES AND AGENTS FROM ANY AND ALL OTHER THIRD PARTY CLAIMS, LIABILITIES, LOSSES, DAMAGES, AND CONSEQUENCES (INCLUDING, BUT NOT LIMITED TO, REASONABLE ATTORNEY FEES) CAUSED BY OR ARISING FROM MY USE OF THIS SERVICE.

  • THE HOTEL EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT.

Related Posts:

Wuala as Cloud Storage

There are several reasons why you could prefer Wuala over dropbox.
First of all Dropbox has a general problem with security due to its design. In addion there have been other issues, like the Authentification Bug in June 2011 or troubles around the terms of service.

Wuala takes a complete different approach on security. The files are encrypted (AES) and split up into multiple chunks on the client side and afterwards transferred to distributed datacenters. There are several other points why Wuala is a strong alternative to dropbox mentioned on lifehacker.

If you install Wuala via this referrer link you start with 2GB instead of 1GB.
Several other promo codes increase your starting space:
PC-MAGAZIN (2 GB)
I-KNOW-MARCEL (1 GB)
I-KNOW-FABIUS (1 GB)
I-KNOW-DOMINIK (1 GB)
I-KNOW-CAROLA (1 GB)
All these codes expire after 1 year!

Another surplus over dropbox is that you’re able to share some of space of your harddrive. Depending on the amount of space and your online time you gain additional space. You could even install the Wuala client (java) on your dedicated root server and donate some space in order to get the same amount (in my case 50G) of space for your account..

The Wuala Client is available for Linux/Windows/MAC. The recent updates to the mobile clients were necessary and the new iPad Version is also available. In addition the usual iOS/Android Client wait’s in your appstore.

For small and medium sized companies the guys from LaCie grant a decent business offer: 279€ for 100GB and 5 user per year.

The downside of Wuala currently is that it’s not as easily managed as dropbox and that the client isn’t integrated as deeply as dropbox into your operating system.

Related Posts:

DNS Blacklisten prüfen mit Icinga-Nagios

Wer regelmässige Newsletter verschickt, sollte heutzutage auch gängige DNS Blacklisten im Auge behalten.
Denn auch wenn man sich komplett Regelkonform verhält, kann es vorkommen, dass User einen melden. Dann dauert es schon 10-20 Stunden, bis man je nach Liste automatisch ausgetragen wird, sollten keine neuen Meldungen hereinkommen.
Es lohnt sich also, die Blacklisten im Auge zu behalten und sowas wollen wir natürlich automatisch tun.

Bei Heise gibts hierzu einen ausführlichen Artikel, der erklärt auf welch unterschiedliche Arten man dies tun kann.
Da wir zur Überwachung das immer populärer werdende Icinga einsetzen, wird der check natürlich dort eingebaut.

Den “check_blacklist” gibt’s direkt im Heise.de Artikel oder hier zum Download.

Das Check Command ist sehr simpel:

$USER1$/check_blacklist -H $HOSTADDRESS$

und liefer bei uns zur Zeit folgenden Output:

OK – 188.40.168.XX not on 21 DNSBLs

Es überwacht folgende Blacklists:

cbl.abuseat.org
dnsbl.ahbl.org
ircbl.ahbl.org
virbl.dnsbl.bit.nl
blackholes.five-ten-sg.com
dnsbl.inps.de
ix.dnsbl.manitu.net
no-more-funn.moensted.dk
combined.njabl.org
dnsbl.njabl.org
dnsbl.sorbs.net
bl.spamcannibal.org
bl.spamcop.net
sbl.spamhaus.org
xbl.spamhaus.org
pbl.spamhaus.org
dnsbl-1.uceprotect.net
psbl.surriel.com
l2.apews.org
dnsrbl.swinog.ch
db.wpbl.info

Viel Spaß damit.

Related Posts:

External Jabber Accounts in Google Talk with Apps Account

Yesterday i wanted to add a buddy using a regular and open jabber service to my Google talk account provided by Google Apps.
In order to be able to communicate with external jabber servers (e.g. jabber.ccc.de) from your Google Talk Account you need to set up service records (SRV) in your DNS configuration for your domain. Google has a howto on this over here. You need to configure 5 new records with different priorities on port 5269 pointing to various google xmpp servers.

Example picture from one new DNS record in my domainfactory configuration interface:

Jabber DNS Config XMPP

A dig on your _xmpp-server._tcp.Domain.org should look like this example after configuration:
bobafett:/# dig srv _xmpp-server._tcp.andreas-lehr.com

; <<>> DiG 9.7.3 <<>> srv _xmpp-server._tcp.andreas-lehr.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1024
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;_xmpp-server._tcp.andreas-lehr.com. IN SRV

;; ANSWER SECTION:
_xmpp-server._tcp.andreas-lehr.com. 3600 IN SRV 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.andreas-lehr.com. 3600 IN SRV 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.andreas-lehr.com. 3600 IN SRV 20 0 5269 xmpp-server4.l.google.com.
_xmpp-server._tcp.andreas-lehr.com. 3600 IN SRV 5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp.andreas-lehr.com. 3600 IN SRV 20 0 5269 xmpp-server1.l.google.com.
..

After this you should be able to add buddies from other jabber servers in your google talk/app account.

Related Posts:

Google Talk with App account in external chat application

Note to self on howto use Google Talk combined with a Google Apps account in an external chat application:

Example: Using pidgin for email mail@domain.org:

Simple Tab

  • Protocol: XMPP
  • Username: mail (First half of Email address)
  • Domain: domain.org (Second half of Email address)
  • Resource: gmail.com/

Advanced Tab:

  • Connect port: 5222
  • Connect server: talk.google.com
  • File transfer proxies: proxy.jabber.org

important is the split of your address into username and domain, the resource gmail.com and the connect server talk.google.com

Related Posts:

Fixing Redmine “undefined local variable or method `version_requirements’” Error

redmine logoAfter a recent update on one of our service machines, redmine (version 1.1.2) crashed during startup with the following error:

Error message:
undefined local variable or method `version_requirements' for #
Exception class:
NameError

Application root:
/opt/redmine

Backtrace:
# File Line Location
0 /var/lib/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb 119 in `requirement'
1 /usr/lib/ruby/1.8/rubygems/source_index.rb 269 in `search'
2 /var/lib/gems/1.8/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb 119 in `search'
3 /usr/lib/ruby/1.8/rubygems.rb 247 in `activate'
4 /usr/lib/ruby/1.8/rubygems.rb 1276 in `gem'
5 /var/lib/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb 73 in `add_load_paths'
6 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 301 in `add_gem_load_paths'
7 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 301 in `each'
8 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 301 in `add_gem_load_paths'
9 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 132 in `process'
10 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 113 in `send'
11 /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb 113 in `run'
12 /opt/redmine/config/environment.rb 20
13 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
14 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `require'
15 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb 318 in `preload_application'
16 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb 267 in `initialize_server'
17 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/utils.rb 323 in `report_app_init_status'
18 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb 246 in `initialize_server'
19 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb 194 in `start_synchronously'
20 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb 163 in `start'
21 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb 222 in `start'
22 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb 253 in `spawn_rails_application'
23 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add'
24 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb 247 in `spawn_rails_application'
25 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
26 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
27 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb 246 in `spawn_rails_application'
28 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb 145 in `spawn_application'
29 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb 278 in `handle_spawn_application'
30 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb 352 in `__send__'
31 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb 352 in `main_loop'
32 /var/lib/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb 196 in `start_synchronously'
33 /var/lib/gems/1.8/gems/passenger-2.2.15/bin/passenger-spawn-server 61

I believe the error came up with the recent version of the rubygems packe provided in debian testing, which is rubygems_1.6.2-1_all.deb in our case.
The error is described in the official redmine “redmine” right here. More information could also be found in the official redmine bulletin board.

We put the code provided in hint 3 of issue 7516 in line 19 of the file config/environment.rb. This hack fixed the error for us for now.
You could also switch over using the unstable trunk version of redmine, roll back your rubygems or wait for the 1.2.0 release of redmine.

Related Posts: