OVH Community, votre nouvel espace communautaire.

Installation de CACTI sur serveur CentOS 5.1 - Plesk 8.4


benoitc
20/08/2008, 22h06
trop tard ! j'ai trouvé d'ou venais l'erreur, mes repo atomic n'etaient pas correctement configurées pour Centos 5

Loup Artic
20/08/2008, 22h00
A votre place, je ferais l'install de cacti à la main via les sources.

Ca tourne beaucoup mieux et vous décidez exactement ou vous voulez le mettre.

benoitc
20/08/2008, 21h55
Merci pour ce tuto, je m'y suis attelé mais ...

j'ai un problème à l'installation de cacti, il manque php-common 5.1.6-20 en dépendance de cacti (Error: Missing Dependency: php-common = 5.1.6-20.el5_2.1 is needed by package php-snmp) ce qui est "normal" puisque j'ai deja d'installé le package php-common.i386 5.2.6-1.el5.art depuis le repo d'atomic ...

quelqu'un aurait une idée ? Merci d'avance

dune2312
20/08/2008, 21h33
d'abord créer le repo DAG :

[root@ns ~]# wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

--00:03:28-- http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Resolving dag.wieers.com... 217.22.63.77
Connecting to dag.wieers.com|217.22.63.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1672 (1.6K) [text/plain]
Saving to: `RPM-GPG-KEY.dag.txt'

100%[=======================================>] 1,672 --.-K/s in 0s

00:03:28 (114 MB/s) - `RPM-GPG-KEY.dag.txt' saved [1672/1672]


[root@ns ~]# rpm --import RPM-GPG-KEY.dag.txt // importation GPG-KEY

[root@ns ~]# rm -f RPM-GPG-KEY.dag.txt // suppression du fichier

[root@ns ~]# vi /etc/yum.repos.d/dag.repo // creation d'un nouveau fichier repo


// mettre ce contenu dans le fichier dag.repo que l'on vient de créer



[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el5/en/i386/dag/
gpgcheck=1
enabled=0






ensuite installer CACTI






[root@www ~]# yum --enablerepo=dag -y install cacti* net-snmp* rrdtool // installation de cacti depuis le repo DAG


[root@www ~]# vi /etc/snmp/snmpd.conf // editer le fichier


# com2sec notConfigUser default public // Commenter la ligne 41


com2sec local localhost private // rajouter cette ligne en ligne 42

com2sec mynetwork 91.xxx.xxx.xxx public // mettre l'adresse IP de votre serveur


#group notConfigGroup v1 notConfigUser // Commenter la ligne 48


# group notConfigGroup v2c notConfigUser // Commenter cette ligne


group MyROGroup v1 mynetwork // rajouter ces 4 lignes
group MyROGroup v2c mynetwork
group MyROGroup v1 local
group MyROGroup v2c local


#view systemview included .1.3.6.1.2.1.1 // Commenter la ligne 59

#view systemview included .1.3.6.1.2.1.25.1.1


view all included .1 80 // ajouter cette ligne


#access notConfigGroup "" any noauth exact systemview none none // commenter la ligne 66


access MyROGroup "" any noauth exact all none none // ajouter ces deux lignes
access MyRWGroup "" any noauth exact all all none


[root@www ~]# /etc/rc.d/init.d/snmpd start // demarrer le service snmp

Starting snmpd:
[ OK ]

[root@www ~]# chkconfig snmpd on

[root@www ~]# mysqladmin -u admin -p create cacti // créer la base de données pour Cacti

Enter password:

[root@www ~]# mysql -u admin -p cacti < /var/www/cacti/cacti.sql // importer la base de données

Enter password:

[root@www ~]# mysql -u admin -p // login to MySQL

Enter password: // entrer le mot de passe admin mysql


Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


mysql> grant all on cacti.* to cactiuser@localhost identified by 'password'; // à la place de password en rouge mettre le mot de passe de cactiuser


Query OK, 0 rows affected (0.00 sec)

mysql> exit // logout

Bye

[root@www ~]# vi /var/www/cacti/include/config.php


$database_password = "password"; // change password to cactiuser's one


[root@www ~]# chown -R apache. /var/www/cacti // changement propriétaire

[root@www ~]# vi /etc/httpd/conf.d/cacti.conf // modifier le fichier



allow from 127.0.0.1 88.xxx.xxx.xxx // à la ligne 8 rajouter les adresse IP autorisées à accèder à cacti mettre "all" pour un accès à tout le monde



[root@www ~]# service httpd restart // redemarrer le service apache




Et le tour est joué, vous pouvez accèder à cacti http://votre.nom.de.domaine/cacti/