Set up MRTG in Linux

Source: Internet
Author: User
Tags mrtg
In linux, MRTG construction also requires apache support. in this experiment, apache is installed in/usr/local/zookeeper Sr...

Set up MRTG in linux
Apache is also required. apache is installed under/usr/local/apache.
The required software installation packages are as follows:
Gd-2.0.33.tar.gz
Zlib-1.2.3.tar.gz
Libpng-1.2.15.tar.gz
Jpegsrc.v6b.tar.gz
Freetype-2.1.9.tar.gz
Fontconfig-2.3.2.tar.gz
Mrtg-2.13.2.tar.gz
1. components required for MRTG installation
2. install the zlib library
Tar-xvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
3. install the libpng Library
Tar-zxvf libpng-1.2.15.tar.gz
Cd libpng-1.2.15
4. install the JPEG Library
Tar-zxvf restart src.v6b.tar.gz
Cd jpeg-6b
5. install and install Freetype
Tar-zxvf freetype-2.1.9.tar.gz
Cd freetype-2.1.9
6. install Fontconfig (freetype-devel fontconfig-devel)
Tar-zxvf fontconfig-2.3.2.tar.gz
Cd fontconfig-2.3.2.tar.gz
7. Compile the GD Library
Install the GD Library
The installation command is as follows:
Tar-zxvf gd-2.0.33.tar.gz
If the output information is as follows:
If all the items are displayed as yes, we can directly install MRTG. only one item in this environment is displayed as yes, so we need to install its components.
II. install mrtg
Tar-zxvf mrtg-2.13.2.tar.gz
Cd mrtg-2.13.2
3. adjust parameters to monitor port traffic
1. Generate the mrtg. cfg file to store the mrtg configuration information.
/Usr/local/mrtg/bin/maker -- output/usr/local/apache/htdocs/mrtg. cfg public@121.52.209.160 (public is the SNMP group name, ip is the monitored device .)
2. modify the parameters of the mrtg. cfg file.
Vi/usr/local/apache/htdocs/mrtg. cfg
Change the Workdir path to/usr/local/apache/htdocs: specify the mrtg working directory.
Remove # Options [_]: growright, bits: previous #
Add a line of Language: Chinese: make mrtg support Chinese
3. env LANG = C/usr/local/mrtg/bin/mrtg/usr/local/apache/htdocs/mrtg. cfg: execute multiple times until no information is displayed.
4. generate page files
5. automatically refresh data
Crontab-e
Then write
(Note: If env LANG = C is not added before, you do not need to add it here ), env LANG = C/usr/local/mrtg/bin/mrtg/usr/local/apache/htdocs/mrtg every five minutes. cfg

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.