awstats的搭建 (linux5.4)
挂载光盘
mount /dev/cdrom /media
cd /media/Server
rpm -ivh php-pdo-[tab] php-mysql-[tab] php-gd-[tab] php-mbstring-[tab]
修改ftp
vi /etc/vsftpd/vsftpd.conf
添加 chroot_local_user=YES
service vsftpd start
chkconfig vsftpd on
建立用户,上传软件
adduser up
passwd up
jia
jia
解压编译
cd /home/up
ls
tar -zxf awstats-6.9.tar.gz
mv awstats-6.9 /usr/local/awstats
cd /usr/local/awstats/tools
./awstats_configure.pl
/etc/httpd/conf/httpd.conf
Y
www.jia.com
mkdir /var/lib/awstats
vi /etc/awstats/awstats.www.jia.com.conf
修改 LogFile=”/var/log/httpd/access_log”
刷新
perl /usr/local/awstats/wwwroot/cgi-bin/aestats.pl –update-config=www.jia.com
任务计划
crontab -e
*/5 *** * perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl –update-config=www.jia.com
网页浏览路径
service httpd start
chkconfig httpd on
http://192.168.1.3/awstats/awstats.pl?config=www.jia.com
cacti的搭建
cd /home/up/
ls
rpm -ivh net-snmp-* lm_sensors-[tab] (上传文件)
vi /etc/snmp/snmpd.conf
41行 default后改名 jia
62行 exact 后改名 all
85行 view前去除#
service snmpd start
chkconfig snmpd on
安装必要软件包
cd /media/Server
rpm -ivh libpng-devel-[tab] libart_lgpl-devel-[tab] freetype-devel-[tab]
cd /home/up
tar -zxf rrdtool-[tab]
cd rrdtool-[tab]
./configure –prefix=/usr/local ;make ;make install
cd /var/www/html/
tar -zxf /home/up/cacti-[tab]
ls
mv cacti-[tab] cacti
adduser cactiuser
chown -R cactiuser.cactiuser cacti/
创建数据库
service mysqld start
chkconfig mysqld on
mysql
create database cactidb default character set utf8;
exit
mysql cactidb < cacti/cacti.sql
cd /var/www/html/cacti/
vi include/config.php
修改 $database_default = “cactidb”;
-username = “root”;
-password = “”;
刷新
php /var/www/html/cacti/poller.php
任务计划
crontab -e
*/5 * * * * php /var/www/html/cacti/poller.php
ntop的搭建
安装必要的软件包
cd /media/Service
rpm -ivh libpcap-devel-[tab]
编译
cd /media/up
tar -zxf ntop-[tab]
cd ntop-[tab]
./autogen.sh --with-tcpwrap ;make ;make install
网卡绑定
ntop -A
ntop -d -I eth0
本文出自 “我是学徒” 博客,谢绝转载!