UbuntuLinux system sets up cacti Monitoring Service

Source: Internet
Author: User
Article Title: The UbuntuLinux system sets up the cacti Monitoring Service. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic classification. Step 1: Install ubuntu and LAMP services.
 
We recommend that you use the ubuntu server system + LAMP service to install the cacti software, because the server version system + Built-in LAMP service will be relatively stable.
 
During the installation of ubuntu server, select and install the LAMP service.
 
If you use ubuntu for installation on the desktop or the LAMP service is not installed during installation, run the following command to set up the LAMP server first.
 
$ Sudo apt-get install apache2
 
$ Sudo apt-get install mysql-server
 
$ Sudo apt-get install php5
 
Step 2: Install related components
 
$ Sudo apt-get install php5-mysql php5-cgi php5-cli php5-snmp php-pear snmp snmpd
 
$ Sudo apt-get install rrdtool
 
Step 3: Install the cacti Program
 
Download the latest cacti package from the http://www.cacti.net website, and ubuntu server can download it with the wget command.
 
$ Sudo-s
 
$ Cacti-version.tar.gz/var/www
 
$ Cd/var/www
 
$ Tar xzf cacti-version.tar.gz
 
$ Mv cacti-version cacti
 
$ Rm cacti-version.tar.gz
 
$ Exit
 
Step 4: related settings
 
$ Cd/var/www/cacti
 
$ Sudo mysqladmin-u root-p create cacti
 
$ Sudo mysql-u root-p cacti <cacti. SQL
 
$ Sudo mysql-u root-p cacti
 
Pay attention to this. If you really don't know how to use mysql under the command, you should first create a database with phpmyadmin and then import data. Run the command to modify the password of the mysql database.
 
Grant all on cacti. * to cactiuser @ localhost identified by 'cacti ';
 
Flush privileges;
 
Set password for cactiuser @ localhost = password ('cactiuser ');
 
Quit
 
Edit/var/www/cacti/include/config. php and change the Database Password to cactiuser.
 
This is based on the database password you set above
 
$ Sudo vi/var/www/cacti/include/config. php
 
$ Database_password = "cactiuser ";
 
Add cactiuser
 
$ Sudo useradd cactiuser-d/var/www/cacti-s/bin/false
 
$ Sudo chown-R cactiuser/var/www/cacti/rra/var/www/cacti/log
 
The above may not work:
 
# Sudo chown-hR cactiuser/var/www/cacti/rra/var/www/cacti/log
 
Edit/etc/crontab.
 
$ Sudo vi/etc/crontab
 
*/5 * cactiuser php5/var/www/cacti/poller. php>/dev/null 2> & 1
 
Next, if you have built the LAMP, do not add it again.
 
Edit/etc/php5/apache2/php. ini.
 
$ Sudo vi/etc/php5/apache2/php. ini
 
; Extension = mysql. so
 
Edit/etc/php5/cli/php. ini.
 
$ Sudo vi/etc/php5/cli/php. ini
 
; Extension = mysql. so
 
Edit/etc/php5/cgi/php. ini.
 
$ Sudo vi/etc/php5/cgi/php. ini
 
; Extension = mysql. so
 
Restart apache2
 
$ Sudo/etc/init. d/apache2 restart
 
This server uses http: // localhost/cacti/for access. Other hosts Use http: // cacti Server IP Address/cacti for access. The default username and password are admin.
 
User Name: admin
 
Password: admin
 
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.