Install Tomcat 5.5 and Solr 1.4 on Debian 5 (lenny)
Letzte Änderung 28.04.2009
1.Installation of Java
First you have to install SUN JRE and JDK on your system. Version 6 is the current version. The following entries in /etc/apt/sources.list are necessary to download Java directly from the repository
# in non-free are the Java packages
deb http://ftp.de.debian.org/debian/lenny main non-free contrib#Security updates for all debian packages
deb http://security.debian.org/ etch/updates main non-free contribInstall Java 6 JRE und JDK packages:
apt-get install sun-java6-jre sun-java6-jdk
2. Activate and test Java
update-alternatives --config java
update-alternatives --config javacand then check the java version:
java -versionand
javac -version3. Change environment variables
The variable JAVA_HOME has to be set. Else Tomcat won't find the Java environment and hence will not start. Add the following lines to /etc/profile:
# Setup Jave environment 6
export PATH=$PATH:/usr/lib/jvm/java-6-sun/bin
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JRE_HOME=/usr/lib/jvm/java-6-sun/jre4. Installation Tomcat
After changing the environment variables, please log off and login as root to benefit from the new settings.
Then start the installation of Tomcat with apt-get:
apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webappsThen install solr:
apt-get install solr-tomcat5.5Under /etc/default/tomcat5.5 JAVA_HOME set the JAVA_HOME directory:
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat55.
#TOMCAT5_USER=tomcat55# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.4. If JAVA_HOME is not set, some common directories for
# the Sun JDK, various J2SE 1.4 versions, and the free runtimes
# java-gcj-compat-dev and kaffe are tried.
JAVA_HOME=/usr/lib/jvm/java-6-sun5. Test Tomcat
Check is Tomcat ist running smoothly by open the following page in your favourite browser:
http://localhost:8180The login details for the tomcat administrator you can find and change in:
$TOMCAT_HOME/etc/tomcat-users.xmlCreate a new user with the roles "admin, manager".
Attention: You can only access from localhost by default.
6. Update solr to the newest version
- download solr and untar the file (tar -zxf <filename> (http://people.apache.org/builds/lucene/solr/nightly)
- Open solr.xml in /etc/tomcat5.5/Catalina/localhost folder and write down the install path of solr (docBase)
- Untar the solr.war from the dist folder and move it to the noted folder
- Copy the /conf folder from the folder /example/solr/conf to the docBase.
Change into the folder /usr/share/tomcat5.5/bin:
cd /usr/share/tomcat5.5/binStart Tomcat manually in the current window to check any possible error messages:
./catalina.sh runThis is helpful for a error search. You can alternatively check the logfiles.


Good resource web site. Very
Good resource web site. Very helpful. SOLR could not be installed so needs further research.
All the rest is documented
All the rest is documented very good.
but I am still having trouble on running solr.
It seems to be loading the config, but then all goes wrong...?
There seems to be something missing or what?
Nov 30, 2010 5:26:48 PM org.apache.solr.core.SolrCore
INFO: Opening new SolrCore at /usr/share/solr/, dataDir=./solr/data
Nov 30, 2010 5:26:48 PM org.apache.solr.schema.IndexSchema readConfig
INFO: Reading Solr Schema
Nov 30, 2010 5:26:49 PM org.apache.solr.schema.IndexSchema readConfig
INFO: Schema name=example
Nov 30, 2010 5:26:49 PM org.apache.solr.core.SolrException log
SEVERE: java.lang.NoSuchMethodError: org.apache.solr.analysis.TokenizerChain.([Lorg/apache/solr/analysis/CharFilterFactory;Lorg/apache/solr/analysis/TokenizerFactory;[Lorg/apache/solr/analysis/TokenFilterFactory;)V
at org.apache.solr.schema.TrieField.init(TrieField.java:89)
at org.apache.solr.schema.FieldType.setArgs(FieldType.java:90)
at org.apache.solr.schema.IndexSchema.readConfig(IndexSchema.java:341)
at org.apache.solr.schema.IndexSchema.(IndexSchema.java:71)
at org.apache.solr.core.SolrCore.(SolrCore.java:197)
at org.apache.solr.core.SolrCore.getSolrCore(SolrCore.java:178)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
Probaly you are using a
Probaly you are using a config file that is not part of the distributed solr version. This can lead to "SEVERE: java.lang.NoSuchMethodError" errors. F.ex. because you refer in the config file to a tokenizer, that is not part of the current solr distribution.
Ok thanx, I managed to get it
Ok thanx,
I managed to get it working.
I followed other tutorials but this one is pretty clear!
Bookmarking this for the next time!
A nice add-on for this could be the configuration for multiple cores.
Read more there: http://wiki.apache.org/solr/CoreAdmin
I am having the same problem,
I am having the same problem, and I followed the tutorial. How did you resolve the problem?
Kommentar hinzufügen