-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_dependencies.sh
executable file
·77 lines (61 loc) · 1.92 KB
/
install_dependencies.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
70
71
72
73
#!/bin/bash
. /etc/os-release
centos_packages=(
gmp-devel
numactl-devel
libnet-devel
libpcap-devel
boost-devel
bc
automake
pciutils
wget
ntp
devtoolset-8
)
if [ "$ID" = "centos" ] ; then
# install libnids
yum install gcc-c++ -y
yum install -y libgnomeui-devel
cd src/stream_gen/libnids-1.24
./configure && make && make install && make clean
cd ../../../
# Download dependencies
mkdir downloads && cd downloads
# update curl
yum update -y nss curl libcurl
# install cmake3
wget https://cmake.org/files/v3.13/cmake-3.13.5.tar.gz
tar -zxvf cmake-3.13.5
cd cmake-3.13.5/
./bootstrap && gmake && gmake install
ln -s /usr/local/bin/cmake /usr/local/bin/cmake3
cd ../
# yum install -y centos-release-scl epel-release
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# yum install -y https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
# upgrade kernel in elrepo
# yum install -y --enablerepo elrepo-kernel kernel-lt kernel-lt-devel kernel-lt-headers
yum install -y "${centos_packets}"
# this will replace existing c++ compiler in order to compile protobuf and fmt
ln -s /opt/rh/devtoolset-8/root/bin/c++ /usr/bin/c++
# install protobuf
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.5.0/protobuf-cpp-3.5.0.tar.gz
tar -zxvf protobuf-cpp-3.5.0.tar.gz
cd protobuf-3.5.0
./configure
make
make install && cd ..
echo /usr/local/lib >> /etc/ld.so.conf
ldconfig
# install fmt
#wget https://github.com/fmtlib/fmt/archive/5.3.0.tar.gz
wget https://github.com/fmtlib/fmt/archive/6.1.0.tar.gz
tar xvf 6.1.0.tar.gz
# if cmake is installed with source code(add Symbolic link cmake3 to cmake)
cd fmt-6.1.0 && cmake3 ./ && make && make install && cd ../../
# warning: this will replace current linux kernel
# grub2-set-default 0
# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
# (or) grub2-mkconfig -o /boot/grub2/grub.cfg
fi