45112f7a78a09b68681b6992f1b8c220904b1c04
[barometer.git] / systems / centos / 8 / build_base_machine.sh
1 #!/bin/bash
2 #
3 # Build a base machine for CentOS distro
4 #
5 # Copyright 2017-2019 Intel Corporation and OPNFV. All rights reserved.
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #
20 # Contributors:
21 #   Aihua Li, Huawei Technologies.
22 #   Martin Klozik, Intel Corporation.
23 #   Maryam Tahhan, Intel Corporation.
24 # Synchronize package index files
25 dnf -y update
26
27 # For collectd
28 dnf install -y yum-utils
29 dnf install -y epel-release
30 dnf install -y centos-release-opstools
31 dnf builddep -y collectd
32
33 # For CentOS 8, a lot of the dependencies are from PowerTools repo
34 dnf install -y 'dnf-command(config-manager)' &&  dnf config-manager --set-enabled PowerTools
35
36 # CentOS 8 doesn't have intel-cmt-cat-devel packaged, so use the version from CentOS7
37 dnf install -y http://mirror.centos.org/centos/7/os/x86_64/Packages/intel-cmt-cat-3.0.1-1.el7.x86_64.rpm \
38      http://mirror.centos.org/centos/7/os/x86_64/Packages/intel-cmt-cat-devel-3.0.1-1.el7.x86_64.rpm
39
40 # Install required packages
41 dnf -y install $(echo "
42
43 make
44 gcc
45 gcc-c++
46 autoconf
47 automake
48 flex
49 bison
50 libtool
51 pkg-config
52 git-core
53 rpm-build
54 libcap-devel
55 xfsprogs-devel
56 iptables-devel
57 libmemcached-devel
58 gtk2-devel
59 libvirt-devel
60 libvirt-daemon
61 mcelog
62 wget
63 net-snmp-devel
64 hiredis-devel
65 libmicrohttpd-devel
66 jansson-devel
67 libpcap-devel
68 lua-devel
69 OpenIPMI-devel
70 libmnl-devel
71 librabbitmq-devel
72 iproute-static
73 libatasmart-devel
74 librdkafka-devel
75 yajl-devel
76 protobuf-c-devel
77 rrdtool-devel
78 dpdk-19.11
79 qpid-proton-c-devel
80
81 #install epel release required for git-review
82 epel-release
83 python3-libvirt
84 python3-pip
85 python36-devel
86 numactl-devel
87 " | grep -v ^#)