Solr n'étant pas packagé pour Debian, l'installation doit se faire à la main en essayant de le faire de la manière la plus propre possible :
adduser --system --home /opt/solr --disabled-password --shell /bin/bash --no-create-home solr rsync -av /etc/skel/ /opt/solr/ mkdir /opt/solr/upstream chown -R solr: /opt/solr/
apt-get install java-package build-essential:native libgl1-mesa-glx libxtst6 libxxf86vm1
mkdir /opt/solr/tmp/ TMPDIR=/opt/solr/tmp/ make-jpkg /opt/solr/upstream/jdk-8u141-linux-x64.tar.gz rmdir /opt/solr/tmp/
apt-get install java-common dpkg -i /opt/solr/upstream/oracle-java8-jdk_8u141_amd64.deb
wget -O /opt/solr/upstream/solr-6.0.1.tgz http://archive.apache.org/dist/lucene/solr/6.0.1/solr-6.0.1.tgz
cd /opt/solr tar xzvf /opt/solr/upstream/solr-6.0.1.tgz ln -s solr-6.0.1 solr
cp /opt/solr/solr/bin/init.d/solr /etc/init.d/solr chmod 0744 /etc/init.d/solr chown root: /etc/init.d/solr sed -i 's|^SOLR_INSTALL_DIR=.*$|SOLR_INSTALL_DIR=/opt/solr/solr/|' /etc/init.d/solr sed -i 's|^SOLR_ENV=.*$|SOLR_ENV=/etc/default/solr|' /etc/init.d/solr cp /opt/solr/solr/bin/solr.in.sh /etc/default/solr chown root: /etc/default/solr chmod 0644 /etc/default/solr sed -i 's|^#SOLR_PID_DIR=.*$|SOLR_PID_DIR=/opt/solr/var|' /etc/default/solr sed -i 's|^#SOLR_HOME=.*$|SOLR_HOME=/opt/solr/var/data|' /etc/default/solr sed -i 's|^#LOG4J_PROPS=.*$|LOG4J_PROPS=/opt/solr/var/log4j.properties|' /etc/default/solr sed -i 's|^#SOLR_LOGS_DIR=.*$|SOLR_LOGS_DIR=/var/log/solr|' /etc/default/solr mkdir -p /opt/solr/var/data mkdir /var/log/solr cp /opt/solr/solr/server/solr/solr.xml /opt/solr/var/data/solr.xml cp /opt/solr/solr/server/resources/log4j.properties /opt/solr/var/log4j.properties sed -i 's|^solr.log=.*$|solr.log=/var/log/solr|' /opt/solr/var/log4j.properties find /opt/solr/var/ -type d -exec chmod 0750 \{\} \; find /opt/solr/var/ -type f -exec chmod 0640 \{\} \; chown -R solr: /var/log/solr /opt/solr/var insserv -d solr systemctl enable solr systemctl start solr