-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathVagrantfile
61 lines (54 loc) · 1.56 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.network "forwarded_port", guest: 10050, host: 10050
config.vm.provision "shell", inline: <<-SHELL
set -x
# disable selinux
setenforce 0
cat > /etc/selinux/config <<EOL
SELINUX=permissive
SELINUXTYPE=targeted
EOL
# configure systemd accounting
cat > /etc/systemd/system.conf <<EOL
[Manager]
DefaultCPUAccounting=yes
DefaultBlockIOAccounting=yes
DefaultMemoryAccounting=yes
EOL
systemctl daemon-reexec
# install packages
rpm -q zabbix-release > /dev/null 2>&1 || \
rpm -i http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum install -y epel-release
yum makecache
yum update -y
yum install -y \
autoconf \
automake \
dbus-devel \
gdb \
libtool \
policycoreutils-python \
python2-pip \
rpm-build \
setools-console \
strace \
vim-enhanced \
zabbix-agent \
zabbix-get
pip install zabbix-template-converter
curl -sLO https://sourceforge.net/projects/zabbixagentbench/files/linux/zabbix_agent_bench-0.4.0.x86_64.tar.gz
tar -xzf zabbix_agent_bench-0.4.0.x86_64.tar.gz
install -m 0755 \
zabbix_agent_bench-0.4.0.x86_64/zabbix_agent_bench \
/usr/bin/zabbix_agent_bench
# enable zabbix
systemctl enable zabbix-agent
systemctl start zabbix-agent
SHELL
end