[mrtg] How to Get MRTG working on HPUX 10.20

Arif Patel arif_patel at norampac.com
Wed Mar 1 19:30:49 MET 2000


I noticed some people were having trouble getting MRTG working on HPUX 10.20 systems .. so here are my notes ....

The following is rather long .. but I figured more is better:

Needed files or dependencies...

	HP ANSI C complier needed to compile Perl 5.004_4 -- so get it!

	Perl Version 5.004_4 or later ( perl -v command will display 
	current version)

	If not than obtain latest version from 

	http://www.perl.com/perl/info/software.html 
	
	(stable.tar.gz) and follow configure and make instructions
	see INSTALL AND README.hpux notes for more details .. 
	this will take a while to compile so be patient
	
	Get and compile the GD library by Thomas Boutell:
	www.boutell.com. Unless you know what you are doing, make
	sure you build libgd, zlib and libpng as static libraries. There
	are detailed instructions in the README file which comes in 
        the MRTG archive.

	Get gcc, freetype, libpng, xmp, zlib from The Porting and Archive
	Center for HPUX.
	
	http://hpux.ee.ualberta.ca .. use swdepot to install the package once
	you have uncompressed and untarred it.
	
	Obtain souce code for gd.1.7.3.tar.gz or later .. again 
	cp to /tmp/gdtemp uncompress and untar .. 
	
	modify Makefile to reflect location of all libaries ..
	for example .. (/tmp/gdtemp/gd-1.7.3/Makefile)
	
	# LISTED BELOW IS MY MAKEFILE WITH THE MODIFICATIONS I NEEDED
	#
	#If you do not have gcc, change the setting for COMPILER, but you must
	#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
	#compiler; get gcc if you are still using it).
	COMPILER=gcc  
	
	#If the ar command fails on your system, consult the ar manpage
	#for your system.
	AR=ar
	
	#If the install command is not in your path, provide
	#an explicit path for it here, or install manually.
	INSTALL=install
	
	#If you don't have FreeType and/or Xpm installed, including the
	#header files, uncomment this (default).
	CFLAGS=-O
	#If you do have FreeType and/or Xpm fully installed, uncomment a
	#variation of this and comment out the line above. See also LIBS below.
	#CFLAGS=-O -DHAVE_XPM -DHAVE_LIBTTF
	CFLAGS=-O -DHAVE_XPM
	
	#If you don't have FreeType and/or Xpm fully installed, uncomment this
	#(default).
----->	#LIBS= -L./ -L/-lm -lgd -lpng -lz
	
	#If you do have FreeType and/or Xpm fully installed, uncomment a
	#variation of this and comment out the line above. Note that
	#Xpm requires X11. See also CFLAGS above.
----->	LIBS=-L./ -L/opt/libpng/lib -L/opt/zlib/lib -L/opt/freetype/lib 
        -L/opt/xpm/lib/X
	11 -lm -lgd -lpng -lz -lttf -lXpm -lX11 -lm
	
	#Typical install locations for freetype, zlib, xpm and libpng 
         header files.
	#If yours are somewhere else, change this.
	#INCLUDEDIRS=-I/usr/local/include -I/usr/include/X11 
         -I/usr/X11R6/include/X11
----->	INCLUDEDIRS=-I/opt/freetype/include -I/opt/zlib/include -I/opt/xpm/include/X11 -
	I/opt/libpng/include
	
	#Typical install locations for freetype, zlib, xpm and libpng libraries.
	#If yours are somewhere else, other than a standard location
	#such as /lib or /usr/lib, then change this. Be sure to keep
	#-L. as this allows the gd library itself to be found.
	#Put -L. first so that old versions of the gd library elsewhere
	#on your system can't cause conflicts while building a new one.
	#LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
----->	LIBDIRS=-I/opt/freetype/lib -I/opt/zlib/lib -I/opt/xpm/lib/X11
         -I/opt/libpng/lib
	
	#Location where libgd.a should be installed by "make install".
	#INSTALL_LIB=/usr/local/lib
----->	INSTALL_LIB=/opt/gd/lib
	
	#Location where .h files should be installed by "make install".
----->	INSTALL_INCLUDE=/opt/gd/include
	
	#Location where useful non-test programs should be installed 
         by "make install".
----->	INSTALL_BIN=/opt/gd/bin
	
	#
	#
	# Changes should not be required below here.
	#
	#
	
	After these modicifications are made, "./configure" the 
        Makefile and than
	run "make"
	
	Now obtain the latest mrtg file from: 

	http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/pub/

	
download latest *tar.gz version to intranet:/sysops/mrtgfiles and
copy to /tmp/newmrtg (cp -p /sysops/mrtgfiles/mrtg-2.8.XX.tar.gz /tmp/newmrtg)

Unzip and untar the file in this directory using the following commands

   gunzip mrtg*gz
   tar -xvf mrtg*tar
   
Now change directory into newly created directory (cd mrtg*)

Run the following command

./configure --prefix=/opt/mrtg1 --with-gd-lib=/opt/gd/lib --with-gd-inc=/opt/gd/
include --with-z-lib=/opt/zlib/lib --with-z-inc=/opt/zlib/include --with-png-lib
=/opt/libpng/lib --with-png-inc=/opt/libpng/include --with-xpm-lib=/opt/xpm/lib/
X11 --with-xpm-inc=/opt/xpm/include/X11 --with-freetype-lib=/opt/freetype/lib --
with-freetype-inc=/opt/freetype/include

[or wherever your library files are located] 

Once it is successful, run the command make from this directory.

You may receive some warning messages .. these can be ignored as they
are only warnings.

Thereafter, copy the contents of the run/* to /opt/mrtg/run/

Now create your CFG files and you are ready to rock!

Hope this information was useful.



Any comments or questions please contact me.
Si vous avez des commentaires ou des questions, n'hésitez pas à me contacter.

Arif Patel, MCSE, CNA
Intranet Administrator
IT Services, NORAMPAC INC.

Web: http://intranet.norampac.com
          http://www.aamir.com

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list