-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
89 additions
and
50 deletions.
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Script to install Solr. By default, version 9.3.0 will be installed. | ||
# Another Solr version can be specified using the `--version` option. | ||
|
||
script_name="$(basename "$0")" | ||
|
||
# Define variables and their default values | ||
version="9.3.0" | ||
|
||
# Parse command line options | ||
while [ $# -gt 0 ]; do | ||
if [[ $1 == "--"* ]]; then # only deal with long options | ||
if [[ -n "$2" && $2 != "-"* ]]; then # ignore options without a value | ||
# Create variable name from option name | ||
v="${1/--/}" # uses parameter expansion removing '--' | ||
|
||
# Read option value into variable | ||
declare "$v"="$2" | ||
|
||
# Process next option | ||
shift | ||
fi | ||
fi | ||
shift | ||
done | ||
|
||
# Download Solr version | ||
if [[ "$version" =~ ^[1-8]\.[0-9]+\.[0-9]+$ ]]; then | ||
SOLR_VERSION="$version" | ||
ant download-solr -DsolrVersion=$SOLR_VERSION -DdownloadDir=./downloads | ||
elif [[ "$version" =~ ^(9|[1-9][0-9]+)\.[0-9]+\.[0-9]+$ ]]; then # new archive URL for versions >9.0.0 | ||
SOLR_VERSION="$version" | ||
SOLR_URL="https://archive.apache.org/dist/solr/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz" | ||
echo "Getting: $SOLR_URL" | ||
wget -q $SOLR_URL -O - | tar -xz | ||
else | ||
echo "Unrecognized version number" | ||
echo -e "The --version option requires a 3-digit version number, e.g.: 9.3.0" | ||
exit 1 | ||
fi | ||
|
||
# Configure & start Solr | ||
cd solr-$SOLR_VERSION | ||
./bin/solr start -force | ||
./bin/solr create -c opus4 -force | ||
cd server/solr/opus4/conf/ | ||
rm -f managed-schema schema.xml solrconfig.xml | ||
ln -s ../../../../../vendor/opus4-repo/search/conf/schema.xml schema.xml | ||
ln -s ../../../../../vendor/opus4-repo/search/conf/solrconfig.xml solrconfig.xml | ||
cd ../../../../ | ||
./bin/solr restart -force | ||
cd .. |
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
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
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