File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 7
7
# This git repository should be cloned into $HOME/aws-config.
8
8
export REPO_ROOT=$HOME /aws-config/production-rpc
9
9
export SCRIPT_ROOT=$REPO_ROOT /scripts
10
+ export SOLR_VERSION=3.6.0
11
+
12
+ # chdir to $REPO_ROOT
13
+ cd $REPO_ROOT
10
14
11
15
# Start out by installing package dependencies
12
16
sudo apt-get install lighttpd tomcat6 curl mailutils moreutils
13
17
14
18
# Configure Tomcat: Set port number to 9001
15
19
sudo sed -i ' s/8080/9001/g' /var/lib/tomcat6/conf/server.xml
16
20
21
+ # Download and extract the Solr .war file
22
+ curl http://apache.tradebit.com/pub/lucene/solr/$SOLR_VERSION /apache-solr-$SOLR_VERSION .tgz > $REPO_ROOT /apache-solr.tgz
23
+ tar -xf $REPO_ROOT /apache-solr.tgz
24
+ cp apache-solr-$SOLR_VERSION /dist/apache-solr-$SOLR_VERSION .war $REPO_ROOT /solr/solr.war
25
+ rm -rf apache-solr-$SOLR_VERSION
26
+ rm $REPO_ROOT /apache-solr.tgz
27
+
17
28
# Copy configuration data
18
29
sudo ln -s $REPO_ROOT /config/solr_tomcat_context.xml /var/lib/tomcat6/conf/Catalina/localhost/solr.xml
19
30
@@ -41,6 +52,7 @@ sudo /etc/init.d/lighttpd restart
41
52
$SCRIPT_ROOT /update_solr.bash
42
53
43
54
# Create a local user crontab
44
- echo " [email protected] " > /tmp/crontab
45
- echo " 0 * * * * $SCRIPT_ROOT /cronic.bash $SCRIPT_ROOT /update_solr.bash" >> /tmp/crontab
46
- crontab /tmp/crontab
55
+ cat << EOF | crontab -
56
+
57
+ 0 * * * * $SCRIPT_ROOT /cronic.bash $SCRIPT_ROOT /update_solr.bash
58
+ EOF
You can’t perform that action at this time.
0 commit comments