Created
January 19, 2018 12:02
-
-
Save landau/d6aa4574288051caaf446ed5ced089cd to your computer and use it in GitHub Desktop.
Run Solr5 Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
##################################################### | |
# This script is compatible with SOLR 5|6.x only | |
##################################################### | |
SOLR_PORT=${SOLR_PORT:-8983} | |
SOLR_VERSION=${SOLR_VERSION:-5.3.1} | |
version=$SOLR_VERSION | |
dir="solr-$version" | |
file="$dir.tgz" | |
url="http://archive.apache.org/dist/lucene/solr/${version}/solr-${version}.tgz" | |
echo "Downloading solr $version..." | |
if [ -f $file ]; | |
then | |
echo "file $file exists." | |
tar -zxf $file | |
else | |
echo "file $file does not exist. Downloading solr from $1..." | |
curl -O $url | |
tar -zxf $file | |
fi | |
echo "Downloaded!" | |
echo "Starting solr on port $SOLR_PORT..." | |
./$dir/bin/solr -p $SOLR_PORT -c -e schemaless | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment