-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·57 lines (40 loc) · 1.36 KB
/
install.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
50
51
52
53
54
55
56
# !/bin/sh
# Ensure that the shell script is run from root
if [[ $EUID -ne 0 ]]; then
echo -e "This script must be run as root\n"
exit 1
fi
# set up keys
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
# Update files and install default-jre
apt-get update
apt-get install default-jre -y
# Install JDK
apt-get install default-jdk -y
# Install Oracle JDK
add-apt-repository ppa:webupd8team/java
apt-get update
# Install JDK 9
apt-get install oracle-java8-installer -y
echo -e '\n#####################\n'
echo -e 'java is installed\n'
echo -e '#####################\n'
# Import the Elasticsearch PGP key
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
# Install transport-https package
apt-get install apt-transport-https -y
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list
# Install elastic-search
apt-get update && apt-get install elasticsearch -y
# Running Elasticsearch with systemd
/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service
# Start elasticsearch
systemctl start elasticsearch.service
# Make a GET request, to check if elasticsearch node is running
# curl -X GET "localhost:9200/"
# Install the libraries from pip
pip install -r requirements.txt
# # Install nodejs
# apt-get install nodejs
# apt-get install npm