Enterprise-level Monitoring tool cacti installation configuration process

Source: Internet
Author: User

Basic information:

Os:rhel 5.8

soft:apr-util-1.4.1.tar.bz2 cmake-2.8.6.tar.gz libmcrypt-2.5.8.tar.gz php-5.4.36.tar.bz2

Rrdtool-1.4.7.tar.tar apr-1.4.6.tar.bz2 cacti-0.8.8c.tar.gz httpd-2.4.2.tar.bz2

Mysql-5.5.22.tar.gz php-5.4.5.tar.bz2
First compile and install the lamp platform, it is recommended to uninstall the corresponding RPM package, or in the process of collaboration may be a problem.

  1. Install Apr and Apr-util:

  2. Tar XF apr-1.4.6.tar.bz2

    CD apr-1.4.6

    ./buildconf

    ./configure --prefix=/usr/local/apr

    Make

    Make install

    Tar XF apr-util-1.4.1.tar.bz2

    CD apr-util-1.4.1

    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

    Make

    Make install

  3. Install Apache:

    Yum-y Install Pcre-devel

    Tar XF httpd-2.4.2.tar.bz2

    CD httpd-2.4.2

    ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd--enable-so--enable-suexec-- Enable-ssl--enable-rewrite--enable-rewrite--with-zlib--with-pcre --with-apr=/usr/local/apr -- With-apr-util=/usr/local/apr-util --enable-modules= most --enable-modules-shared= Most --enable-mpms-shared= All

    Make

    Make install

    echo "PATH=\ $PATH:/usr/local/apache/bin" >> /etc/profile

    Export PATH= $PATH:/usr/local/apache/bin

    echo "Manpath/usr/local/apache/man" >> /etc/man.config

    Ln-sv/usr/local/apache/include/usr/include/httpd

  4. Install CMake:

    Tar XF cmake-2.8.8.tar.gz

    CD cmake-2.8.8

    ./bootstrap

    Make

    Make install

  5. Install MySQL

    Groupadd-r MySQL

    Useradd-g mysql-r-d/data/mysql MySQL

    Tar XF mysql-5.5.22a.tar.gz

    CD mysql-5.5.22a

    CMake.-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysql-dsysconfdir=/etc-dwith_innobase_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_federated_storage_engine=1-dwith_readline=1 -dwith_ssl=system -dwith_zlib=system -dwith_libwrap=0 -ddefault_charset=UTF8 -ddefault_collation=Utf8_general_ci -denable_profiling=1

    Make

    Make install

  6. Cd/usr/local/mysql

Chown-r: MySQL.

Mkdir-pv/data/mysql

Chown-r mysql:mysql/data/

Cp/usr/local/mysql/support-files/my-large.cnf/etc/my.cnf

Cp/usr/local/mysql/support-files/mysql.server/etc/rc.d/init.d/mysqld

chmod +x/etc/rc.d/init.d/mysqld

Chkconfig--add mysqld

scripts/mysql_install_db --user=mysql --datadir=/data/mysql

Sed-i '/\[mysqld\]/a \datadir =/data/mysql '/etc/my.cnf

Sed-i ' s/thread_concurrency = 8/thread_concurrency = 2/g '/etc/my.cnf

echo "PATH= $PATH:/usr/local/mysql/bin" >> /etc/profile

Export PATH= $PATH:/usr/local/mysql/bin

echo "Mathpath/usr/local/mysql/man" >> /etc/man.config

Ln-sv/usr/local/mysql/include/usr/include/mysql

echo "/usr/local/mysql/lib" >> /etc/ld.so.conf.d/mysql.conf

Ldconfig

Service mysqld Start

6.install PHP

Before installing PHP may ask to install libmcrypt, I directly in the Chinaunix download source code compiled installation, and then compile PHP with--with-mcrypt=dir

Tar XF php-5.4.4.tar.bz2

CD php-5.4.4

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql--with-openssl -- With-mysqli=/usr/local/mysql/bin/mysql_config--enable-mbstring--with-freetype-dir--with-jpeg-dir-- With-png-dir--with-zlib --with-libxml-dir=/usr--enable-xml --with-apxs2=/usr/local/apache/bin/ Apxs--with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/ETC/PHP.D-- WITH-BZ2--enable-sockets

Make

Make install

CP Php-5.4.4/php.ini-production/etc/php.ini

echo "AddType application/x-httpd-php. php" >> /etc/httpd/httpd.conf

echo "AddType application/x-httpd-php-source Phps" >> /etc/httpd/httpd.conf

Sed-i ' S/directoryindex index.html/directoryindex index.php index.html/g '/etc/httpd/httpd.conf

All of the above operations can be built after the completion of a test PHP page test is not OK, if no problem, start to install the cacti part:

1. I created a virtual host for cacti directly:

First Modify httpd.conf add: include/etc/httpd/extra/httpd-vhosts.conf

Then modify the http-vhosts.conf:

<virtualhost *:80>
DocumentRoot "/usr/local/apache/htdocs/cacti
ServerName cacti.jerry.com
Errorlog "Logs/cacti-error_log"
Customlog "Logs/cacti-access_log" common
</VirtualHost>

2. Install RRDtool:

Tar XF rrdtool-1.4.7.tar.gz

CD rrdtool-1.4.7

./configure --prefix=/usr/local/rrdtool

Make

Make install

echo "Manpath/usr/local/rrdtool/share/man" >> /etc/man.config

echo "PATH= $PATH:/usr/local/rrdtool/bin" >> /etc/profile

Export PATH= $PATH:/usr/local/rrdtool/bin

Ln-sv/usr/local/rrdtool/include/usr/include/rrdtool

echo "/usr/local/rrdtool/lib" >> /etc/ld.so.conf.d/rrdtool.conf

Ldconfig

3.yum install NET-SNMP, Net-snmp-util and set to run automatically, no detailed commands are given here.

4. Installing cacti

Create a database for cacti and initialize the required tables:

    1. Mysqladmin create cacti//password for MySQL at this time

    2. Cd/usr/local/apache/htdocs/cacti

    3. MySQL Cacti < Cacti.sql


Create a MySQL user, use cacti to access its cacti database

Mysql-e "GRANT all on cacti.* to [e-mail protected] identified by ' Cactiuser '";

    1. The user cactiuser password was created as well as Cactiuser

    2. Mysqladmin-p flush-privileges

    3. Mysql-ucactiuser-p//Verify that it is correct

The system user Cactiuser is then created to run the cacti data acquisition and logging work

    1. Useradd Cactiuser

    2. Chown-r Cactiuser:cactiuser/usr/local/apache/htdocs/cacti/{log,rra}

As a cactiuser user, get data once every 5 minutes:

    1. Echo ' */5 * * * * */usr/local/php/bin/php/usr/local/apache/htdocs/cacti/poller.php &>/dev/null ' >/VAR/SPOOL/C Ron/cactiuser


To modify the PHP time zone:

    1. Vim/etc/php.ini

    2. Date.timezone = Asia/shanghai


Edit the cacti configuration file include/config.php enable and modify the following line:
$url _path = "/cacti/";
We will change this to:
$url _path = "/";

Then open the http://cacti.jerry.com in the browser, follow the instructions to complete the installation of a step-by-step configuration.
Password for the first time, will let the change password, the user defaults to admin password for admin

650) this.width=650; "title=" 62[55%smihsl0_4}n) zftu2.jpg "src=" http://s3.51cto.com/wyfs02/M01/57/39/ Wkiol1sva-otd4onaafxqf1lnec815.jpg "alt=" Wkiol1sva-otd4onaafxqf1lnec815.jpg "/>

This article is from the "Advanced Road---Jerry" blog, please be sure to keep this source http://jerry51886.blog.51cto.com/6021523/1592068

Enterprise-level monitoring tools cacti installation configuration whole process

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.