-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaccumulo-bootstrap.sh
47 lines (38 loc) · 1.59 KB
/
accumulo-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
echo "Setting up environment"
cat >> //etc/profile.d/dev.sh <<EOF
export JAVA_HOME=/usr/jdk64/jdk1.8.0_40
export HADOOP_HOME=/usr/hdp/current/hadoop-client
export ZOOKEEPER_HOME=/usr/hdp/current/zookeeper-client
export PATH=$PATH:/usr/lib/accumulo/bin:$JAVA_HOME/bin
EOF
export JAVA_HOME=/usr/jdk64/jdk1.8.0_40
export HADOOP_HOME=/usr/hdp/current/hadoop-client
export ZOOKEEPER_HOME=/usr/hdp/current/zookeeper-client
export PATH=$PATH:/usr/lib/accumulo/bin:$JAVA_HOME/bin
echo "Installing Accumulo"
curl -O -L -s http://mirrors.koehn.com/apache/accumulo/1.7.0/accumulo-1.7.0-bin.tar.gz
tar xvzf accumulo-1.7.0-bin.tar.gz
sudo mv accumulo-1.7.0 /usr/lib/accumulo
sudo chown -R root:root /usr/lib/accumulo
echo "Configuring Accumulo"
cp /usr/lib/accumulo/conf/examples/1GB/standalone/* /usr/lib/accumulo/conf/
cat > /usr/lib/accumulo/conf/masters <<EOF
ambari
EOF
cat > /usr/lib/accumulo/conf/slaves <<EOF
ambari
EOF
cat > /usr/lib/accumulo/conf/monitor <<EOF
ambari
EOF
cat > /usr/lib/accumulo/conf/tracers <<EOF
ambari
EOF
cat > /usr/lib/accumulo/conf/gc <<EOF
ambari
EOF
sed -i 's/<!-- HDP 2.0 requirements --><!--/<!-- HDP 2.0 requirements -->/' /usr/lib/accumulo/conf/accumulo-site.xml
sed -i 's/--><!-- End HDP 2.0 requirements -->/<!-- End HDP 2.0 requirements -->/' /usr/lib/accumulo/conf/accumulo-site.xml
sed -i 's/<!-- HDP 2.2 requirements --><!--/<!-- HDP 2.2 requirements -->/' /usr/lib/accumulo/conf/accumulo-site.xml
sed -i 's/--><!-- End HDP 2.2 requirements -->/<!-- End HDP 2.2 requirements -->/' /usr/lib/accumulo/conf/accumulo-site.xml
sed -i 's/>secret</>dev</' /usr/lib/accumulo/conf/accumulo-site.xml