Ticket #26131: Portfile-zabbix.diff

File Portfile-zabbix.diff, 3.7 KB (added by bjoernalbers@…, 14 years ago)
  • ports/net/zabbix/Portfile

    old new  
    33PortSystem      1.0
    44
    55name                    zabbix
    6 version                 1.6.8
    7 revision                3
     6version                 1.8.2
     7revision                4
    88categories              net
    99maintainers             markd openmaintainer
    1010platforms               darwin
     
    1313
    1414long_description        ${description}
    1515
    16 homepage                http://www.zabbix.com
     16homepage                http://www.zabbix.com/
    1717master_sites            sourceforge
    18 checksums               md5 3255afd2d44454bae3ec5158920a824f
    19 patchfiles              patch-include-common.h
     18checksums               md5 fa4be4fa7ac20a33cc0aa5c27b827746
     19patchfiles      patch-src-zabbix_server-poller-checks_snmp.c.diff
    2020depends_lib             port:fping \
    2121                        port:curl \
    2222                        port:openssl
     
    209209ui_msg "\n#### To complete the ZABBIX installation ####
    210210
    211211
    212 1) Setup MySQL (for new MySQL installs)
     2121) Setup MySQL, i.e. via MacPorts:
    213213
    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
    222215
    223216
    2242172) Setup the ZABBIX MySQL database
    225218
    226219-Create the ZABBIX database
    227220        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;
    230223
    231224-Import the ZABBIX Schema
    232225        cd ${prefix}/share/zabbix/schema
     
    237230
    238231-Create a MySQL 'zabbix' user and password
    239232        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;
    243236
    244 NOTE: ZABBIX uses MySQL old-style password hashes so the OLD_PASSWORD keyword is necessary
    245237
    2462383) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_server.conf (rename & omit .sample)
    247239
     
    252244        DBPassword=<zabbix-mysql-password>
    253245
    254246
    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)
     2474) Install PHP 5, i.e. via MacPorts:
    260248
    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
    266250
    267251
    2682525) Set a symbolic link in your Apache document root pointing to the PHP frontend files
     
    276260
    277261   To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_server.init start (stop|status)
    278262
     263        Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)!
     264
    279265
    2802667) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for
    281267   installation on Windows NT 4.0, Windows 2000, and Windows XP.  See
    282268   the ReadMe.txt for instructions.
    283269
    284270
    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
     2718) Open http://localhost/zabbix/ in your browser and walk through the setup, then login with default user 'Admin' and password 'zabbix'.
     272
     273
     2749) Read the fine manual at http://www.zabbix.com/documentation/
    287275
    288276\n"
    289277# End else clause