-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.sh
executable file
·49 lines (39 loc) · 1.06 KB
/
bootstrap.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# update package repo
apt-get update
# install collectd
apt-get install -y collectd
service collectd stop
rm -f /etc/collectd/collectd.conf
ln -sf /vagrant/collectd.conf /etc/collectd/collectd.conf
service collectd start
# install Apache
apt-get install -y apache2
rm -rf /var/www
mkdir /var/www
chown www-data.www-data /var/www
# install Java 8
cd /tmp
wget -q --no-check-certificate https://github.com/aglover/ubuntu-equip/raw/master/equip_java8.sh && bash equip_java8.sh
# install Elasticsearch
cd /opt
tar zxf /vagrant/elasticsearch-1.2.0.tar.gz
ln -sf elasticsearch-1.2.0 elasticsearch
# install Marvel
/opt/elasticsearch/bin/plugin -i elasticsearch/marvel/latest
# install Kibana
cd /var/www
tar zxf /vagrant/kibana-3.0.1.tar.gz
mv kibana-3.0.1/* .
rmdir kibana-3.0.1
cd /var/www/app/dashboards
cp -pf logstash.json default.json
# install Logstash
cd /opt
tar zxf /vagrant/logstash-1.4.1.tar.gz
ln -sf logstash-1.4.1 logstash
# fix permissions
cd /opt
chown -R vagrant.vagrant logstash* elasticsearch*
# startup
su - vagrant -c /vagrant/start.sh