forked from ptgoetz/storm-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-storm.sh
34 lines (25 loc) · 1.08 KB
/
install-storm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apt-get update
apt-get install -y unzip supervisor openjdk-7-jdk emacs
/etc/init.d/supervisor stop
groupadd storm
useradd --gid storm --home-dir /home/storm --create-home --shell /bin/bash storm
unzip -o /vagrant/$1.zip -d /usr/share/
chown -R storm:storm /usr/share/$1
ln -s /usr/share/$1 /usr/share/storm
ln -s /usr/share/storm/bin/storm /usr/bin/storm
mkdir /etc/storm
chown storm:storm /etc/storm
gunzip /vagrant/$2.tar.gz
tar xvf /vagrant/$2.tar -C /usr/share/java
mv /usr/share/java/$2/*.jar /usr/share/storm/lib
mv /usr/share/java/$2/lib/*.jar /usr/share/storm/lib
#rm /usr/share/apache-storm-0.9.1-incubating/lib/slf4j-api-1.7.5.jar
rm /usr/share/apache-storm-0.9.1-incubating/lib/slf4j-log4j12-1.7.6.jar
cp /vagrant/Libs/*.jar /usr/share/storm/lib
rm /usr/share/storm/conf/storm.yaml
cp /vagrant/storm.yaml /usr/share/storm/conf/
cp /vagrant/cluster.xml /usr/share/storm/logback/
ln -s /usr/share/storm/conf/storm.yaml /etc/storm/storm.yaml
mkdir /var/log/storm
chown storm:storm /var/log/storm
#sed -i 's/${storm.home}\/logs/\/var\/log\/storm/g' /usr/share/storm/logback/cluster.xml