a45b0c3d72716c8baa1c62ecd0a49803197d99b1
[vswitchperf.git] / systems / centos / build_base_machine.sh
1 #!/bin/bash
2 #
3 # Build a base machine for CentOS distro
4 #
5 # Copyright 2015 OPNFV
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 # Contributors:
20 #   Aihua Li, Huawei Technologies.
21 #   Martin Klozik, Intel Corporation.
22
23 # Synchronize package index files
24 yum -y update
25
26 # Install required packages
27 yum -y install $(echo "
28
29 # Make, Compilers and devel
30 make
31 gcc
32 gcc-c++
33 libxml2
34 glibc
35 kernel-devel
36
37 # tools
38 wget
39 git
40 scl-utils
41 vim
42 curl
43 autoconf
44 libtool
45 automake
46 pciutils
47 cifs-utils
48 sysstat
49
50 # libs
51 libpcap-devel
52 libnet
53 fuse
54 fuse-libs
55 fuse-devel
56 zlib
57 zlib-devel
58 glib2-devel
59 pixman-devel
60 socat
61 numactl
62 numactl-devel
63 libpng-devel
64 freetype-devel
65
66 # install gvim
67 vim-X11
68
69 # install epel release required for git-review
70 epel-release
71 " | grep -v ^#)
72
73 # install SCL for python34
74 sudo yum -y install centos-release-scl-rh
75
76 # install python34 packages and git-review tool
77 yum -y install $(echo "
78 rh-python34
79 rh-python34-python-tkinter
80 git-review
81 " | grep -v ^#)
82 # prevent ovs vanilla from building from source due to kernel incompatibilities
83 sed -i s/'SUBBUILDS = src_vanilla'/'#SUBBUILDS = src_vanilla'/ ../src/Makefile