Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration of cacti

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. Create a Virtual Host

1.vim /etc/httpd/conf.d/vhost.conf

This file is a new file or can be added at the end of/etc/httpd/conf/httpd.conf as:

/Fixed format ip and port settings

ServerName cacti.gaowei.com Name

DocumentRoot /web/vhost/cacti-0.8.8a /path

/Fixed format,"" path inside

Options Indexes FollowSymLinks /SOME RIGHTS, Baidu searchable

AllowOverride None

Order allow,deny

Allow from all

/fixed format

ErrorLog "logs/cacti-error_log" /Error Log

CustomLog "logs/cacti-access_log" common /General Log

/fixed format

2. vim /etc/hosts Add:

192.168.18.144 cacti.gaowei.com

II. Install cacti

1. tar xvf cacti-0.8.8a -C /web/vhost/ //web/vhost create for yourself

cd /web/vhost/cacti-0.8.8a

2. mysqladmin create cactidb /Create mysql database

3.mysql cactidb

< cacti.sql /将cacti.sql导入到数据库 4.mysql -e "GRANT ALL ON cactidb1.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'" /cactidb给用户cactiuser所有权限 密码为cactiuser 5.mysqladmin flush-privileges /刷新 6.mysql -ucactiuser -p /以cactiuser用户登录 7.mysql>

SHOW ASES; /View created database

8.cd include ;vim config. php/modified as 9

9.

/* make sure these values refect your actual database/host/user/password */

$database_type = "mysql";

$database_default = "cactidb";

$database_hostname = "localhost";

$database_username = "cactiuser";

$database_password = "cactiuser";

$database_port = "3306";

$database_ssl = false;

/*

Edit this to point to the default URL of your Cacti install

ex: if your cacti install as at http://serverip/cacti/ this

would be set to /cacti/

*/

//$url_path = "/cacti/";

$url_path = "/";

10.service httpd restart

11.useradd cactiuser ;passwd cactiuser

12.chown -R cactiuser:cactiuser rra/ log/

13. vim/etc/php. ini/modified as 14

14. This option is set to date.timezone = Asia/Shanghai

15. echo '*/5 *** /usr/bin/php/web/vhost/cacti-0.8.8a/poller. php &>/dev/null' > /var/spool/cron/cactiuser /cactiuser will execute every 5 minutes

poller.php

16. crontab -u cactiuser -e /make 15 write successfully, if there is an error, it will report an error

17. Enter in browser

cacti.gaowei.com will pop up the cacti installation prompt. It comes with 5 data sources. You can add this machine to monitor these 5 data sources.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report