Vous êtes sur la page 1sur 3

http://plugnlay.blogspot.com.

co/2013/07/instalacion-de-nagios-plugin-para-
cacti.html

yum repolist
yum install epel-release

centos 7
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
echo 10.1.2.61 centos7.lan.com >>/etc/hosts

#cacti myariadb

https://hmartineztobar.es/blog/guia-de-instalacion-y-configuracion-de-cacti-en-
centos7/

nano /etc/yum.repos.d/MariaDB.repo

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

https://www.urban-software.com/cacti-howtos/cacti/installing-cacti/

yum -y install mariadb-server php php-cli php-mysql net-snmp-utils rrdtool wget


telnet
yum -y install php-snmp gcc mariadb-devel net-snmp-devel autoconf automake libtool
dos2unix wget help2man
systemctl enable httpd.service
systemctl enable mariadb.service
systemctl restart httpd.service
systemctl restart mariadb.service

/usr/bin/mysql_secure_installation

@E1ppseuvs

cd /var/www/html
wget http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz

tar -xzvf cacti-0.8.8h.tar.gz


mv cacti-0.8.8h cacti

adduser -s /sbin/nologin cacti


#adduser -d /var/www/html/cacti -s /sbin/nologin cacti

echo "*/5 * * * * cacti php /var/www/html/cacti/poller.php &>/dev/null" >>


/etc/cron.d/cacti

chmod -R 775 cacti


cd /var/www/html/cacti
chown -R cacti.apache rra log
chmod 775 rra log
mysqladmin -u root -p create cacti
mysql -u root -p
GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY '12345678';
flush privileges;
exit
mysql -p cacti < /var/www/html/cacti/cacti.sql

sed -i 's/$database_username = "cactiuser";/$database_username = "cacti";/g'


/var/www/html/cacti/include/config.php
sed -i 's/$database_password = "cactiuser";/$database_password = "12345678";/g'
/var/www/html/cacti/include/config.php

nano /var/www/html/cacti/include/config.php

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "12345678";
$database_port = "3306";
$database_ssl = false;

$url_path = "/cacti/";

firewall-cmd --permanent --zone=public --add-service=https


firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-port=10000/tcp
firewall-cmd --reload
nano /etc/php.ini

date.timezone = America/Bogota

#touch /var/www/html/cacti/log/cacti.log

systemctl restart httpd

https://10.1.2.61/cacti
12345678

###########Instalaci�n y configuraci�n de Spine

yum install -y gcc mysql-devel net-snmp-devel autoconf automake libtool dos2unix


help2man

cd /root
wget http://www.cacti.net/downloads/spine/cacti-spine-latest.tar.gz

tar xvzf cacti-spine-latest.tar.gz


cd cacti-spine-1.1.38/
./bootstrap
./configure
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine

cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf

nano /usr/local/spine/etc/spine.conf

DB_Host localhost
DB_Database cactiProd
DB_User cacti
DB_Pass 12345678
DB_Port 3306
DB_PreG 0

service httpd restart

https://192.168.1.72/cacti
12345678

selinux cacti