免费注册 查看新帖 |

Chinaunix

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

cacti 安装 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-13 16:42 |只看该作者 |倒序浏览
参考了Joecen大虾的大作
http://bbs.chinaunix.net/viewthr ... &extra=page%3D2
,看到还有那么多弟兄在迷糊,索性把自己的过程写出来,希望能对大家有所帮助,呵呵,我是在centos4.2上做的,4.0一样。
1.
Mysql source code installation
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip  cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
cp ./support-files/mysql.server /etc/init.d/mysql (In mysql scurce code directory)
chmod +x /etc/init.d/mysql
cd /etc/rc3.d and rc5.d
ln -s ../init.d/mysql S86mysql
ln -s ../init.d/mysql K86mysql (Note: the number in filename doesn't conflict with other scripts)
2.
Apache installation
./configure --prefix=/www --enable-so
make && make install
cp /www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d and rc5.d
ln -s ../init.d/httpd S87httpd
ln -s ../init.d/httpd K87httpd
or
chkconfig --add httpd
chkconfig --level 35 httpd on
3.
PHP Installation
./configure --prefix=/www/php --with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php --enable-sockets
--with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
make && make install
cp php.ini-dist /www/php/php.ini
vi /www/conf/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########################
/etc/init.d/httpd restart
4.
Mysql setting
/usr/local/mysql/bin/mysql -u root -p
mysql> set password for root@localhost=password('cactipw');
mysql> Query OK, 0 rows affected (0.00 sec)
mysql> create database cacti;
mysql> grant all on cacti.* to root;
mysql> grant all on cacti.* to root@localhost;
mysql> grant all on cacti.* to cactiuser;
mysql> grant all on cacti.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('cactipw');
mysql> flush privileges; (See cacti docs/INSTALL)
mysql> exit
5、rrdtool installation
download:
http://people.ee.ethz.ch/~oetike ... dtool-1.0.50.tar.gz
then
./configure
make && make install
6、net-snmp installation
Download the latest version and install it.
7、cacti installation
cp cacti-0.8.6g.tar.gz /www/htdocs
tar xzvf cacti-0.8.6g.tar.gz
mv cacti-0.8.6g cacti
cd cacti
/usr/local/mysql/bin/mysql –u root –psccmrtg cacti  /dev/null 2>&1
/etc/init.d/crond restart
Logon to internet and perform below command in shell window:
wget
http://www.cacti.net/downloads/p ... g_parse_error.patch
wget
http://www.cacti.net/downloads/p ... operties_zoom.patch
wget
http://www.cacti.net/downloads/p ... ver_snmp_auth.patch
wget
http://www.cacti.net/downloads/p ... _file_loading.patch
patch -p1 -N < short_open_tag_parse_error.patch
patch -p1 -N < graph_properties_zoom.patch
patch -p1 -N < script_server_snmp_auth.patch
patch -p1 -N < mib_file_loading.patch
cactid installation
./configure --with-mysql=/usr/local/mysql/include
make && make install
modify cactid.conf and copy it to /usr/local/cactid/
ln -s  /tmp/mysql.sock /var/lib/mysql/mysql.sock
or
cd /var/lib
ln -s /tmp mysql
8. threshold installation.(Add email or syslog alert function)
thold-0.2.5.zip
cd thold-0.2.5
./install.sh /www/htdocs/cacti/ cactiuser cactipw
You'd better add /usr/local/mysql/bin to $PATH.
9. Cacti settings
http://IP/cacti
10. other plugins installation
Monitor, Report,...
If you want to migrate cacti to another host, just use mysqldump to
export cacti configuration, use source command in mysql to inport
config, then copy /log and /rra to new host.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/95634/showart_2026536.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP