Cacti邮件报警和压力测试

cacti插件安装
1.cacti插件补丁包
cacti-plugin-0.8.7h-PA-v3.0-beta3.tar.gz
2.cacti settings插件
settings-v0.71-1.tgz
3.cacti thold插件
thold-v0.4.9-3.tgz


1.打补丁
tar xzf cacti-plugin-0.8.7h-PA-v3.0.tar.gz
cd cacti-plugin-arch/
rsync -a cacti-plugin-0.8.7h-PA-v3.0.diff pa.sql /usr/local/apache2/htdocs/cacti/
cd /usr/local/apache2/htdocs/cacti/
patch -p1 -N < cacti-plugin-0.8.7h-PA-v3.0.diff 
/usr/local/mysql/bin/mysql -uroot -pxiaobai cactidb < pa.sql 
vi incluce/global.php
$database_type = "mysql";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "root";
$database_password = "xiaobai";
$database_port = "3306";
$database_ssl = false;


2.
tar xzf settings-v0.71-1.tgz
tar xzf thold-v0.4.9-3.tgz
rsync -a settings thold /usr/local/apache2/htdocs/cacti/plugins/
cd /usr/local/apache2/
setfacl -m u:apache:rwx -R htdocs/
setfacl -m d:u:apache:rwx -R htdocs/
acl授权之后所有的文件都多了一个加好




vi include/config.php 添加
$plugins=array();
$plugins[]="settings";
$plugins[]="thold";
在后台管理里面安装插件




apache压力测试-ab
1.apache自带的压力测试软件ab测试
2.apache benchmark,apache基准测试工具
3.由httpd-2.2.3-43.el5.centos软件提供
4.ab压力测试时,可能要创建很多测试文件并删除,文件过多系统就会报错,修改如下:
ulimit -n 3600


ab测试举例
html文件永远都比php文件访问快速
/usr/local/apache2/bin/ab -c100 -n10000 http://192.168.124.130/index.html
/usr/local/apache2/bin/ab -c100 -n10000 http://192.168.124.130/index.php




mysqlslap测试举例
mysqlslap是5.1以后才有的软件
[root@localhost local]# /usr/bin/mysqlslap -uroot -pxiaobai -a --concurrency=50,100 --number-of-queries 3000 --iterations=5 --engine=myisam,innodb
myisam优于innodb表引擎

你可能感兴趣的:(apache,mysql,ssl,测试,database,plugins)