Ticket #26131: Portfile-zabbix.diff
File Portfile-zabbix.diff, 3.7 KB (added by bjoernalbers@…, 14 years ago) |
---|
-
ports/net/zabbix/Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name zabbix 6 version 1. 6.87 revision 36 version 1.8.2 7 revision 4 8 8 categories net 9 9 maintainers markd openmaintainer 10 10 platforms darwin … … 13 13 14 14 long_description ${description} 15 15 16 homepage http://www.zabbix.com 16 homepage http://www.zabbix.com/ 17 17 master_sites sourceforge 18 checksums md5 3255afd2d44454bae3ec5158920a824f19 patchfiles patch-include-common.h18 checksums md5 fa4be4fa7ac20a33cc0aa5c27b827746 19 patchfiles patch-src-zabbix_server-poller-checks_snmp.c.diff 20 20 depends_lib port:fping \ 21 21 port:curl \ 22 22 port:openssl … … 209 209 ui_msg "\n#### To complete the ZABBIX installation #### 210 210 211 211 212 1) Setup MySQL (for new MySQL installs)212 1) Setup MySQL, i.e. via MacPorts: 213 213 214 -Configure MySQL: 215 sudo -u mysql ${prefix}/lib/mysql5/bin/mysql_install_db 216 217 -Start MySQL and set it to run at system boot: 218 sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist 219 220 -Set a root MySQL password 221 Follow the instructions that were given after you executed 'mysql_install_db' above 214 sudo port install mysql5-server 222 215 223 216 224 217 2) Setup the ZABBIX MySQL database 225 218 226 219 -Create the ZABBIX database 227 220 mysql5 -u root -p (enter password at prompt) 228 mysql> create database zabbix ;229 mysql> exit;221 mysql> create database zabbix character set utf8; 222 mysql> quit; 230 223 231 224 -Import the ZABBIX Schema 232 225 cd ${prefix}/share/zabbix/schema … … 237 230 238 231 -Create a MySQL 'zabbix' user and password 239 232 mysql5 -u root -p 240 mysql> grant SELECT, INSERT, UPDATE, DELETE, CREATE on zabbix.* to zabbix@localhost;241 mysql> grant SELECT, INSERT, UPDATE, DELETE, CREATE on zabbix.* to zabbix;242 mysql> set PASSWORD FOR zabbix@localhost = OLD_PASSWORD('zabbix-db-password');233 mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix-mysql-password>'; 234 mysql> grant all privileges on zabbix.* to zabbix identified by '<zabbix-mysql-password>'; 235 mysql> quit; 243 236 244 NOTE: ZABBIX uses MySQL old-style password hashes so the OLD_PASSWORD keyword is necessary245 237 246 238 3) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_server.conf (rename & omit .sample) 247 239 … … 252 244 DBPassword=<zabbix-mysql-password> 253 245 254 246 255 4) Install PHP 4 or 5 (not covered) 256 257 Set mysql.default_socket path to ${prefix}/var/run/mysql5/mysqld.sock in this PHP file: 258 259 ./phpx/lib/php.ini (in /usr/local, ${prefix}, or /Library depending on PHP package) 247 4) Install PHP 5, i.e. via MacPorts: 260 248 261 Modify the variables below in this Zabbix file: 262 ${prefix}/share/zabbix/frontends/php/include/db.inc.php 263 264 \$DB_USER =\"zabbix\"; 265 \$DB_PASSWORD =\"mysql-zabbix-password\"; 249 sudo port install php5 php5-gd php5-mbstring php5-mysql php5-sockets 266 250 267 251 268 252 5) Set a symbolic link in your Apache document root pointing to the PHP frontend files … … 276 260 277 261 To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_server.init start (stop|status) 278 262 263 Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! 264 279 265 280 266 7) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for 281 267 installation on Windows NT 4.0, Windows 2000, and Windows XP. See 282 268 the ReadMe.txt for instructions. 283 269 284 270 285 8) Login at http://localhost/zabbix with default user 'admin' with no password, then 286 be sure to read the manual: http://www.zabbix.com/manual/v1.1/index.php 271 8) Open http://localhost/zabbix/ in your browser and walk through the setup, then login with default user 'Admin' and password 'zabbix'. 272 273 274 9) Read the fine manual at http://www.zabbix.com/documentation/ 287 275 288 276 \n" 289 277 # End else clause