1 | 3c3 |
---|
2 | < PortSystem 1.0 |
---|
3 | --- |
---|
4 | > PortSystem 1.0 |
---|
5 | 5,38c5,38 |
---|
6 | < name zabbix |
---|
7 | < version 1.8.2 |
---|
8 | < categories net |
---|
9 | < maintainers markd openmaintainer |
---|
10 | < platforms darwin |
---|
11 | < |
---|
12 | < description An open source application and network monitor |
---|
13 | < |
---|
14 | < long_description ${description} |
---|
15 | < |
---|
16 | < homepage http://www.zabbix.com/ |
---|
17 | < master_sites sourceforge |
---|
18 | < checksums md5 fa4be4fa7ac20a33cc0aa5c27b827746 |
---|
19 | < patchfiles patch-src-zabbix_server-poller-checks_snmp.c.diff |
---|
20 | < depends_lib port:fping \ |
---|
21 | < port:curl \ |
---|
22 | < port:openssl |
---|
23 | < |
---|
24 | < configure.args --enable-server \ |
---|
25 | < --enable-agent \ |
---|
26 | < --with-net-snmp \ |
---|
27 | < --bindir=${prefix}/bin/zabbix \ |
---|
28 | < --sbindir=${prefix}/sbin/zabbix \ |
---|
29 | < --libexecdir=${prefix}/libexec/zabbix \ |
---|
30 | < --datadir=${prefix}/share/zabbix \ |
---|
31 | < --sysconfdir=${prefix}/etc/zabbix \ |
---|
32 | < --localstatedir=${prefix}/var/zabbix |
---|
33 | < |
---|
34 | < configure.ldflags-append -lresolv |
---|
35 | < |
---|
36 | < if { [variant_isset agent_only] } { |
---|
37 | < startupitem.create yes |
---|
38 | < startupitem.start "${prefix}/share/zabbix/zabbix_agentd.init start" |
---|
39 | < startupitem.stop "${prefix}/share/zabbix/zabbix_agentd.init stop" |
---|
40 | --- |
---|
41 | > name zabbix |
---|
42 | > version 1.8.6 |
---|
43 | > categories net |
---|
44 | > maintainers markd openmaintainer |
---|
45 | > platforms darwin |
---|
46 | > |
---|
47 | > description An open source application and network monitor (Server or proxy module) |
---|
48 | > |
---|
49 | > long_description ${description} |
---|
50 | > |
---|
51 | > homepage http://www.zabbix.com/ |
---|
52 | > master_sites sourceforge |
---|
53 | > checksums md5 4642fd263167211a73a02fe7f3bcd998 |
---|
54 | > patchfiles patch-src-zabbix_server-poller-checks_snmp.c.diff |
---|
55 | > depends_lib port:fping \ |
---|
56 | > port:curl \ |
---|
57 | > port:openssl |
---|
58 | > |
---|
59 | > configure.args --enable-server \ |
---|
60 | > --with-net-snmp \ |
---|
61 | > --bindir=${prefix}/bin/zabbix \ |
---|
62 | > --sbindir=${prefix}/sbin/zabbix \ |
---|
63 | > --libexecdir=${prefix}/libexec/zabbix \ |
---|
64 | > --datadir=${prefix}/share/zabbix \ |
---|
65 | > --sysconfdir=${prefix}/etc/zabbix \ |
---|
66 | > --localstatedir=${prefix}/var/zabbix |
---|
67 | > |
---|
68 | > configure.ldflags-append -lresolv |
---|
69 | > |
---|
70 | > if { [variant_isset proxy] } { |
---|
71 | > startupitem.create yes |
---|
72 | > startupitem.name zabbix_proxy |
---|
73 | > startupitem.start "${prefix}/share/zabbix/zabbix_proxy.init start" |
---|
74 | > startupitem.stop "${prefix}/share/zabbix/zabbix_proxy.init stop" |
---|
75 | 40,42c40,43 |
---|
76 | < startupitem.create yes |
---|
77 | < startupitem.start "${prefix}/share/zabbix/zabbix_server.init start" |
---|
78 | < startupitem.stop "${prefix}/share/zabbix/zabbix_server.init stop" |
---|
79 | --- |
---|
80 | > startupitem.create yes |
---|
81 | > startupitem.name zabbix_server |
---|
82 | > startupitem.start "${prefix}/share/zabbix/zabbix_server.init start" |
---|
83 | > startupitem.stop "${prefix}/share/zabbix/zabbix_server.init stop" |
---|
84 | 58,60c59,61 |
---|
85 | < description {Use PostgreSQL 8.2.x for server database} { |
---|
86 | < depends_lib-append port:postgresql82 |
---|
87 | < configure.args-append --with-pgsql=${prefix}/lib/postgresql82/bin/pg_config |
---|
88 | --- |
---|
89 | > description {Use PostgreSQL 8.2.x for server database} { |
---|
90 | > depends_lib-append port:postgresql82 |
---|
91 | > configure.args-append --with-pgsql=${prefix}/lib/postgresql82/bin/pg_config |
---|
92 | 81,88c82,85 |
---|
93 | < variant agent_only conflicts mysql5 pgsql81 pgsql82 pgsql83 pgsql84 sqlite3 \ |
---|
94 | < description {Do not install the Zabbix server} { |
---|
95 | < depends_lib-delete port:fping \ |
---|
96 | < port:curl \ |
---|
97 | < port:openssl |
---|
98 | < |
---|
99 | < configure.args-delete --enable-server \ |
---|
100 | < --with-net-snmp |
---|
101 | --- |
---|
102 | > variant proxy \ |
---|
103 | > description {Do not install the Zabbix server but install the proxy} { |
---|
104 | > configure.args-delete --enable-server |
---|
105 | > configure.args-append --enable-proxy |
---|
106 | 91c88 |
---|
107 | < if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3] && ![variant_isset agent_only]} { |
---|
108 | --- |
---|
109 | > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { |
---|
110 | 96,97c93,94 |
---|
111 | < reinplace "s|#DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ |
---|
112 | < ${worksrcpath}/misc/conf/zabbix_server.conf |
---|
113 | --- |
---|
114 | > if { [variant_isset proxy] } { |
---|
115 | > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { |
---|
116 | 99,100c96,114 |
---|
117 | < reinplace "s|#FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ |
---|
118 | < ${worksrcpath}/misc/conf/zabbix_server.conf |
---|
119 | --- |
---|
120 | > reinplace "s|# DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ |
---|
121 | > ${worksrcpath}/misc/conf/zabbix_proxy.conf |
---|
122 | > } |
---|
123 | > |
---|
124 | > reinplace "s|# FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ |
---|
125 | > ${worksrcpath}/misc/conf/zabbix_proxy.conf |
---|
126 | > reinplace "s|# Fping6Location=/usr/sbin/fping6|Fping6Location=${prefix}/sbin/fping6|g" \ |
---|
127 | > ${worksrcpath}/misc/conf/zabbix_proxy.conf |
---|
128 | > } else { |
---|
129 | > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { |
---|
130 | > reinplace "s|# DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ |
---|
131 | > ${worksrcpath}/misc/conf/zabbix_server.conf |
---|
132 | > } |
---|
133 | > |
---|
134 | > reinplace "s|# FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ |
---|
135 | > ${worksrcpath}/misc/conf/zabbix_server.conf |
---|
136 | > reinplace "s|# Fping6Location=/usr/sbin/fping6|Fping6Location=${prefix}/sbin/fping6|g" \ |
---|
137 | > ${worksrcpath}/misc/conf/zabbix_server.conf |
---|
138 | > } |
---|
139 | 110,111c124,147 |
---|
140 | < if { [variant_isset agent_only] } { |
---|
141 | < # Don't install MySQL data and frontend stuff for agent_only |
---|
142 | --- |
---|
143 | > if { [variant_isset proxy] } { |
---|
144 | > # Copy sample server .conf files |
---|
145 | > xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix |
---|
146 | > xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_proxy.conf \ |
---|
147 | > ${destroot}${prefix}/etc/zabbix/zabbix_proxy.conf.sample |
---|
148 | > |
---|
149 | > # Copy database data and schemas |
---|
150 | > xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/data |
---|
151 | > xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/schema |
---|
152 | > |
---|
153 | > eval xinstall -m 755 [glob ${worksrcpath}/create/data/*.*] \ |
---|
154 | > ${destroot}${prefix}/share/zabbix/data |
---|
155 | > eval xinstall -m 755 [glob ${worksrcpath}/create/schema/*] \ |
---|
156 | > ${destroot}${prefix}/share/zabbix/schema |
---|
157 | > |
---|
158 | > # Create a startup script for the proxy |
---|
159 | > xinstall -m 755 ${portpath}/${filesdir}/zabbix_proxy.init \ |
---|
160 | > ${destroot}${prefix}/share/zabbix |
---|
161 | > reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
162 | > ${destroot}${prefix}/share/zabbix/zabbix_proxy.init |
---|
163 | > |
---|
164 | > # Set permissions for etc (protect passwords) |
---|
165 | > system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" |
---|
166 | > system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" |
---|
167 | 113,125d148 |
---|
168 | < # Copy sample agent .conf files |
---|
169 | < xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix |
---|
170 | < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \ |
---|
171 | < ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample |
---|
172 | < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \ |
---|
173 | < ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample |
---|
174 | < |
---|
175 | < # Copy a startup script for the agent |
---|
176 | < xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix |
---|
177 | < xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \ |
---|
178 | < ${destroot}${prefix}/share/zabbix |
---|
179 | < reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
180 | < ${destroot}${prefix}/share/zabbix/zabbix_agentd.init |
---|
181 | 128,133c151,152 |
---|
182 | < # Copy sample server and agent .conf files |
---|
183 | < xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix |
---|
184 | < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \ |
---|
185 | < ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample |
---|
186 | < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \ |
---|
187 | < ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample |
---|
188 | --- |
---|
189 | > # Copy sample server .conf files |
---|
190 | > xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix |
---|
191 | 136c155 |
---|
192 | < |
---|
193 | --- |
---|
194 | > |
---|
195 | 140c159 |
---|
196 | < |
---|
197 | --- |
---|
198 | > |
---|
199 | 145c164 |
---|
200 | < |
---|
201 | --- |
---|
202 | > |
---|
203 | 147d165 |
---|
204 | < |
---|
205 | 151c169 |
---|
206 | < |
---|
207 | --- |
---|
208 | > |
---|
209 | 153,163c171,175 |
---|
210 | < xinstall -m 755 ${portpath}/${filesdir}/zabbix_server.init \ |
---|
211 | < ${destroot}${prefix}/share/zabbix |
---|
212 | < reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
213 | < ${destroot}${prefix}/share/zabbix/zabbix_server.init |
---|
214 | < |
---|
215 | < # Create a startup script for the agent |
---|
216 | < xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \ |
---|
217 | < ${destroot}${prefix}/share/zabbix |
---|
218 | < reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
219 | < ${destroot}${prefix}/share/zabbix/zabbix_agentd.init |
---|
220 | < |
---|
221 | --- |
---|
222 | > xinstall -m 755 ${portpath}/${filesdir}/zabbix_server.init \ |
---|
223 | > ${destroot}${prefix}/share/zabbix |
---|
224 | > reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
225 | > ${destroot}${prefix}/share/zabbix/zabbix_server.init |
---|
226 | > |
---|
227 | 165,168c177,180 |
---|
228 | < system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" |
---|
229 | < system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" |
---|
230 | < system "chown -R www:www ${destroot}${prefix}/share/zabbix/frontends/*" |
---|
231 | < |
---|
232 | --- |
---|
233 | > system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" |
---|
234 | > system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" |
---|
235 | > system "chown -R www:www ${destroot}${prefix}/share/zabbix/frontends/*" |
---|
236 | > |
---|
237 | 172,175d183 |
---|
238 | < # Copy Win32 agent for normal and agent_only installs |
---|
239 | < xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 |
---|
240 | < xinstall -m 755 ${worksrcpath}/bin/win32/zabbix_agentd.exe \ |
---|
241 | < ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 |
---|
242 | 178a187 |
---|
243 | > if { [variant_isset proxy] } { |
---|
244 | 180c189,195 |
---|
245 | < "#### ZABBIX agent installation section (steps 1 - 3 only) #### |
---|
246 | --- |
---|
247 | > "#### #### |
---|
248 | > #### Begin ZABBIX proxy installation section #### |
---|
249 | > |
---|
250 | > |
---|
251 | > 1) Setup MySQL, i.e. via MacPorts: |
---|
252 | > |
---|
253 | > sudo port install mysql5-server |
---|
254 | 182d196 |
---|
255 | < 1) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_agentd.conf (rename & omit .sample) |
---|
256 | 184,185c198,210 |
---|
257 | < Set the following variable to the ip address of your ZABBIX server to |
---|
258 | < allow it access to the agent. |
---|
259 | --- |
---|
260 | > 2) Setup the ZABBIX MySQL database |
---|
261 | > |
---|
262 | > -Create the ZABBIX database |
---|
263 | > mysql5 -u root -p (enter password at prompt) |
---|
264 | > mysql> create database zabbix character set utf8; |
---|
265 | > mysql> quit; |
---|
266 | > |
---|
267 | > -Import the ZABBIX Schema |
---|
268 | > cd ${prefix}/share/zabbix/schema |
---|
269 | > cat mysql.sql | mysql5 -u root -p zabbix |
---|
270 | > cd ${prefix}/share/zabbix/data |
---|
271 | > cat data.sql | mysql5 -u root -p zabbix |
---|
272 | > cat images_mysql.sql | mysql5 -u root -p zabbix |
---|
273 | 187c212,221 |
---|
274 | < Server=x.x.x.x |
---|
275 | --- |
---|
276 | > -Create a MySQL 'zabbix' user and password |
---|
277 | > mysql5 -u root -p |
---|
278 | > mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix-mysql-password>'; |
---|
279 | > mysql> grant all privileges on zabbix.* to zabbix identified by '<zabbix-mysql-password>'; |
---|
280 | > mysql> quit; |
---|
281 | > |
---|
282 | > |
---|
283 | > 3) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_proxy.conf (rename & omit .sample) |
---|
284 | > |
---|
285 | > Modify these variables at the very least: |
---|
286 | 188a223,225 |
---|
287 | > DBName=zabbix |
---|
288 | > DBUser=zabbix |
---|
289 | > DBPassword=<zabbix-mysql-password> |
---|
290 | 190d226 |
---|
291 | < 2) Set zabbix_agentd to run at system boot |
---|
292 | 192c228 |
---|
293 | < sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist |
---|
294 | --- |
---|
295 | > 4) Set zabbix_proxy to run at system boot, then start it |
---|
296 | 194c230 |
---|
297 | < To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_agentd.init start (stop|status) |
---|
298 | --- |
---|
299 | > sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_proxy.plist |
---|
300 | 195a232 |
---|
301 | > To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_proxy.init start (stop|status) |
---|
302 | 197,198c234 |
---|
303 | < 3) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for |
---|
304 | < installation on Windows NT 4.0, Windows 2000, and Windows XP. |
---|
305 | --- |
---|
306 | > Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! |
---|
307 | 201,202c237 |
---|
308 | < #### End ZABBIX agent installation section #### |
---|
309 | < #### #### |
---|
310 | --- |
---|
311 | > 5) Install zabbix_agent via MacPorts: |
---|
312 | 203a239 |
---|
313 | > sudo port install zabbix_agentd |
---|
314 | 205c241,251 |
---|
315 | < #### #### |
---|
316 | --- |
---|
317 | > |
---|
318 | > 6) Open http://localhost/zabbix/ in your browser and walk through the setup, then login with default user 'Admin' and password 'zabbix'. |
---|
319 | > |
---|
320 | > |
---|
321 | > 7) Read the fine manual at http://www.zabbix.com/documentation/ |
---|
322 | > #### End ZABBIX proxy installation section #### |
---|
323 | > #### ####" |
---|
324 | > |
---|
325 | > } else { |
---|
326 | > notes \ |
---|
327 | > "#### #### |
---|
328 | 211c257 |
---|
329 | < sudo port install mysql5-server |
---|
330 | --- |
---|
331 | > sudo port install mysql5-server |
---|
332 | 217,219c263,265 |
---|
333 | < mysql5 -u root -p (enter password at prompt) |
---|
334 | < mysql> create database zabbix character set utf8; |
---|
335 | < mysql> quit; |
---|
336 | --- |
---|
337 | > mysql5 -u root -p (enter password at prompt) |
---|
338 | > mysql> create database zabbix character set utf8; |
---|
339 | > mysql> quit; |
---|
340 | 222,226c268,272 |
---|
341 | < cd ${prefix}/share/zabbix/schema |
---|
342 | < cat mysql.sql | mysql5 -u root -p zabbix |
---|
343 | < cd ${prefix}/share/zabbix/data |
---|
344 | < cat data.sql | mysql5 -u root -p zabbix |
---|
345 | < cat images_mysql.sql | mysql5 -u root -p zabbix |
---|
346 | --- |
---|
347 | > cd ${prefix}/share/zabbix/schema |
---|
348 | > cat mysql.sql | mysql5 -u root -p zabbix |
---|
349 | > cd ${prefix}/share/zabbix/data |
---|
350 | > cat data.sql | mysql5 -u root -p zabbix |
---|
351 | > cat images_mysql.sql | mysql5 -u root -p zabbix |
---|
352 | 229,232c275,278 |
---|
353 | < mysql5 -u root -p |
---|
354 | < mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix-mysql-password>'; |
---|
355 | < mysql> grant all privileges on zabbix.* to zabbix identified by '<zabbix-mysql-password>'; |
---|
356 | < mysql> quit; |
---|
357 | --- |
---|
358 | > mysql5 -u root -p |
---|
359 | > mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix-mysql-password>'; |
---|
360 | > mysql> grant all privileges on zabbix.* to zabbix identified by '<zabbix-mysql-password>'; |
---|
361 | > mysql> quit; |
---|
362 | 239,241c285,287 |
---|
363 | < DBName=zabbix |
---|
364 | < DBUser=zabbix |
---|
365 | < DBPassword=<zabbix-mysql-password> |
---|
366 | --- |
---|
367 | > DBName=zabbix |
---|
368 | > DBUser=zabbix |
---|
369 | > DBPassword=<zabbix-mysql-password> |
---|
370 | 246c292 |
---|
371 | < sudo port install php5 php5-gd php5-mbstring php5-mysql php5-sockets |
---|
372 | --- |
---|
373 | > sudo port install php5 php5-gd php5-mbstring php5-mysql php5-sockets |
---|
374 | 251c297 |
---|
375 | < sudo ln -s ${prefix}/share/zabbix/frontends/php <Apache-docroot>/zabbix |
---|
376 | --- |
---|
377 | > sudo ln -s ${prefix}/share/zabbix/frontends/php <Apache-docroot>/zabbix |
---|
378 | 256c302 |
---|
379 | < sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist |
---|
380 | --- |
---|
381 | > sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_server.plist |
---|
382 | 260c306,307 |
---|
383 | < Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! |
---|
384 | --- |
---|
385 | > Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! |
---|
386 | > |
---|
387 | 261a309 |
---|
388 | > 7) Install zabbix_agent via MacPorts: |
---|
389 | 263,265c311 |
---|
390 | < 7) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for |
---|
391 | < installation on Windows NT 4.0, Windows 2000, and Windows XP. See |
---|
392 | < the ReadMe.txt for instructions. |
---|
393 | --- |
---|
394 | > sudo port install zabbix_agentd |
---|
395 | 271c317,322 |
---|
396 | < 9) Read the fine manual at http://www.zabbix.com/documentation/" |
---|
397 | --- |
---|
398 | > 9) Read the fine manual at http://www.zabbix.com/documentation/ |
---|
399 | > |
---|
400 | > |
---|
401 | > #### End ZABBIX server installation section #### |
---|
402 | > #### ####" |
---|
403 | > } |
---|