root@cacti:~# apt-get install apache2 php5 php5-mysql php5-snmp snmp php5-gd rrdtool mysql-server php5-ldap zip unzip
root@cacti:~# php -m | egrep '^(mysql|snmp|xml|session|sockets|ldap|gd)$' gd ldap mysql session snmp sockets xml
root@cacti:~# wget http://www.cacti.net/downloads/cacti-0.8.8f.tar.gz root@cacti:~# tar xzvf cacti-0.8.8f.tar.gz
root@cacti:~# mysqladmin -p -u root create cacti Enter password:
root@cacti:~# mysql -p -u root cacti < cacti-0.8.8f/cacti.sql Enter password:
root@cacti:~# mysql -p -u root -e 'GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY "your_password"; flush privileges;' Enter password:
root@cacti:~# vim cacti-0.8.8f/include/config.php … $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "your_password"; $database_port = "3306"; $database_ssl = false; …
root@cacti:~# rsync -aP cacti-0.8.8f/ /var/www/cacti/ root@cacti:~# chown -R www-data:www-data /var/www/cacti
root@cacti:~# echo '*/5 * * * * www-data php /var/www/cacti/poller.php > /dev/null 2>&1' > /etc/cron.d/cacti root@cacti:~# chmod +x /var/www/cacti/poller.php
root@cacti:~# cat /etc/apache2/sites-enabled/000-default.conf | grep DocumentRoot DocumentRoot /var/www
root@cacti:~# /etc/init.d/apache2 restart * Restarting web server apache2 ... waiting [ OK ]
root@cacti:~# wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8f.tar.gz root@cacti:~# tar xzvf cacti-spine-0.8.8f.tar.gz
root@cacti:~# apt-get install libmysqlclient-dev libsnmp-dev automake libtool make
root@cacti:~# cd cacti-spine-0.8.8f root@cacti:~/cacti-spine-0.8.8f# aclocal root@cacti:~/cacti-spine-0.8.8f# libtoolize --force root@cacti:~/cacti-spine-0.8.8f# autoheader root@cacti:~/cacti-spine-0.8.8f# autoconf root@cacti:~/cacti-spine-0.8.8f# automake root@cacti:~/cacti-spine-0.8.8f# ./configure root@cacti:~/cacti-spine-0.8.8f# make root@cacti:~/cacti-spine-0.8.8f# make install make[1]: Entering directory `/home/vagrant/cacti-spine-0.8.8f' test -z "/usr/local/spine/bin" || /bin/mkdir -p "/usr/local/spine/bin" /bin/bash ./libtool --mode=install /usr/bin/install -c spine '/usr/local/spine/bin' libtool: install: /usr/bin/install -c spine /usr/local/spine/bin/spine test -z "/usr/local/spine/etc" || /bin/mkdir -p "/usr/local/spine/etc" /usr/bin/install -c -m 644 spine.conf.dist '/usr/local/spine/etc' make[1]: Leaving directory `/home/vagrant/cacti-spine-0.8.8f'
root@cacti:~/cacti-spine-0.8.8f# mv /usr/local/spine/etc/{spine.conf.dist,spine.conf} root@cacti:~/cacti-spine-0.8.8f# vim /usr/local/spine/etc/spine.conf … DB_Host localhost DB_Database cacti DB_User cactiuser DB_Pass your_password DB_Port 3306 …
root@cacti:/usr/local/spine/bin# cd /usr/local/spine/bin/ root@cacti:/usr/local/spine/bin# ./spine -V 5 -R
root@cacti:~/cacti-spine-0.8.8f# cd /var/www/cacti/plugins/ root@cacti:/var/www/cacti/plugins# wget http://docs.cacti.net/_media/plugin:aggregate-v0.75.tgz -O aggregate-v0.75.tgz
root@cacti:/var/www/cacti/plugins# tar xzvf aggregate-v0.75.tgz aggregate/ aggregate/setup.php aggregate/aggregate_functions.php aggregate/color_templates_items.php aggregate/aggregate.php aggregate/color_templates.php aggregate/README aggregate/aggregate_manual.pdf aggregate/LICENSE aggregate/color_html.php root@cacti:/var/www/cacti/plugins# rm aggregate-v0.75.tgz root@cacti:/var/www/cacti/plugins# chown -R www-data:www-data aggregate/
root@cacti:/var/www/cacti/plugins# wget http://network-weathermap.com/files/php-weathermap-0.97c.zip
root@cacti:/var/www/cacti/plugins# unzip php-weathermap-0.97c.zip root@cacti:/var/www/cacti/plugins# rm php-weathermap-0.97c.zip
root@cacti:/var/www/cacti/plugins# chown -R www-data:www-data weathermap/ root@cacti:/var/www/cacti/plugins# vim weathermap/editor.php ... $ENABLED=true; ...
Source: https://habr.com/ru/post/277375/
All Articles