免费注册 查看新帖 |

Chinaunix

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

监控软件 Cacti详细安装步骤 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-14 15:00 |只看该作者 |倒序浏览
--mysql
tar zxvf mysql-5.0.37.tar.gz
cd mysql-5.0.37
more INSTALL-SOURCE
groupadd mysql
useradd -g mysql mysql
passwd mysql
./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charsets=gb2312,latin1,utf8 --enable-largefile --with-big-tables --localstatedir=/usr/local/mysql/data --without-debug --with-max-indexes=64 --without-ndbcluster
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cp /root/mysql-5.0.37/support-files/mysql.server /usr/local/mysql/mysql
chmod +x /usr/local/mysql/mysql
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root  .
chown -R mysql .
chgrp -R mysql .
chown mysql.mysql -R data
bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root password 508956
/usr/local/mysql/mysql restart
/usr/local/mysql/bin/mysql -uroot -p508956   登入mysql控制台看看是不是正常了

--apache
emerge gd
emerge jpeg
emerge zlib
emerge libpng
emerge freetype
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/httpd --enable-so --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr
make
make install
/usr/local/httpd/bin/apachectl start 如果没起来,看看日志:
more /usr/local/httpd/logs/error_log,
/usr/local/httpd/bin/apachectl start  试试,应该就能访问了: http://192.168.0.212/
cd..

--PHP
emerge dev-libs/libxml
emerge dev-libs/libxml2
emerge curl
emerge mm
tar zxvf php-5.2.1.tar.gz
cd php-5.2.1
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr --enable-sockets

'./configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mod_charset' '--enable-cli' '--enable-safe-mode' '--enable-sigchild' '--enable-magic-quotes' '--enable-rpath' '--enable-short-tags' '--enable-libgcc' '--enable-versioning' '--enable-ipv6' '--with-pcre-regex' '--with-zlib' '--with-bz2' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dba' '--with-curl' '--enable-dio' '--with-regex' '--enable-zend-multibyte' '--enable-zend-memory-manager' '--enable-memory-limit' '--enable-inline-optimization' '--enable-xml' '--enable-wddx' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-sockets' '--with-mm' '--enable-shmop' '--enable-session' '--with-qtdom' '--enable-pcntl' '--with-ncurses' '--with-mysql' '--with-mcrypt' '--enable-mbstring' '--enable-mbregex' '--enable-java' '--with-iconv' '--with-gd' '--enable-ftp' '--with-dom' '--with-mod_charset' '--with-libmbfl'

'--with-readline' '--with-libedit'  '--with-mime-magic'
Extract the distribution tarball.
shell> tar xzvf cacti-version.tar.gz
Create the MySQL database:
shell> mysqladmin --user=root create cacti
Import the default cacti database:
shell> mysql cacti < cacti.sql
Optional: Create a MySQL username and password for Cacti.
shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
Add a line to your /etc/crontab file similar to:
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Replace cactiuser with the valid user specified in the previous step.
Replace /var/www/html/cacti/ with your full Cacti path.
Point your web browser to:
http://your-server/cacti/
Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly on the following screen.

下载rrdtool,及cactid,放到cacti目录下
打开默认的/etc/snmp/snmp.conf文件,更改如下配置:
1、查找以下字段:
[Copy to clipboard] [ - ]CODE:
#       sec.name  source          community
com2sec notConfigUser  default       public
将"comunity"字段改为你要设置的密码.比如"public".                                    
将“default”改为你想哪台机器可以看到你的snmp信息,如10.10.10.10。
3、查找以下字段:
[Copy to clipboard] [ - ]CODE:
####
# Finally, grant the group read-only access to the systemview view.
#       group          context sec.model sec.level prefix read   write  notif
access  notConfigGroup ""      any       noauth    exact  mib2 none none
将"read"字段改为mib2.
[Copy to clipboard] [ - ]CODE:
#access  notConfigGroup ""      any       noauth    exact  systemview none none
3、查找以下字段:
[Copy to clipboard] [ - ]CODE:
## -or just the mib2 tree-
view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc  
将该行前面的"#"去掉.
保存关闭.
4、运行/etc/init.d/snmpd start命令运行snmpd.
最后运行netstat -ln查看161端口是否打开了.
二、FreeBSD
如果使用port安装net-snmp,默认的配置文件应该是在/usr/local/share/snmp/snmpd.conf(没有默认的文件)。
可以建立一个简单的配置文件,如:
[Copy to clipboard] [ - ]CODE:
syslocation  YourDefineName
syscontact  YourEmailAddress
sysservices 77
rocommunity  public  (请更改)
load  12 12 12
然后运行snmpd,netstat 看是否打开了161端口。
上述用法只针对默认的安装,如果你是自定义的安装请依照你的安装目录来设置。

论坛徽章:
0
2 [报告]
发表于 2008-04-14 16:32 |只看该作者
不全

论坛徽章:
0
3 [报告]
发表于 2008-04-14 18:24 |只看该作者
我最近也在搞这个东东,还有zabbix

论坛徽章:
0
4 [报告]
发表于 2008-05-04 11:08 |只看该作者
汗!!!!看不懂!

论坛徽章:
0
5 [报告]
发表于 2008-05-14 16:36 |只看该作者
大家能不能补全点呀,这样看得有点麻烦呀
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP