A
A
Anatoly2017-11-08 14:42:45
Debian
Anatoly, 2017-11-08 14:42:45

How to install and configure cacti monitoring (Debian+MariaDB+PHP-FPM7.1)?

Tell me how to install and configure cacti. OS Debian 7.11
Via apt-get install cacti - he tries to install php5 and replace MariaDB with MySQL, and he also doesn't have Nginx in the list. Therefore, I try to put it with my hands, but I don’t understand something what to do.
What I did:
Connected the --with-http_stub_status_module module to nginx.
Add settings to nginx.conf:
nano /etc/nginx/site-available/mysite
location /cacti {
stub_status on;
# disable access_log if required
access_log off;
#allow XX.YY.AA.ZZ; better allow only for 127.0.0.1
#deny all;
alias /var/www/cacti/;
location ~ ^/cacti/(.+\.php)$ {
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
3. Rebooted: service nginx restart
4. Downloaded cacti:
cd /var/www/
git clone https://github.com/Cacti/cacti.git
5. Downloaded scripts and templates for nginx:
wget http://. .../cacti-nginx.tar.gz
tar -zxvf cacti-nginx.tar.gz && cd cacti-nginx
cp get_nginx_clients_status.pl /var/www/cacti/scripts/
cp get_nginx_socket_status.pl /var/www/cacti/ scripts/
chmod 0755 /var/www/cacti/scripts/get_nginx_socket_status.pl
chmod 0755 /var/www/cacti/scripts/get_nginx_clients_status.pl
6. Created a database
mysqladmin -p create cacti
Create a user user-cacti and give him privileges to the database
mysql -p
CREATE USER 'user-cacti'@'localhost' IDENTIFIED BY '111111111111';
GRANT ALL ON cacti.* TO 'user-cacti'@'localhost';
exit;
Filled in the data from the mysql dump
-u root -p cacti < /var/www/cacti/cacti.sql
Then I run
/var/www/cacti/scripts/get_nginx_clients_status.pl
and what should I do next? )
In the browser I see only
5a02ece051afd151939493.png
When I try to enter something like mysite.ru/cacti/index.php
I get an error 500.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2017-11-10
@Tolly

The problem was that all the necessary modules had to be connected:
php -m | egrep '^(snmp|xml|session|sockets|ldap| gd |pdo_mysql)$
'
-cacti-s...

S
Someone White, 2017-11-08
@hack_student

lmgtfy.com/?q=php-fpm+error+500

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question