-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathNagios install notes
122 lines (80 loc) · 2.67 KB
/
Nagios install notes
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
seems one needs to disable APP ARMOR for this to work :facepalm: nejse...
#/etc/init.d/apparmor stop
#update-rc.d -f apparmor remove
#aptitude remove apparmor apparmor-utils
------------------------------------------------------
apt-get update
apt-get upgrade
apt-get install build-essential php5-gd wget libgd2-xpm libgd2-xpm-dev
adduser --system --no-create-home --disabled-login --group nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -a -G nagcmd www-data
cd /opt/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
tar -xzvf /opt/nagios-3.2.3.tar.gz
cd /opt/nagios-3.2.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
#edit email at /usr/local/nagios/etc/objects/contacts.cfg
cd /opt/nagios-3.2.3
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 reload
cd /opt/
tar xzf /opt/nagios-plugins-1.4.15.tar.gz
cd /opt/nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
chmod +x /etc/init.d/nagios
/usr/sbin/update-rc.d -f nagios defaults
#check errors :
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
#for emails :
apt-get install mailutils postfix
# check here : /usr/local/nagios/etc/objects/commands.cfg
/etc/init.d/nagios restart
# cert stuff
apt-get update
apt-get upgrade
apt-get install openssl
mkdir /etc/ssl/localcerts
openssl req -new -x509 -days 365 -nodes -out /etc/ssl/localcerts/apache.pem -keyout /etc/ssl/localcerts/apache.key
chmod 600 /etc/ssl/localcerts/apache*
# additional ubuntu notes
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
aptitude remove apparmor apparmor-utils
mkdir /downloads
#Zgjidh Smarthost kur te instalosh Postfixin
aptitude -y install apache2 libapache2-mod-php5 build-essential libgd2-xpm-dev postfix
aptitude update
aptitude safe-upgrade
useradd -m -s /bin/bash nagios
passwd nagios
usermod -G nagios nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
cd /downloads
wget http://prdownloads.sourceforge.net/nagios/nagios-3.2.3.tar.gz
wget http://prdownloads.sourceforge.net/nagiosplug/nagios-plugins-1.4.15.tar.gz
tar -zxf /downloads/nagios-3.2.3.tar.gz
tar -zxf /downloads/nagios-plugins-1.4.15.tar.gz
cd /downloads/nagios-3.2.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
# Fut pacvordin :
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 restart