Skip to content

Commit

Permalink
Add Solr install script (4.10.3). Closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ruebot committed Feb 18, 2015
1 parent c695243 commit ace4d52
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions install/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 8181, host: 8181 # Karaf

config.vm.provision :shell, :path => "install.sh"
config.vm.provision :shell, :path => "solr.sh"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
Expand Down
4 changes: 4 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ apt-get -y install maven
# Tomcat
apt-get -y install tomcat7

#Wget and curl

apt-get -y install wget curl

# Set some params so it's non-interactive for the lamp-server install
debconf-set-selections <<< 'mysql-server mysql-server/root_password password islandora'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password islandora'
Expand Down
29 changes: 29 additions & 0 deletions install/solr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
echo "Installing Solr"

SOLR_VERSION=4.10.3
SOLR_HOME=/var/lib/tomcat7/solr

mkdir $SOLR_HOME

cd /tmp
wget http://archive.apache.org/dist/lucene/solr/"$SOLR_VERSION"/solr-"$SOLR_VERSION".tgz
tar -xzvf solr-"$SOLR_VERSION".tgz
cp -v /tmp/solr-"$SOLR_VERSION"/dist/solr-"$SOLR_VERSION".war /var/lib/tomcat7/webapps/solr.war
chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/solr.war

cd /usr/share/tomcat7/lib
wget http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.2/commons-logging-1.1.2.jar

cp /tmp/solr-"$SOLR_VERSION"/example/lib/ext/slf4j* /usr/share/tomcat7/lib
cp /tmp/solr-"$SOLR_VERSION"/example/lib/ext/log4j* /usr/share/tomcat7/lib

chown -hR tomcat7:tomcat7 /usr/share/tomcat7/lib

cp -Rv /tmp/solr-"$SOLR_VERSION"/example/solr/* $SOLR_HOME

chown -hR tomcat7:tomcat7 $SOLR_HOME

touch /var/lib/tomcat7/velocity.log
chown tomcat7:tomcat7 /var/lib/tomcat7/velocity.log

service tomcat7 restart

0 comments on commit ace4d52

Please sign in to comment.