centos7快速安装smokeping

服务器   发布日期:2025年05月11日   浏览次数:229
  1. .关闭selinux,建议修改完后即时重启reboot。避免太多防火墙的限制麻烦。
  2. vi /etc/selinux/config
  3. SELINUX=disabled
  4. :wq!
    2.设置时间并同步
    hwclock
    hwclock --set --date "2018-02-5 14:47:30"
    hwclock --hctosys
    clock -w
    history
    3.修改支持中文输入
    vi /etc/locale.conf
    LANG="zh_CN.UTF-8"
  5. reboot
  6. .修改yum
  7. yum install wget -y
  8. rm -rf /etc/yum.repos.d/*
  9. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
  10. yum clean all
  11. yum makecache
  12. 5.安装lrzsz上传软件
  13. yum -y install lrzsz
  14. 6.上传已下载好的echoping-6.0.2.tar.gz、smokeping-2.6.11.tar.gz、fping-4.0.tar.gz、config(smokeping配置模板)
  15. 7.快速安装以下软件
  16. yum groupinstall "Compatibility libraries" "Base" "Development tools" -y

    8.安装fping-4.0
  1. tar -zxvf fping-4.0.tar.gz
    cd fping-4.0
    ./configure
    make && make install
  2. 9.快速安装以下软件集
  3. yum -y install cpan perl perl-FCGI perl-CGI perl-Digest-HMAC perl-Net-Telnet perl-Net-OpenSSH perl-Net-SNMP perl-LDAP perl-Net-DNS perl-IO-Pty-Easy perl-Test-Simple perl-Sys-Syslog perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curl httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel mod_fcgid screen popt-devel openssl openssl-devel wqy-zenhei-fonts
  4. 10.安装配置echoping-6.0.2
  5. tar xvf echoping-6.0.2.tar.gz
  6. cd echoping-6.0.2
  7. ./configure --prefix=/usr/local/echoping --with-ssl --without-libidn
  8. make
  9. make install
  10. 11.安装配置smokeping-2.6.11
  11. tar -xvf smokeping-2.6.11.tar.gz
  12. cd smokeping-2.6.11
  13. export PERL5LIB=/usr/local/smokeping/thirdparty/lib/perl5/
  14. ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
  15. ./configure --prefix=/usr/local/smokeping
  16. gmake install
  17. cd /usr/local/smokeping
  18. mkdir cache data var
  19. touch /var/log/smokeping.log
  20. chown apache.apache cache/ data/ var/ /var/log
  21. 12.创建相关配置文件
  22. cp /usr/local/smokeping/htdocs/smokeping.fcgi.dist /usr/local/smokeping/htdocs/smokeping.fcgi
  23. cp ~/config /usr/local/smokeping/etc/config 复制smokeping配置模板到指定配置目录
  24. 13.修改字体支持中文
  25. vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
  26. /for my n查找
  27. for my $host (@hosts){
  28. my ($graphret,$xs,$ys) = RRDs::graph
  29. ("dummy",
  30. '--start', $tasks[0][1],
  31. '--end', $tasks[0][2],
  32. '--font TITLE:20"WenQuanYiZen Hei Mono"',
  33. 14.修改apache配置文件增加登录验证
  34. htpasswd -c /usr/local/smokeping/htdocs/htpasswd smokeping
  35. chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist
  36. 15.修改httpd.conf增加smokepingweb界面
  37. vim /etc/httpd/conf/httpd.conf
  38. IncludeOptional conf.d/*.conf
  39. #########changed by jack 2016/11/02##############
  40. Alias /cache "/usr/local/smokeping/cache/"
  41. Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
  42. Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
  43. <Directory "/usr/local/smokeping">
  44. AllowOverride None
  45. Options All
  46. AddHandler cgi-script .fcgi .cgi
  47. AllowOverride AuthConfig
  48. Order allow,deny
  49. Allow from all
  50. AuthName "Smokeping"
  51. AuthType Basic
  52. AuthUserFile /usr/local/smokeping/htdocs/htpasswd
  53. Require valid-user
  54. DirectoryIndex smokeping.fcgi
  55. </Directory>

  56. 16.删除firewalld,并安装配置iptables服务
systemctl stop firewalld.service
systemctl disable firewalld.service
yum install iptables-services -y
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
:wq!
systemctl start iptables.service
systemctl enable iptables.service
  1. 17.启动服务
    systemctl start httpd
    systemctl enable httpd
    netstat -lntup |grep 80
  2. /usr/local/smokeping/bin/smokeping
  3. 输入用户名smokeping,密码为你初始化的密码即可。

 

以上就是centos7快速安装smokeping的详细内容,更多关于centos7快速安装smokeping的资料请关注九品源码其它相关文章!