tar -zxvf gd-2.0.33.tar.gz cd gd-2.0.33 ./configure
你可以在输出的信息中看见如下面的字样:
Support for PNG library: yes Support for JPEG library: yes Support for Freetype 2.x library: yes Support for Fontconfig library: yes Support for Xpm library: yes Support for pthreads: yes
如果你的都是yes的话,那么就可以直接make && make install,然后安装mrtg了。如果有no的话,那么还需要安装相应的支持软件。因为我的系统在安装的时候只选择安装了kernel devlopment tools,所以我需要安装上述的支持软件。
首先升级我的zlib库
******************************************
tar -zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure make make install
******************************************
然后安装libpng库
*******************************************
tar -jxvf libpng-1.2.8.tar.gz2 cd libpng-1.2.8 cp scripts/makefile.std makefile make make install
*******************************************
Ok,Wait for a moment...接下来安装JPEG库
*******************************************
tar -zxvf jpegsrc.v6b.tar.gz cd jpeg-6b ./configure --enable-static --enable-shared --prefix=/usr make make install
*******************************************
安装Freetype
*******************************************
tar -zxvf freetype-2.1.10 cd freetype-2.1.10 ./configure make make install
*******************************************
安装Fontconfig
*******************************************
tar -zxvf fontconfig-2.3.0 cd fontconfig-2.3.0 ./configure make make install
Support for PNG library: yes Support for JPEG library: yes Support for Freetype 2.x library: yes Support for Fontconfig library: yes Support for Xpm library: no Support for pthreads: yes
嗯,接着当然就是 make && make install
Ok,GD库安装完成,下来才是我们真正观注的了
tar -zxvf mrtg-2.12.2.tar.gz cd mrtg-2.12.2 ./configure --prefix=/usr/local/mrtg --with-gd=/usr/include --with-gd-lib=/usr/lib --with-gd-inc=/usr/include --with-png=/usr/include --with-png-lib=/usr/lib --with-zlib=/usr/include --with-zlib-lib=/usr/lib make make install