File: INSTALL

package info (click to toggle)
php4-rrdtool 1.04-11
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,168 kB
  • ctags: 85
  • sloc: sh: 9,365; ansic: 356; php: 102; makefile: 72; awk: 43
file content (79 lines) | stat: -rw-r--r-- 2,737 bytes parent folder | download
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
$Id: INSTALL,v 1.4 2001/12/22 20:09:20 joeym Exp joeym $

* Installing rrdtool module as a self-contained extension:

There are two ways to install the rrdtool module for php4/zend.
The first involves simply compiling the rrdtool module as a
'self-contained extension'.  This is similar to the previous
rrdtool module for php3 in that to use the rrd_* functions you
must first load the module in each script that will use the
rrd_* functions with a dl() call.  See the USAGE file for
more info on this.

To install as a self-contained extension:

    1.  Install rrdtool.  (Tested with rrdtool-1.0.33)
        Make sure you build shared and static libraries, if
        your system lets you.  

        rrdtool% ./configure --enable-shared

    2.  Make sure Apache is installed.

    3.  Make sure PHP4 is installed (tested with php-4.0.6)

    4.  Now we can build the rrdtool module.  

        rrdtool-module% ./configure --with-rrdtool=/usr/local/rrdtool \
                            --with-php-config=/usr/local/bin/php-config

        'php-config' is usually installed in /usr/local/bin, and is often
        readable/executable only by root, so you will have to run the
        configure script as root.

        rrdtool-module% make
        rrdtool-module% make install

        This should build and install 'rrdtool.so' into the correct
        directory on your system.

        Now you can access the rrd_* functions from your php4 scripts
        by first calling "  dl("rrdtool.so"); ".  See the README and USAGE
        for more info on the rrd_* functions.


* Installing the rrdtool module as an embedded extension

Installing rrdtool module as an embedded extension provides all of
your php4 scripts access to the rrd_* functions without having to
load any shared libs with the dl() function of php.  

In order to install the rrdtool module as an embedded extension
you will need to have autoconf/automake and friends installed.

    1. make sure you have the php4 sources untarred somewhere, lets
        call it /src/php-4.0.6/

    2. create a home for our embedded extension in the php4 source
        tree.

            % mkdir /src/php-4.0.6/ext/rrdtool

    3. from the rrdtool module directory, do:

            % cp config.m4 Makefile.in php_rrdtool.h rrdtool.c \
                /src/php-4.0.6/ext/rrdtool/

    4. Now we must recreate the configure scripts, etc for php4.
    
            % cd /src/php-4.0.6
            % ./buildconf
            
    5. If all goes well, you should be ready to run configure for
        php4.  Make sure you include "--with-rrdtool" in the options
        to configure.  

    6. make, make install.  and you're ready to go.


- Joe Miller, <joeym@joeym.net>, 8/23/2001