cacti on suse 10.1 (problems)

Discussion in 'Installation/Configuration' started by IKShadow, Nov 23, 2006.

  1. IKShadow

    IKShadow New Member

    Hi
    I have some problems with cacti on suse 10.1

    Procedure:
    1. installed cacti with yast. (it was h version not lates i )
    2. I created new database and import cacti.sql in it.

    I checked what files was installed:

    Code:
    krneki:/usr/share/cacti # ll
    total 800
    -rw-r--r-- 1 root root   5892 2006-05-02 11:16 about.php
    -rw-r--r-- 1 root root   4773 2006-05-02 11:16 auth_changepassword.php
    -rw-r--r-- 1 root root   6189 2006-05-02 11:16 auth_login.php
    -rw-r--r-- 1 root root 170643 2006-05-02 11:16 cacti.sql
    -rw-r--r-- 1 root root  13108 2006-05-02 11:16 cdef.php
    -rw-r--r-- 1 root root  16569 2006-05-02 11:16 cmd.php
    -rw-r--r-- 1 root root   5917 2006-05-02 11:16 color.php
    -rw-r--r-- 1 root root   2753 2006-05-02 11:16 copy_cacti_user.php
    -rw-r--r-- 1 root root  17536 2006-05-02 11:16 data_input.php
    -rw-r--r-- 1 root root  28164 2006-05-02 11:16 data_queries.php
    -rw-r--r-- 1 root root  43802 2006-05-02 11:16 data_sources.php
    -rw-r--r-- 1 root root  30344 2006-05-02 11:16 data_templates.php
    drwxr-xr-x 5 root root   4096 2006-11-23 10:28 docs
    -rw-r--r-- 1 root root   6110 2006-05-02 11:16 gprint_presets.php
    -rw-r--r-- 1 root root   3423 2006-05-02 11:16 graph_image.php
    -rw-r--r-- 1 root root  10497 2006-05-02 11:16 graph.php
    -rw-r--r-- 1 root root   6319 2006-05-02 11:16 graph_settings.php
    -rw-r--r-- 1 root root  11945 2006-05-02 11:16 graphs_items.php
    -rw-r--r-- 1 root root  30752 2006-05-02 11:16 graphs_new.php
    -rw-r--r-- 1 root root  46835 2006-05-02 11:16 graphs.php
    -rw-r--r-- 1 root root  10097 2006-05-02 11:16 graph_templates_inputs.php
    -rw-r--r-- 1 root root  17367 2006-05-02 11:16 graph_templates_items.php
    -rw-r--r-- 1 root root  22578 2006-05-02 11:16 graph_templates.php
    -rw-r--r-- 1 root root  23122 2006-05-02 11:16 graph_view.php
    -rw-r--r-- 1 root root  33450 2006-05-02 11:16 host.php
    -rw-r--r-- 1 root root  14236 2006-05-02 11:16 host_templates.php
    drwxr-xr-x 2 root root   4096 2006-11-23 10:28 images
    drwxr-xr-x 5 root root   4096 2006-11-23 10:34 include
    -rw-r--r-- 1 root root   2271 2006-05-02 11:16 index.php
    drwxr-xr-x 2 root root   4096 2006-11-23 10:28 install
    drwxr-xr-x 3 root root   4096 2006-11-23 10:28 lib
    -rw-r--r-- 1 root root   1796 2006-05-02 11:16 logout.php
    -rw-r--r-- 1 root root   4673 2006-05-02 11:16 poller_commands.php
    -rw-r--r-- 1 root root   2325 2006-05-02 11:16 poller_export.php
    -rw-r--r-- 1 root root   9441 2006-05-02 11:16 poller.php
    -rw-r--r-- 1 root root   4343 2006-05-02 11:16 poller_reindex_hosts.php
    -rw-r--r-- 1 root root   4170 2006-05-02 11:16 rebuild_poller_cache.php
    drwxr-xr-x 5 root root   4096 2006-11-23 10:28 resource
    -rw-r--r-- 1 root root   6622 2006-05-02 11:16 rra.php
    drwxr-xr-x 2 root root   4096 2006-11-23 10:28 scripts
    -rw-r--r-- 1 root root   6760 2006-05-02 11:16 script_server.php
    -rw-r--r-- 1 root root   4833 2006-05-02 11:16 settings.php
    -rw-r--r-- 1 root root   6813 2006-05-02 11:16 templates_export.php
    -rw-r--r-- 1 root root   5954 2006-05-02 11:16 templates_import.php
    -rw-r--r-- 1 root root  17463 2006-05-02 11:16 tree.php
    -rw-r--r-- 1 root root  27829 2006-05-02 11:16 user_admin.php
    -rw-r--r-- 1 root root  11406 2006-05-02 11:16 utilities.php
    Code:
    krneki:/usr/share/doc/packages # cd cacti/
    krneki:/usr/share/doc/packages/cacti # ll
    total 76
    -rw-r--r-- 1 root root 45679 2006-01-04 04:08 CHANGELOG
    -rw-r--r-- 1 root root  3810 2006-01-04 04:08 CONTRIB
    -rw-r--r-- 1 root root 15141 2006-01-04 04:08 LICENSE
    -rw-r--r-- 1 root root  4521 2006-01-04 04:08 README
    krneki:/usr/share/doc/packages/cacti #
    Code:
    krneki:/usr/share/doc/packages/cacti # cd /var/lib/cacti/
    krneki:/var/lib/cacti # ll
    total 336
    -rw-r--r-- 1 root root 141488 2006-11-23 11:35 localhost_load_1min_5.rrd
    -rw-r--r-- 1 root root  47840 2006-11-23 11:35 localhost_mem_buffers_3.rrd
    -rw-r--r-- 1 root root  47840 2006-11-23 11:35 localhost_mem_swap_4.rrd
    -rw-r--r-- 1 root root  47840 2006-11-23 11:35 localhost_proc_7.rrd
    -rw-r--r-- 1 root root  47840 2006-11-23 11:35 localhost_users_6.rrd
    Code:
    krneki:/var/lib/cacti # cd /var/log/cacti/
    krneki:/var/log/cacti # ll
    total 4
    -rwxrwxrwx 1 webmaster root 584 2006-11-23 11:35 cacti.log
    krneki:/var/log/cacti #
    Code:
    krneki:/var/log/cacti # cd /etc/logrotate.d/
    krneki:/etc/logrotate.d # ll
    total 40
    -rw-r--r-- 1 root root 1097 2006-07-27 15:40 apache2
    -rw-r--r-- 1 root root   57 2006-05-02 11:16 cacti
    -rw-r--r-- 1 root root 1056 2006-09-14 01:26 mysql
    -rw-r--r-- 1 root root  229 2006-08-26 02:10 net-snmp
    -rw-r--r-- 1 root root  187 2006-06-29 20:01 ntp
    -rw-r--r-- 1 root root  129 2006-05-02 10:34 scpm
    -rw-r--r-- 1 root root 1113 2006-04-23 03:57 syslog
    -rw-r--r-- 1 root root  551 2006-04-23 05:34 syslog-ng
    -rw-r--r-- 1 root root  134 2006-04-23 03:43 wtmp
    -rw-r--r-- 1 root root  135 2006-09-14 18:07 zmd-backend
    krneki:/etc/logrotate.d #
    Code:
    krneki:/etc/cron.d # ll
    total 4
    -rw-r--r-- 1 root root 79 2006-11-23 13:13 cacti
    krneki:/etc/cron.d #
    3. I modifed /etc/cron.d/cacti
    old
    */5 * * * * wwwrun php /usr/share/cacti/poller.php > /dev/null 2>&1

    to
    */5 * * * * wwwrun php5 /usr/share/cacti/poller.php > /dev/null 2>&1

    (I have only php5 installed )

    4. I modifed config.php with database settings. (in :/usr/share/cacti )

    5. I copied :/usr/share/cacti to /srv/www/web4/web/cacti ( web 4 is on domain i would like access to cacti ... http://www.mydomain.com/cacti )

    6. I runed install and selected those dropdowns for rrdtools, corrected php path etc..

    7.I exec command:
    Code:
    php5 /srv/www/web4/web/cacti/poller.php
    Received this error:

    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/extensions/wddx.so' - /usr/lib/php5/extensions/wddx.so: undefined symbol: xml_utf8_encode in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/extensions/wddx.so' - /usr/lib/php5/extensions/wddx.so: undefined symbol: xml_utf8_encode in Unknown on line 0
    OK u:0.00 s:0.01 r:0.00
    OK u:0.00 s:0.01 r:0.00
    OK u:0.00 s:0.01 r:0.00
    OK u:0.00 s:0.01 r:0.00
    OK u:0.00 s:0.01 r:0.00
    11/23/2006 01:19:32 PM - SYSTEM STATS: Time:1.0268 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
    8. I logged at cacti and changed password.

    When i checked graphs i dont see them ... the graph picture are missing.
    I also could not clear cacti log file ... so I chmod 777 cacti.log ( lol I)


    Then i started to read:
    http://www.howtoforge.com/cacti_ispconfig

    I notice i did not do:
    sudo chown -R www-data:www-data rra ( I dont even have this rra folder )
    sudo chown -R www-data:www-data logs

    OK and i guess this is optional ( didnt do that either )
    sudo wget http://download.cactiusers.org/downloads/cacti-plugin-arch.gzip
    sudo tar xvzf cacti-plugin-arch.tar.gz
     
  2. falko

    falko Super Moderator

    You must install the wddx PHP5 module. Run
    Code:
    yast
    and search for it.
     
  3. IKShadow

    IKShadow New Member

    Its installed

    The only wddx in yast is: php5-wddx ... I think it was installed by cacti (dependenci)
     
  4. Hans

    Hans Moderator

    Explanation:

    sudo chown -R www-data:www-data rra
    sudo chown -R www-data:www-data logs


    With these command you give Apache write permissions to the selected directories.
    It is more save then chmod 777 for instance.

    Note:

    www-data:www-data is for Debian Linux.

    Replace www-data:www-data with apache:apache for RedHat like systems.
    (RHEL, CentOS & Fedora).

    Replace www-data:www-data with www:www for Suse Linux.
     
    Last edited: Nov 24, 2006
  5. falko

    falko Super Moderator

    And is wddx enabled in your php.ini? There must be a line like
    Code:
    extension=wddx.so
    or similar.
     
  6. IKShadow

    IKShadow New Member

    I could not find it.

    hmm my php.ini look diffrened that one i have on my Win box.
     

    Attached Files:

    • php.txt
      File size:
      43.6 KB
      Views:
      272
  7. falko

    falko Super Moderator

    What's the output of
    Code:
    ls -l /usr/lib/php5/extensions
    ?
     
  8. IKShadow

    IKShadow New Member

    Code:
    krneki:/srv/www # ls -l /usr/lib/php5/extensions
    total 4332
    -rw-r--r-- 1 root root   30324 2006-11-07 15:52 bcmath.so
    -rw-r--r-- 1 root root   16956 2006-05-02 11:31 bz2.so
    -rw-r--r-- 1 root root   21900 2006-05-02 11:31 calendar.so
    -rw-r--r-- 1 root root   10212 2006-05-02 11:31 ctype.so
    -rw-r--r-- 1 root root   50528 2006-11-07 15:52 curl.so
    -rw-r--r-- 1 root root   27424 2006-05-02 11:31 dbase.so
    -rw-r--r-- 1 root root  139744 2006-11-07 15:52 dom.so
    -rw-r--r-- 1 root root   48744 2006-11-07 15:52 exif.so
    -rw-r--r-- 1 root root   11920 2006-05-02 11:31 filepro.so
    -rw-r--r-- 1 root root   39512 2006-11-07 15:52 ftp.so
    -rw-r--r-- 1 root root  340108 2006-11-07 15:52 gd.so
    -rw-r--r-- 1 root root   11048 2006-05-02 11:31 gettext.so
    -rw-r--r-- 1 root root   37668 2006-05-02 11:31 gmp.so
    -rw-r--r-- 1 root root   29852 2006-11-07 15:52 iconv.so
    -rw-r--r-- 1 root root  101604 2006-11-07 15:52 imap.so
    -rw-r--r-- 1 root root   43936 2006-11-07 15:52 ldap.so
    -rw-r--r-- 1 root root 1693852 2006-11-07 15:52 mbstring.so
    -rw-r--r-- 1 root root   33728 2006-05-02 11:31 mcrypt.so
    -rw-r--r-- 1 root root    7140 2006-05-02 11:31 mhash.so
    -rw-r--r-- 1 root root  109856 2006-11-07 15:52 mysqli.so
    -rw-r--r-- 1 root root   48704 2006-11-07 15:52 mysql.so
    -rw-r--r-- 1 root root   74980 2006-05-02 11:31 ncurses.so
    -rw-r--r-- 1 root root   64712 2006-05-02 11:31 odbc.so
    -rw-r--r-- 1 root root   70560 2006-05-02 11:31 openssl.so
    -rw-r--r-- 1 root root   16004 2006-05-02 11:31 pcntl.so
    -rw-r--r-- 1 root root   81184 2006-11-07 15:52 pdo.so
    -rw-r--r-- 1 root root  102624 2006-11-07 15:52 pgsql.so
    -rw-r--r-- 1 root root   19000 2006-05-02 11:31 posix.so
    -rw-r--r-- 1 root root    7620 2006-05-02 11:31 shmop.so
    -rw-r--r-- 1 root root   24828 2006-05-02 11:31 snmp.so
    -rw-r--r-- 1 root root  311492 2006-11-07 15:52 soap.so
    -rw-r--r-- 1 root root   39588 2006-05-02 11:31 sockets.so
    -rw-r--r-- 1 root root  361868 2006-05-02 11:31 sqlite.so
    -rw-r--r-- 1 root root   11060 2006-05-02 11:31 sysvmsg.so
    -rw-r--r-- 1 root root    7080 2006-05-02 11:31 sysvsem.so
    -rw-r--r-- 1 root root   10120 2006-05-02 11:31 sysvshm.so
    -rw-r--r-- 1 root root   17192 2006-05-02 11:31 tokenizer.so
    -rw-r--r-- 1 root root   31172 2006-11-07 15:52 wddx.so
    -rw-r--r-- 1 root root   21052 2006-05-02 11:31 xmlreader.so
    -rw-r--r-- 1 root root   84736 2006-11-07 15:52 xmlrpc.so
    -rw-r--r-- 1 root root   29204 2006-05-02 11:31 xmlwriter.so
    -rw-r--r-- 1 root root   22592 2006-05-02 11:31 xsl.so
    -rw-r--r-- 1 root root   27260 2006-05-02 11:31 zlib.so
     
  9. falko

    falko Super Moderator

    Then add
    Code:
    extension=wddx.so
    at the end of your php.ini and restart Apache.
     

Share This Page