-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-fast.sh
executable file
·69 lines (66 loc) · 1.96 KB
/
install-fast.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
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
echo "------------------------"
echo "Middlenebel Installation"
echo "------------------------"
echo
echo "This script install dependencies and build Middlenebel."
echo
echo "You can abort the script and do it manually, see: doc/08-Building.md for instructions."
echo
echo "The next dependencies will be installed in your system:"
echo
echo " g++, Make, CMake, libboost, libjsoncpp, librdkafka, libmysqlcppconn, libssl, cppkafka"
echo
echo "You will need administrative rights to install in your system!"
echo
echo You need git, apt, docker and kubectl installed in you Linux/WSL2. This will NOT DO it.
echo
doExit=0
apt --version >/dev/null 2>&1
if (( $? != 0)); then
echo "!!! apt not found !!!"
doExit=1
fi
git --version >/dev/null 2>&1
if (( $? != 0)); then
echo "!!! git not found !!!"
doExit=2
fi
echo
kubectl version >/dev/null 2>&1
if (( $? != 0)); then
echo "!!! kubectl not found !!!"
echo "See: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/"
doExit=3
fi
docker --version >/dev/null 2>&1
if (( $? != 0)); then
echo "!!! docker not found !!!"
echo "See: https://docs.docker.com/desktop/wsl/"
doExit=4
fi
echo
if (( $doExit == 0)); then
echo "Ok!!! docker & kubectl detected!"
fi
if (( $doExit > 1)); then
echo "!!! Required apt/docker/kubectl not found... Aborting installation !!!"
exit $doExit
fi
read -p "Do you like continue with the installation [y/N]? " yesNoOption
if [ "$yesNoOption" = "y" ]; then
echo "-------------------------- Installing dependencies..."
apt install make cmake librdkafka-dev libssl-dev libjsoncpp-dev libmysqlcppconn-dev
cd cppkafka
mkdir build; cd build
cmake ..; make
cp src/lib/libcppkafka.so.* ../../lib
cd ../../lib
ln -s libcppkafka.so.* libcppkafka.so
cd ..
#rm -rf cppkafka
libssl echo "-------------------------- Building Middlenebel..."
make all
echo "Installation finished!"
echo "You can start the server with ./main"
fi