免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1464 | 回复: 0
打印 上一主题 下一主题

[FreeBSD] Cacti ports安装简要说明。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-13 09:26 |只看该作者 |倒序浏览
作者:梅劲松
本文档为MIT授权.
需要更新流量监控,刚好听说Cacti 不错。于是ports安装一下。
我的是5.x的freebsd系统。
1、cd /usr/share/examples/cvsup
2、 cvsup -g -L 2 ports-supfile
3、cd /usr/ports/www/apache22下make;make install
4、 cd /usr/ports/lang/php4下make;make install
5、编辑httpd.conf加入如下代码
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################

6、如果你想使用mysql5 那么请先到mysql50-server或者mysql51-server下make;make install
7、如果想使用mysql,请直接到 /usr/ports/net/cacti下make;make install
8、

# mysql -u root -prootroot

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>; create database cactidb;
Query OK, 1 row affected (0.00 sec)

mysql>; grant all on cactidb.* to root;
Query OK, 0 rows affected (0.01 sec)

mysql>; grant all on cactidb.* to root@localhost;
Query OK, 0 rows affected (0.01 sec)

mysql>; grant all on cactidb.* to cactiuser;
Query OK, 0 rows affected (0.00 sec)

mysql>; grant all on cactidb.* to cacti@localhost;
Query OK, 0 rows affected (0.01 sec)

mysql>; set password for cacti@localhost=password('cactipw');
Query OK, 0 rows affected (0.00 sec)

mysql>; exit

9、使用cacti.sql来建库
/usr/local/mysql/bin/mysql –u root –prootroot cactidb < cacti.sql

10、注意!!是修改db-settings.php文件里面的数据库信息。

11、
Crontab –u cactiuser –e
为cacti用户加入
*/5 * * * * /www/php/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1

12、配置好你的访问地址或者虚拟主机。

13、重新启动,等待5分钟以上。ok!

[ 本帖最后由 xichen 于 2006-2-22 17:00 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP