There are already a lot of cacti installation and configuration on the Internet, so you may find it useful. Recently, some monitoring work has been done, so you have the right to take notes. Cacti structure: OS: Ubuntu12.04LTSserver-64cacti0. 8.8a follow these steps: 1: apt-get install LAMP $ sudoapt-getinstallapache2libapa
There are already a lot of cacti installation and configuration on the Internet, so you may find it useful. Recently, some monitoring work has been done, so you have the right to take notes.
Cacti structure:
OS: Ubuntu 12.04 LTS server-64
Cacti0.8.8a
The procedure is as follows:
1: Install LAMP with apt-get
$ Sudo apt-get install apache2 libapache2-mod-php5 php5 mysql-server php5-mysql
// Enter http: // server-ip in the browser. The test page is displayed.
2: install the software package required by cacti:
$ Sudo apt-get install php5-snmp snmp rrdtool // if you do not know the role of each software package, we recommend that you
3: cacti installation and configuration
$ Sudo mkdir-pv/usr/local/cacti
$ Sudo useradd-r cactiuser // create the user cactiuser required to run cacti
$ Wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
$ Tar zxvf cacti-0.8.8a.tar.gz // extract cacti
$ Cacti-0.8.8a cd
$ Sudo mv */usr/local/cacti/
$ Cd/usr/local/cacti
$ Sudo chown-R cactiuser: cactiuser rra/log // change the directory of this rra and log to cactiuser
$ Sudo vim/etc/crontab // Add a task plan to obtain data
*/5 * cactiuser/usr/bin/php/usr/local/cacti/poller. php>/dev/null 2> & 1
$ Sudo vim/etc/apache2/sites-available/default
// Modify the apache configuration file and add the following (skip this step if no access restriction is imposed)
Alias/cacti/"/usr/local/cacti /"
AllowOverride None
Order allow, deny
Allow from all
$ Sudo/etc/init. d/apache2 restart // restart the apache service
4: cacti database operations
$ Mysqladmin-uroot-proot create cacti // create a cacti Database
$ Cd/usr/local/cacti
$ Mysql-uroot-proot cacti $ Mysql-uroot-p ***** // log on to the mysql database
Mysql> grant all on cacti. * to cacti @ localhost identified by 'cacti ';
Mysql> grant all on cacti. * to cacti @ '2017. 0.0.1 'identified by 'cacti ';
// Create a user who operates on cacti in the database
$ Sudo vim/usr/local/cacti/include/config. php // modify the cacti configuration file
$ Database_username = "cacti ";
$ Database_password = "cacti ";
$ Sudo ln-sv/usr/local/cacti // var/www/cacti // create soft link
5. initialize Installation
Enter http: // cacti-ip/cacti in the browser to display the initialization installation interface. Follow the prompts to perform step-by-step operations. You need to change the password when logging on to the system for the first time.
6: Install common cacti plug-ins (because cacti0.8.8a has integrated plug-in extensions, you can directly install the required plug-ins without installing extensions)
$ Wget http://docs.cacti.net/_media/plugin:settings-v0.71-1.tgz
$ Wget http://docs.cacti.net/_media/plugin:thold-v0.4.9-3.tgz
$ Wget http://docs.cacti.net/_media/plugin:monitor-v1.3-1.tgz
$ Mv plugin \: settings-v0.71-1.tgz settings-v0.71-1.tgz
$ Mv plugin \: monitor-v1.3-1.tgz monitor-v1.3-1.tgz
$ Mv plugin \: thold-v0.4.9-3.tgz thold-v0.4.9-3.tgz
$ Tar zxvf settings-v0.71-1.tgz
$ Tar zxvf thold-v0.4.9-3.tgz
$ Tar zxvf monitor-v1.3-1.tgz
$ Mv settings // usr/local/cacti/plugins
$ Mv thold // usr/local/cacti/plugins
$ Mv monitor // usr/local/cacti/plugins
Log on to the cacti interface and you will see the names of the three plug-ins in Plugin Management. Install and start the plug-ins.
By now, the cacti monitoring end has been installed and configured, and snmp does not need to be configured (ubuntu) to perform simple monitoring on the local host. For mysql, nginx, monitoring of services such as apache and memcache, see the http://www.linuxidc.com/Linux/2012-09/70329.htm below