收藏 分享(赏)

centos 6安装smokeping.docx

上传人:11xg27ws 文档编号:7806447 上传时间:2019-05-26 格式:DOCX 页数:21 大小:215.79KB
下载 相关 举报
centos 6安装smokeping.docx_第1页
第1页 / 共21页
centos 6安装smokeping.docx_第2页
第2页 / 共21页
centos 6安装smokeping.docx_第3页
第3页 / 共21页
centos 6安装smokeping.docx_第4页
第4页 / 共21页
centos 6安装smokeping.docx_第5页
第5页 / 共21页
点击查看更多>>
资源描述

1、前言:由于近段时间一直有网友在网上问关于在 smokeping 在 centos6.2 下面的安装问题,主要的问题是 centos6.2 默认安装的是 perl 5.10.1,而 centos5 默认安装的是 perl 5.8.8,所以如果在在 centos6.2 下直接按 centos5 的安装方法的话总会有一些奇怪的问题,归根到底还是要解决 perl 的问题。我趁这几天有时间,就在网上参考了几个网友的文章,再参照我以前写的 centos5.6 的安装教程,综合起来,终于成功在 centos6.2 上安装 smokeping!话不多说!直接上效果图:系统环境图一、初始化安装 centos6.

2、2这里不用多说了,选择最小化安装即可!确保系统有安装了 yum 工具和网络能通就可以!二、准备工作1、请先暂时关闭 iptables 以及 selinux 刨除其他影响1)关闭 selinuxvi /etc/sysconfig/selinux 将 SELINUX=enforcing改成 SELINUX=disabled 重启系统后生效2)关闭防火墙; service iptables stop注:重启系统后默认是开启防火墙的2、更新一下 yum 源,国内用 163 的吧。 cd /etc/yum.repos.d/wget http:/ clean all #清除缓存yum makecache

3、#将服务器上的软件包信息缓存到本地 ,以提高搜索安装软件的速度三、安装 apache 与 smokeping1、首先安装 web 服务器,我选用 apacheyum install httpdyum install httpd-devel2、安装 rrdtool1)rrdtool 所依赖的库yum -y install libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-develyum ins

4、tall -y httpd perl-Compress-Zlib perl-HTML-Tagset perl-HTML-Parser perl-libwww-perl xorg-x11-fonts-Type1 ruby libdbiyum -y install fonts-chinese.noarchyum install rrdtool-perl2)rrdtool 的具体安装(建议不要用 yum 安装,用 tar 安装可以指定相应的路径,方便后续查找路径使用)(1)wget http:/oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz (2)ta

5、r -zxvf rrdtool-1.4.5.tar.gz (3)cd rrdtool-1.4.5(4)./configure -prefix=/usr/local/rrdtool -disable-tcl -disable-python出现错误:rootlocalhost rrdtool-1.4.5# ./configure -prefix=/usr/local/rrdtool -disable-tcl -disable-pythonchecking build system type. i686-pc-linux-gnuchecking host system type. i686-pc-l

6、inux-gnuchecking target system type. i686-pc-linux-gnuchecking for gcc. nochecking for cc. nochecking for cl.exe. noconfigure: error: in /root/rrdtool-1.4.5:configure: error: no acceptable C compiler found in $PATHSee config.log for more details./提示系统没有安装 gcc 等编译工具解决方法:(用 tar 安装软件,提示缺少什么,那你就直接安装什么就行

7、了!)yum -y install gcc安装成功 gcc 后,再接着上面的步骤继续走!(5)make # PERL5LIB修改为: use lib qw(/usr/local/rrdtool/lib/perl5);(2)进入 htdocs 目录mv smokeping.fcgi.dist smokeping.fcgichmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist(3)进入 etc 目录cp config.dist config(4)修改 config 文件(以我的为例!只帖出要修改的部分,没有出现的不用修改,具体也可以参照

8、centos5 的)vim configrootlocalhost local# less /usr/local/smokeping/etc/config * General *imgcache = /var/www/html/smokeping/imgimgurl = http:/192.168.1.123/smokeping/imgdatadir = /usr/local/smokeping/datapiddir = /usr/local/smokeping/varcgiurl = http:/192.168.1.123/smokeping/smokeping.fcgi* Probes *

9、+ FPingbinary = /usr/local/sbin/fping#* Slaves *#secrets=/usr/local/smokeping/etc/smokeping_secrets.dist#+boomer#display_name=boomer#color=0000ff#+slave2#display_name=another#color=00ff00* Targets *probe = FPingmenu = Toptitle = Network Latency Grapherremark = Welcome to the SmokePing website of xxx

10、 Company. Here you will learn all about the latency of our network.+ Testmenu= Targets#parents = owner:/Test/James location:/+ Jamesmenu = Jamestitle =James#alerts = someloss#slaves = boomer slave2host = 8.8.8.8#+ MultiHost#menu = Multihost#title = James and James as seen from Boomer#host = /Test/Ja

11、mes /Test/Jamesboomer8)配置 HTTP 运行环境(1)创建目录mkdir -p /var/www/html/smokeping/img /var/www/html/smokeping/script/ /usr/local/smokeping/data /opt/smokeping/var (2)分配权限chown -R apache:apache /var/www/html/smokeping/img(3)建立软链接,把 smokping 目录下的文件软链接到 HTTP 目录下ln -s /usr/local/smokeping/htdocs/cropper /var/w

12、ww/html/smokeping/cropper ln -s /usr/local/smokeping/htdocs/smokeping.fcgi /var/www/html/smokeping/smokeping.fcgi (4)修改 HTTP 配置文件vim /etc/httpd/conf/httpd.confchange AddHandler cgi-script .cgi to AddHandler cgi-script .cgiUnder change Options Indexes FollowSymLinks to Options Indexes FollowSymLinks

13、ExecCGI9)创建 smokeping 执行脚本touch /etc/init.d/smokeping/创建脚本文件vim /etc/init.d/smokeping/增加配置脚本,内容如下:-#!/bin/bash# chkconfig: 2345 80 05# Description: Smokeping init.d script# Hacked by : jeff kang - http:/# Get function from functions library. /etc/init.d/functions# Start the service Smokepingstart()

14、echo -n “Starting Smokeping: “/usr/local/smokeping/bin/smokeping /dev/null 2;stop)stop;status)status Smokeping;restart|reload|condrestart)stopstart;*)echo $“Usage: $0 start|stop|restart|reload|status“exit 1esacexit 0-chmod 755 /etc/init.d/smokeping/增加可执行权限10)自动运行等配置:chkconfig smokeping on chkconfig

15、httpd on 附 apache 配置文件rootlocalhost # more /etc/httpd/conf/httpd.confServerTokens OSServerRoot “/etc/httpd“PidFile run/httpd.pidTimeout 60KeepAlive OffMaxKeepAliveRequests 100KeepAliveTimeout 15StartServers 8MinSpareServers 5MaxSpareServers 20ServerLimit 256MaxClients 256MaxRequestsPerChild 4000Star

16、tServers 4MaxClients 300MinSpareThreads 25MaxSpareThreads 75 ThreadsPerChild 25MaxRequestsPerChild 0Listen 81LoadModule auth_basic_module modules/mod_auth_basic.soLoadModule auth_digest_module modules/mod_auth_digest.soLoadModule authn_file_module modules/mod_authn_file.soLoadModule authn_alias_modu

17、le modules/mod_authn_alias.soLoadModule authn_anon_module modules/mod_authn_anon.soLoadModule authn_dbm_module modules/mod_authn_dbm.soLoadModule authn_default_module modules/mod_authn_default.soLoadModule authz_host_module modules/mod_authz_host.soLoadModule authz_user_module modules/mod_authz_user

18、.soLoadModule authz_owner_module modules/mod_authz_owner.soLoadModule authz_groupfile_module modules/mod_authz_groupfile.soLoadModule authz_dbm_module modules/mod_authz_dbm.soLoadModule authz_default_module modules/mod_authz_default.soLoadModule ldap_module modules/mod_ldap.soLoadModule authnz_ldap_

19、module modules/mod_authnz_ldap.soLoadModule include_module modules/mod_include.soLoadModule log_config_module modules/mod_log_config.soLoadModule logio_module modules/mod_logio.soLoadModule env_module modules/mod_env.soLoadModule ext_filter_module modules/mod_ext_filter.soLoadModule mime_magic_modul

20、e modules/mod_mime_magic.soLoadModule expires_module modules/mod_expires.soLoadModule deflate_module modules/mod_deflate.soLoadModule headers_module modules/mod_headers.soLoadModule usertrack_module modules/mod_usertrack.soLoadModule setenvif_module modules/mod_setenvif.soLoadModule mime_module modu

21、les/mod_mime.soLoadModule dav_module modules/mod_dav.soLoadModule status_module modules/mod_status.soLoadModule autoindex_module modules/mod_autoindex.soLoadModule info_module modules/mod_info.soLoadModule dav_fs_module modules/mod_dav_fs.soLoadModule vhost_alias_module modules/mod_vhost_alias.soLoa

22、dModule negotiation_module modules/mod_negotiation.soLoadModule dir_module modules/mod_dir.soLoadModule actions_module modules/mod_actions.soLoadModule speling_module modules/mod_speling.soLoadModule userdir_module modules/mod_userdir.soLoadModule alias_module modules/mod_alias.soLoadModule substitu

23、te_module modules/mod_substitute.soLoadModule rewrite_module modules/mod_rewrite.soLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_balancer_module modules/mod_proxy_balancer.soLoadModule proxy_ftp_module modules/mod_proxy_ftp.soLoadModule proxy_http_module modules/mod_proxy_http.soLoadM

24、odule proxy_ajp_module modules/mod_proxy_ajp.soLoadModule proxy_connect_module modules/mod_proxy_connect.soLoadModule cache_module modules/mod_cache.soLoadModule suexec_module modules/mod_suexec.soLoadModule disk_cache_module modules/mod_disk_cache.soLoadModule cgi_module modules/mod_cgi.soLoadModul

25、e version_module modules/mod_version.soLoadModule fastcgi_module modules/mod_fastcgi.soInclude conf.d/*.confUser apacheGroup apacheServerAdmin rootlocalhostUseCanonicalName OffDocumentRoot “/var/www/html“Options FollowSymLinksAllowOverride NoneOptions Indexes FollowSymLinks ExecCGIAllowOverride None

26、Order allow,denyAllow from all# UserDir is disabled by default since it can confirm the presence# of a username on the system (depending on home directory# permissions).#UserDir disabled# To enable requests to /user/ to serve the users public_html# directory, remove the “UserDir disabled“ line above

27、, and uncomment# the following line instead:# #UserDir public_htmlDirectoryIndex index.html index.html.varAccessFileName .htaccessOrder allow,denyDeny from allSatisfy AllTypesConfig /etc/mime.typesDefaultType text/plainMIMEMagicFile conf/magicHostnameLookups OffErrorLog logs/error_logLogLevel warnLo

28、gFormat “%h %l %u %t “%r“ %s %b “%Refereri“ “%User-Agenti“ combinedLogFormat “%h %l %u %t “%r“ %s %b“ commonLogFormat “%Refereri - %U“ refererLogFormat “%User-agenti“ agentCustomLog logs/access_log combinedServerSignature OnAlias /icons/ “/var/www/icons/“Options Indexes MultiViews FollowSymLinksAllo

29、wOverride NoneOrder allow,denyAllow from all# Location of the WebDAV lock database.DAVLockDB /var/lib/dav/lockdbScriptAlias /cgi-bin/ “/var/www/cgi-bin/“AllowOverride NoneOptions NoneOrder allow,denyAllow from allIndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8AddIconByEnco

30、ding (CMP,/icons/compressed.gif) x-compress x-gzipAddIconByType (TXT,/icons/text.gif) text/*AddIconByType (IMG,/icons/image2.gif) image/*AddIconByType (SND,/icons/sound2.gif) audio/*AddIconByType (VID,/icons/movie.gif) video/*AddIcon /icons/binary.gif .bin .exeAddIcon /icons/binhex.gif .hqxAddIcon /

31、icons/tar.gif .tarAddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .ivAddIcon /icons/compressed.gif .Z .z .tgz .gz .zipAddIcon /icons/a.gif .ps .ai .epsAddIcon /icons/layout.gif .html .shtml .htm .pdfAddIcon /icons/text.gif .txtAddIcon /icons/c.gif .cAddIcon /icons/p.gif .pl .pyAddIcon /icons/f.gif

32、 .forAddIcon /icons/dvi.gif .dviAddIcon /icons/uuencoded.gif .uuAddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tclAddIcon /icons/tex.gif .texAddIcon /icons/bomb.gif coreAddIcon /icons/back.gif AddIcon /icons/hand.right.gif READMEAddIcon /icons/folder.gif DIRECTORYAddIcon /icons/blank.gif BLANK

33、ICONDefaultIcon /icons/unknown.gifReadmeName README.htmlHeaderName HEADER.htmlIndexIgnore .?* * *# HEADER* README* RCS CVS *,v *,tAddLanguage ca .caAddLanguage cs .cz .csAddLanguage da .dkAddLanguage de .deAddLanguage el .elAddLanguage en .enAddLanguage eo .eoAddLanguage es .esAddLanguage et .etAddL

34、anguage fr .frAddLanguage he .heAddLanguage hr .hrAddLanguage it .itAddLanguage ja .jaAddLanguage ko .koAddLanguage ltz .ltzAddLanguage nl .nlAddLanguage nn .nnAddLanguage no .noAddLanguage pl .poAddLanguage pt .ptAddLanguage pt-BR .pt-brAddLanguage ru .ruAddLanguage sv .svAddLanguage zh-CN .zh-cnAd

35、dLanguage zh-TW .zh-twLanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TWForceLanguagePriority Prefer FallbackAddDefaultCharset UTF-8AddType application/x-compress .ZAddType application/x-gzip .gz .tgzAddType application/x-x509-ca-cert .crtAddType

36、 application/x-pkcs7-crl .crlAddHandler cgi-script .cgiAddHandler type-map varAddType text/html .shtmlAddOutputFilter INCLUDES .shtmlAlias /error/ “/var/www/error/“AllowOverride NoneOptions IncludesNoExecAddOutputFilter Includes htmlAddHandler type-map varOrder allow,denyAllow from allLanguagePriori

37、ty en es de frForceLanguagePriority Prefer FallbackBrowserMatch “Mozilla/2“ nokeepaliveBrowserMatch “MSIE 4.0b2;“ nokeepalive downgrade-1.0 force-response-1.0BrowserMatch “RealPlayer 4.0“ force-response-1.0BrowserMatch “Java/1.0“ force-response-1.0BrowserMatch “JDK/1.0“ force-response-1.0BrowserMatc

38、h “Microsoft Data Access Internet Publishing Provider“ redirect-carefullyBrowserMatch “MS FrontPage“ redirect-carefullyBrowserMatch “WebDrive“ redirect-carefullyBrowserMatch “WebDAVFS/1.0123“ redirect-carefullyBrowserMatch “gnome-vfs/1.0“ redirect-carefullyBrowserMatch “XML Spy“ redirect-carefullyBrowserMatch “Dreamweaver-WebDAV-SCM1“ redirect-carefully

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报