日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux运维最小化安装cacti,Linux监控和安全运维--cacti安装部署

發(fā)布時間:2025/1/21 linux 54 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux运维最小化安装cacti,Linux监控和安全运维--cacti安装部署 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

cacti安裝

[root@client~]# rpm -ivh http://www.aminglinux.com/bbs/data/p_w_upload/forum/month_1211/epel-release-6-7.noarch.rpm

//安裝epel擴展源

[root@client ~]# yum install -y? httpd php php-mysql mysql mysql-server mysql-devel php-gd? libjpeg libjpeg-devel libpng libpng-devel

//安裝httpd、php、mysql

[root@client ~]# yum install -y cacti? net-snmp? net-snmp-utils? rrdtool

//安裝cacti ?net-snmp? rrdtool

[root@client ~]# /etc/init.d/mysqld start

[root@client ~]# /etc/init.d/httpd start

[root@client ~]# /etc/init.d/snmpd? start

[root@client ~]# vim /etc/httpd/conf.d/cacti.conf

# httpd 2.4

Require host localhost

# httpd 2.2

Order deny,allow

Allow from all

Allow from localhost

[root@client ~]# /etc/init.d/httpd? restart

[root@client ~]# mysql -uroot? -e "create database cacti"

[root@client ~]# mysql -uroot -e "grant all on cacti.* to 'cacti'@'127.0.0.1' identified by 'cacti';"

[root@client ~]# mysql -uroot cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql

[root@client ~]# vim /usr/share/cacti/include/config.php

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "127.0.0.1";

$database_username = "cacti";

$database_password = "cacti";

$database_port = "3306";

$database_ssl = false;

web訪問192.168.137.21/cacti進入cacti安裝的圖形頁面

next-----next------finish

User Name: admin

Password:admin

//輸入用戶名密碼登入

Password:admin

Confirm:admin

//修改密碼

登入成功

[root@client ~]# /usr/bin/php /usr/share/cacti/poller.php

[root@client ~]# vim /etc/php.ini

date.timezone ='Asia/Chongqing'

[root@client ~]# crontab ?-e

*/5 * * * *? /usr/bin/php /usr/share/cacti/poller.php

等待5分鐘以上,任務計劃執(zhí)行后,有監(jiān)控信息參數(shù),產(chǎn)生為圖片信息。

以上監(jiān)控的為本機

現(xiàn)cacti增加客戶端監(jiān)控,安裝客戶端(增加一個linux服務器)

打開一臺客戶機

[root@client ~]# yum install -y net-snmp

[root@client ~]#? vim /etc/snmp/snmpd.conf

syslocation 137.21//可寫本機IP

syscontact Root 123@456.com//管理員的郵箱

[root@client ~]# service? snmpd? start

在網(wǎng)頁上增加該客戶機的監(jiān)控

console-------Device-------Add----

Description可寫本機ip(或自定義)

Hostname可寫本機ip

Host Template選ucd/net? SNMP Host

SNMP Version選Version 2

----create------Create Graphs for this Host---------

Graph Types: SNMP - Interface Statistics

選中網(wǎng)卡-----create

Graph Types: Graph Template Based

Create: ucd/net - CPU Usage

Create: ucd/net - Load Average

Create: ucd/net - Memory Usage

三項全選,監(jiān)控CPU、Load、Memory

create

將這臺設備的監(jiān)控加入tree

Graph Trees------- Default Tree--------- Add------

Host-----選中剛加的設備---create

graphs---------Default Tree----192.168.137.21

查看監(jiān)控數(shù)據(jù)產(chǎn)生

總結

以上是生活随笔為你收集整理的linux运维最小化安装cacti,Linux监控和安全运维--cacti安装部署的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。