{"id":1479,"date":"2012-11-28T13:35:38","date_gmt":"2012-11-28T04:35:38","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=1479"},"modified":"2017-06-28T10:36:26","modified_gmt":"2017-06-28T01:36:26","slug":"network-monitoring","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=1479","title":{"rendered":"Network Monitoring"},"content":{"rendered":"<p>Network Monitoring<br \/>\n&#8211;&gt;Need<br \/>\n*Apache : A Web server to display network graphs created by PHP and RRDTool.<br \/>\n*MySQL : A Database server to store cacti information.<br \/>\n*PHP : A script module to create graphs using RRDTool.<br \/>\n*PHP-SNMP : A PHP extension for SNMP to access data.<br \/>\n*NET-SNMP : A SNMP (Simple Network Management Protocol) is used to manage network.<br \/>\n*RRDTool : A database tool to manage and retrieve time series data like CPU load, Network Bandwidth etc.<\/p>\n<h4>Install MySQL<\/h4>\n<pre># yum install mysql mysql-server<\/pre>\n<h4>Install PHP<\/h4>\n<pre># yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql<\/pre>\n<h4>Install PHP-SNMP<\/h4>\n<pre># yum install php-snmp<\/pre>\n<h4>Install NET-SNMP<\/h4>\n<pre># yum install net-snmp-utils p net-snmp-libs php-pear-Net-SMTP<\/pre>\n<h4>Install RRDTool<\/h4>\n<pre># yum install rrdtool<\/pre>\n<h3>Staring Apache, MySQL and SNMP Services<\/h3>\n<p>Once you\u2019ve installed all the required software\u2019s for\u00a0<strong>Cacti<\/strong>\u00a0installation, lets\u00a0start\u00a0them one-by-one using following commands.<\/p>\n<h5>Starting Apache<\/h5>\n<pre># \/etc\/init.d\/httpd start\r\nOR\r\n# service httpd start<\/pre>\n<h5>Starting MySQL<\/h5>\n<pre># \/etc\/init.d\/mysqld start\r\nOR\r\n# service mysqld start<\/pre>\n<h5>Starting SNMP<\/h5>\n<pre># \/etc\/init.d\/snmpd start\r\nOR\r\n# service snmpd start<\/pre>\n<h5>Configure Start-up Links<\/h5>\n<p>Configuring\u00a0<strong>Apache<\/strong>,\u00a0<strong>MySQL<\/strong>\u00a0and\u00a0<strong>SNMP<\/strong>\u00a0Services to\u00a0start\u00a0on boot.<\/p>\n<pre># \/sbin\/chkconfig --levels 345 httpd on\r\n# \/sbin\/chkconfig --levels 345 mysqld on\r\n# \/sbin\/chkconfig --levels 345 snmpd on<\/pre>\n<h3>Install Cacti on RHEL \/ CentOS \/ Fedora<\/h3>\n<p>Here, you need to install and enable\u00a0<a href=\"http:\/\/www.tecmint.com\/how-to-enable-epel-repository-for-rhel-centos-6-5\/\" target=\"_blank\">EPEL Repository<\/a>. Once you\u2019ve enabled repository, type the following command to install Cacti application.<\/p>\n<pre># yum install cacti<\/pre>\n<h4>Sample Output:<\/h4>\n<pre>Loaded plugins: fastestmirror, refresh-packagekit\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package cacti.noarch 0:0.8.8a-2.el6 will be installed\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n================================================================================\r\n Package\t\t\t\tArch\t\tVersion\t\t\t\tRepository\t\tSize\r\n================================================================================\r\nInstalling:\r\n cacti                  noarch\t\t0.8.8a-2.el6\t\tepel            2.0 M\r\n\r\nTransaction Summary\r\n================================================================================\r\nInstall       1 Package(s)\r\n\r\nTotal download size: 2.0 M\r\nInstalled size: 5.4 M\r\nIs this ok [y\/N]: y\r\nDownloading Packages:\r\ncacti-0.8.8a-2.el6.noarch.rpm\t\t                         | 2.0 MB     00:40\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing : cacti-0.8.8a-2.el6.noarch\t\t\t\t\t\t1\/1\r\n  Verifying  : cacti-0.8.8a-2.el6.noarch\t\t\t\t\t\t1\/1\r\n\r\nInstalled:\r\n  cacti.noarch 0:0.8.8a-2.el6\r\n\r\nComplete!<\/pre>\n<h3>Configuring MySQL Server for Cacti Installation<\/h3>\n<p>We need to configure\u00a0<strong>MySQL<\/strong>\u00a0for\u00a0<strong>Cacti<\/strong>, to do this we need to set password for our newly installed\u00a0<strong>MySQL<\/strong>\u00a0server and then we will create\u00a0<strong>Cacti<\/strong>\u00a0database with user\u00a0<strong>Cacti<\/strong>. If you\u2019re<strong>MySQL<\/strong>\u00a0is already password protected, then don\u2019t need to set it again.<\/p>\n<h4>Set MySQL Password<\/h4>\n<p>To set new password for\u00a0<strong>MySQL<\/strong>\u00a0server, use the following command. (<strong>Note<\/strong>\u00a0:\u00a0<strong>This is for new MySQL\u00a0installation\u00a0only<\/strong>).<\/p>\n<pre># mysqladmin -u root password <strong>YOUR-PASSWORD-HERE<\/strong><\/pre>\n<h4>Create MySQL Cacti Database<\/h4>\n<p>Login into\u00a0<strong>MySQL<\/strong>\u00a0server with newly created password and create\u00a0<strong>Cacti<\/strong>\u00a0database with user<strong>Cacti<\/strong>\u00a0and set the password for it.<\/p>\n<pre># mysql -u root -p\r\nmysql&gt; create database <strong>cacti<\/strong>;\r\nmysql&gt; GRANT ALL ON cacti.* TO <strong>cacti<\/strong>@localhost IDENTIFIED BY '<strong>your-password-here<\/strong>';\r\nmysql&gt; FLUSH privileges;\r\nmysql&gt; quit;<\/pre>\n<h4>Install Cacti Tables to MySQL<\/h4>\n<p>Find out the database file path using\u00a0<strong>RPM<\/strong>\u00a0command, to install cacti tables into newly created<strong>Cacti<\/strong>\u00a0database, use the following command.<\/p>\n<pre># rpm -ql cacti | grep cacti.sql<\/pre>\n<h5>Sample Output:<\/h5>\n<p>\/var\/www\/cacti\/cacti.sql<\/p>\n<p>Now we\u2019ve of the location of\u00a0<strong>Cacti.sql<\/strong>\u00a0file, type the following command to install tables, here you need to type the Cacti user\u00a0<strong>password<\/strong>.<\/p>\n<pre>mysql -u cacti -p<\/pre>\n<p>cacti &lt; \/var\/www\/cacti\/cacti.sql<\/p>\n<h4>Configure MySQL settings for Cacti<\/h4>\n<p>Open the file called\u00a0<strong>\/etc\/cacti\/db.php<\/strong>\u00a0with any editor.<\/p>\n<pre># vi \/var\/www\/cacti\/include\/config.php<\/pre>\n<p>Make the following changes and save the file. Make sure you set password correctly.<\/p>\n<pre>\/* make sure these values reflect your actual database\/host\/user\/password *\/\r\n$database_type = \"<strong>mysql<\/strong>\";\r\n$database_default = \"<strong>cacti<\/strong>\";\r\n$database_hostname = \"<strong>localhost<\/strong>\";\r\n$database_username = \"<strong>cacti<\/strong>\";\r\n$database_password = \"<strong>your-password-here<\/strong>\";\r\n$database_port = \"3306\";\r\n$database_ssl = false;<\/pre>\n<h3>Configuring Apache Server for Cacti Installation<\/h3>\n<p>Open file called\u00a0<strong>\/etc\/httpd\/conf.d\/cacti.conf<\/strong>\u00a0with your choice of editor.<\/p>\n<pre># vi \/etc\/httpd\/conf.d\/cacti.conf<\/pre>\n<p>You need to enabled access to\u00a0<strong>Cacti<\/strong>\u00a0application for your local network or per IP level. For example we\u2019ve enabled access to our local LAN network\u00a0<strong>172.16.16.0\/20<\/strong>. In your case, it would be different.<\/p>\n<pre>Alias \/cacti    \/usr\/share\/cacti\r\n\r\n                # httpd 2.4\r\n                Require host localhost\r\n\r\n                # httpd 2.2\r\n                Order deny,allow\r\n                Deny from all\r\n                Allow from <strong>172.16.16.0\/20<\/strong><\/pre>\n<p>Finally, restart the\u00a0<strong>Apache<\/strong>\u00a0service.<\/p>\n<pre># \/etc\/init.d\/httpd restart\r\nOR\r\n# service httpd restart<\/pre>\n<h3>Setting Cron for Cacti<\/h3>\n<p>Open file\u00a0<strong>\/etc\/cron.d\/cacti<\/strong>.<\/p>\n<pre># vi \/etc\/cron.d\/cacti<\/pre>\n<p>Uncomment the following line. The\u00a0<strong>poller.php<\/strong>\u00a0script runs every\u00a0<strong>5mins<\/strong>\u00a0and collects data of known host which is used by Cacti application to display graphs.<\/p>\n<pre>#*\/5 * * * *    cacti   \/usr\/bin\/php \/usr\/share\/cacti\/poller.php &gt; \/dev\/null 2&gt;&amp;1<\/pre>\n<h3>Running Cacti Installer Setup<\/h3>\n<p>Finally, Cacti is ready, just go to\u00a0<strong>http:\/\/YOUR-IP-HERE\/cacti\/<\/strong>\u00a0&amp; follow the\u00a0installerinstruction through the following screens. Click\u00a0<strong>Next<\/strong>\u00a0button.<\/p>\n<p>ID: admin<br \/>\nPASS : admin<\/p>\n<p><a href=\"https:\/\/auctionpro.co.kr\/wp-content\/uploads\/2012\/11\/cacti.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1483\" title=\"cacti\" src=\"https:\/\/auctionpro.co.kr\/wp-content\/uploads\/2012\/11\/cacti.gif\" alt=\"\" width=\"500\" height=\"401\" srcset=\"https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2012\/11\/cacti.gif 500w, https:\/\/www.auctionpro.co.kr\/wp-content\/uploads\/2012\/11\/cacti-300x240.gif 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>\ucc38\uc870 :\u00a0<a href=\"http:\/\/www.tecmint.com\/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12\/\">http:\/\/www.tecmint.com\/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Network Monitoring &#8211;&gt;Need *Apache : A Web server to display network graphs created by PHP and RRDTool. *MySQL : A Database server to store cacti <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=1479\" title=\"Network Monitoring\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[217],"class_list":["post-1479","post","type-post","status-publish","format-standard","hentry","category-centos","tag-network-monitoring"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1479"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1479\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}