CentOS Sunucuya CACTI Nasıl Kurulur?

by - Kasım 21, 2015

#CentOS  Sunucuya CACTI Kurulumu#
   
     -CentOS sunucunuz için "EPEL"  deposunu ekleyiniz.
# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

     -"Apache Web Servisi'ni" yükleyiniz.
# yum install httpd httpd-devel -y

     -"MySQL'i" yükleyiniz.  
# yum install mysql mysql-server -y

    -"PHP'yi" yükleyiniz.
# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql -y
  
    -"PHP-Snmp" & "Net-Snmp" yükleyiniz.
# yum install php-snmp net-snmp-utils net-snmp-libs php-pear-Net-SMTP -y

    -"RRDtool'u" yükleyiniz.
# yum install rrdtool -y

    -Servisleri yeniden başlatınız.
# /etc/init.d/httpd restart
# /etc/init.d/mysqld restart
/etc/init.d/snmpd restart

    -"Cacti'yi" yükleyiniz.
# yum install cacti -y

    -"MySQL" ayarlarını düzenleyiniz.
# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database cacti; 
(Database ismini giriniz."cacti" seçilmiştir )
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY '123qweasd';
(Database kullanıcısı olan cacti parolasını giriniz."123qweasd" seçilmiştir)
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('123qwe');
(Root için parola olusturulur böylece MySQL'e parolasız erişim kapatılmış olur."123qwe" seçilmiştir)
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
   
     -"cacti.sql" dosyasının konumunu bulunuz.
# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8b/cacti.sql

     -"cacti.sql" dosyasını database üzerine import ediniz.
# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
Enter password:123qweasd

    -Cacti veritabanının bağlantı dosyasını "/etc/cacti/db.php" düzenleyiniz.
# vim /etc/cacti/db.php
$database_type = "mysql";
$database_default = "cacti";                       ##  Database ismi ##
$database_hostname = "localhost";
$database_username = "cacti";                  ##  Database kullanıcı ismi ##  
$database_password = "123qweasd";      ##  Database kullanıcı parolası ##
$database_port = "3306";
$database_ssl = false;

    -"Cacti'ye" web arayüzünden ulaşılması için "/etc/httpd/conf.d/cacti.conf" dosyasını düzenleyiniz.
# vim /etc/httpd/conf.d/cacti.conf
<Directory /usr/share/cacti/>
        <IfModule mod_authz_core.c>
                # httpd 2.4
                Require host localhost
        </IfModule>
        <IfModule !mod_authz_core.c>
                # httpd 2.2
                Order deny,allow
                Deny from all
                Allow from all
        </IfModule>
</Directory>
     -"Apache Web Servisi'ni" tekrar başlatınız.
# /etc/init.d/httpd restart

    -"/etc/sysconfig/iptables" dosyasına "80" portunu ekleyiniz.
# vim /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall                                                                     
# Manual customization of this file is not recommended.                                                                        
*filter                                                                                        
:INPUT ACCEPT [0:0]                                                                                        
:FORWARD ACCEPT [0:0]                                                                                                                   
:OUTPUT ACCEPT [0:0]                                                                                                  
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT                                      
-A INPUT -p icmp -j ACCEPT                                                                                                       
-A INPUT -i lo -j ACCEPT                                                                                                            
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT                                                     
-A INPUT -j REJECT --reject-with icmp-host-prohibited                                                                       
-A FORWARD -j REJECT --reject-with icmp-host-prohibited                                                               
COMMIT     

Kurulumu burada bitirmiş bulunmaktasınız.

Web üzerinden Cacti'ye ulaşabilmek için herhangi bir web browser(Firefox, Chrome, Explorer) üzerinden sunucunuzun ip adresini ipaddress/cacti yazarak ulaşabilirsiniz.("54.149.109.4/cacti" seçilmiştir)

"Next >>" butonuna tıklayarak devam ediniz.

"Next >>" butonuna tıklayarak devam ediniz.

"Finish" butonuna tıklayarak devam ediniz.
Default olarak "User Name":admin
Default olarak "Password"   :admin
"Login" butonuna tıklayarak devam ediniz.
Yeni bir parola oluşturunuz ve doğrulayınınız daha sonra "Save" butonuna tıklayarak devam ediniz.
CentOS sunucunuza başarılı bir şekilde Cacti kurulumunu gerçekleştirdiniz.

Kaynakça:

http://www.unixmen.com/install-cacti-network-monitoring-tool-on-centos-6-4-rhel-6-4-scientific-linux-6-4/
http://www.cacti.net/


You May Also Like

0 Yorum