- .关闭selinux,建议修改完后即时重启reboot。避免太多防火墙的限制麻烦。
- vi /etc/selinux/config
- SELINUX=disabled
- :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"- reboot
- .修改yum源
- yum install wget -y
- rm -rf /etc/yum.repos.d/*
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
- yum clean all
- yum makecache
- 5.安装lrzsz上传软件
- yum -y install lrzsz
- 6.上传已下载好的echoping-6.0.2.tar.gz、smokeping-2.6.11.tar.gz、fping-4.0.tar.gz、config(smokeping配置模板)
- 7.快速安装以下软件
- yum groupinstall "Compatibility libraries" "Base" "Development tools" -y
8.安装fping-4.0
systemctl stop firewalld.service
- tar -zxvf fping-4.0.tar.gz
cd fping-4.0
./configure
make && make install- 9.快速安装以下软件集
- 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
- 10.安装配置echoping-6.0.2
- tar xvf echoping-6.0.2.tar.gz
- cd echoping-6.0.2
- ./configure --prefix=/usr/local/echoping --with-ssl --without-libidn
- make
- make install
- 11.安装配置smokeping-2.6.11
- tar -xvf smokeping-2.6.11.tar.gz
- cd smokeping-2.6.11
- export PERL5LIB=/usr/local/smokeping/thirdparty/lib/perl5/
- ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
- ./configure --prefix=/usr/local/smokeping
- gmake install
- cd /usr/local/smokeping
- mkdir cache data var
- touch /var/log/smokeping.log
- chown apache.apache cache/ data/ var/ /var/log
- 12.创建相关配置文件
- cp /usr/local/smokeping/htdocs/smokeping.fcgi.dist /usr/local/smokeping/htdocs/smokeping.fcgi
- cp ~/config /usr/local/smokeping/etc/config 复制smokeping配置模板到指定配置目录
- 13.修改字体支持中文
- vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
- /for my 按n查找
- for my $host (@hosts){
- my ($graphret,$xs,$ys) = RRDs::graph
- ("dummy",
- '--start', $tasks[0][1],
- '--end', $tasks[0][2],
- '--font TITLE:20"WenQuanYiZen Hei Mono"',
- 14.修改apache配置文件增加登录验证
- htpasswd -c /usr/local/smokeping/htdocs/htpasswd smokeping
- chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist
- 15.修改httpd.conf增加smokeping的web界面
- vim /etc/httpd/conf/httpd.conf
- IncludeOptional conf.d/*.conf
- #########changed by jack 2016/11/02##############
- Alias /cache "/usr/local/smokeping/cache/"
- Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
- Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
- <Directory "/usr/local/smokeping">
- AllowOverride None
- Options All
- AddHandler cgi-script .fcgi .cgi
- AllowOverride AuthConfig
- Order allow,deny
- Allow from all
- AuthName "Smokeping"
- AuthType Basic
- AuthUserFile /usr/local/smokeping/htdocs/htpasswd
- Require valid-user
- DirectoryIndex smokeping.fcgi
- </Directory>
16.删除firewalld,并安装配置iptables服务
- 17.启动服务
systemctl start httpd
systemctl enable httpd
netstat -lntup |grep 80- /usr/local/smokeping/bin/smokeping
- 输入用户名smokeping,密码为你初始化的密码即可。
以上就是centos7快速安装smokeping的详细内容,更多关于centos7快速安装smokeping的资料请关注九品源码其它相关文章!