Installing the Source Package
When you download the package file, store it somewhere on your hard drive (like /usr/src/rmagic or ~/rmagic). When it's completed, uncompress the archive using gzip and/or tar or some similar utility. If you have GNU tar you can simply use 'tar -xzf rmagic-*.tar.gz'.
When you uncompress the archive, it will create a subdirectory under the
location you told it called
docs. From your web browser (or
vi if it reads HTML files on your system), open
index.html in this directory to learn how to use
Report Magic for Analog. In the Report Magic directory is also a file called
README. Please see this file for last-minute changes.
(These instructions are also in the file
INSTALL in the
root of the source package archive.)
The first time you install Report Magic can be somewhat complicated. Please
read through the instructions on this page completely before starting so
you have a good idea of what will be required. Because much of Report Magic
is built with reusable code, upgrades will be simple. For upgrade notes, see
the What's New page. These instructions and the
included Install.PL script assume you are using a Unix-like system. If not,
it is up to you to make the necessary translations in the instructions and
the Install.PL file to reflect you computer's file system.
To run Report Magic, you need to have Perl 5.004 or newer installed on your system. (You really should have 5.005 or 5.6) You can find the version of Perl that you have by typing 'perl -v' at the prompt. If the system says 'unknown command' you either do not have Perl installed or it is not on your path. If you don't have it see the perl.com home page for details on getting the Perl interpreter. Compiled binaries for Perl are available for almost every platform.
Before installing for the first time, you will need to install some system libraries if they aren't already installed. To generate the graphs, Report Magic needs three libraries - zlib, libpng and libgd. If you want TrueType font support in your graphs, you can also install the lttf TrueType library from FreeType. If you want jpeg support, you can install the jpeg-6b library.
It is much easier to install the libgd library from a package, if your operating system supports such. Of course, you will probably want to make sure a recent version is available. As of this writing, libgd is at version 1.8.3. The following packages were known to exist at this time as well:
www/reportmagicon releases after 4.2. There is also a ready-to-run package on the FTP mirror sites and CDs after 4.2. Analog is in
www/analog. Details on installing ports are covered in the Handbook. Basically, in each directory 'make install && make clean' will do the job and recover the drive space used. This may not be the latest version, but it should have links to depenedent packages.
Install.PLto install the Perl modules and Report Magic files.
libgdpackages available for most sparc versions of Solaris:
Install.PLto get the Perl modules and Repport Magic files installed.
If one of the above packages does not work for you, then you can procede with the standard install procedure described below to install libgd from the source.
$ ./configure $ make # make install (as root)
| +- zlib | +- libpng
$ mv zlib* zlib $ mv libpng* libpng $ cd libpng $ cp scripts/makefile.stf Makefile $ make # make install (as root)
$ ./configure $ make # make install (as root)
/usr/local/libor your system's equivalents. If not it can be downloaded from ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. After reading the installation instructions and license, you can build it with the following commands:
$ ./configure --enable-shared $ make $ make test # make install (as root)
INCLUDEDIRS=line to make it work with freetype-1.3.1. Read the notes in the Makefile for more information. You can then build the library with the standard:
$ make # make install (as root)
If all system libraries installed successfully, then the rest should be quite simple. To install change to root user, change directory into the rmagic directory where you uncompressed the Report Magic archive and type the following command:
If all goes well, this will load all the necessary Perl modules (that
aren't already loaded and up-to-date), install Report Magic in the
/usr/local/etc/httpd/rmagic/ (or similar directory
with version number) and install the documentation below that.
If you want to install Report Magic elsewhere, simply edit the configuration settings in the top of the Install.PL file.
Autoloading the required perl modules from CPAN may require several more steps. First, this uses the CPAN module to load modules from CPAN. You will need to configure this the first time it runs by answering serveral questions. It also requires that you are connected to the Internet (or a local CPAN mirror if you have such and your CPAN module has been configured for such). Second, using this may be a security risk. There is no signature system for CPAN code. It is possible (though unlikely) that CPAN downloads may have been tampered with. If this bothers you, don't run this part of the install. Instead install all the modules by hand (see below). (Although, this still could contain tampered modules, but at least you can look at all the sources first before you put them in your Perl site library.)
When configuring your CPAN setup, you will be asked for the URL of your favorite CPAN site. On some systems this includes a list to choose from, on some it doesn't. If no list is presented, you can type in 'ftp://ftp.cpan.org/pub/CPAN'.
While the install script is running, watch carefully for any errors. The script will continue to try to install all necessary Perl even if some fail. This may mean that other will fail later (because of dependencies). Also, the latest version of GD will ask you some question about the way libgd was installed on your system.
If you don't want to auto-load the latest version of the necessary Perl modules, use this instead:
perl Install.PL -no_modules
If you just want to auto-load the latest version of the necessary Perl modules, but don't want to move Report Magic (i.e. you will run it from the directory you unarchived it into) use this instead:
perl Install.PL -only_modules
Report Magic for Analog requires several Perl modules, as well as the core Perl interpreter. If you've chosen not to autoload the necessary, Perl modules, they are shown below in the recommended install order. After each module name is a version number indicating when in the Report Magic history, the module dependency was added. If you are upgrading from a previous version, you need only add modules that show a newer version dependency than the one you are upgrading from.
Each Perl module will install with the standard perl install method:
perl Makefile.PL make make test make install
Timeunder your Report Magic folder.
These modules ship with Perl 5.004 or higher. They are listed here for completeness, but you should not need to worry about adding or finding them.