Ghi chép cài đặt Smokeping
Máy cài đặt CentOS7 64 bit
Đăng nhập với quyền root
Chạy các lệnh sau để tạm thời ngắt firewall và selinux
sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl enable network
sudo systemctl start network
sed -i ' s/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
sed -i ' s/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
Khai báo repos và các gói cần thiết
yum -y update
yum groupinstall " Development tools"
yum -y install epel-release wget curl httpd postfix
yum -y update
yum -y install smokeping
Tải file ở link dưới để thay thế file cấu hình cho smokeping trong web server.
wget -O etc/httpd/conf.d/smokeping.conf https://raw.githubusercontent.com/congto/smokeping/master/docker/etc/httpd/conf.d/smokeping.conf
Sửa cấu hình trong file /etc/httpd/conf/httpd.conf
Tìm dòng DirectoryIndex index.html
(dòng 164) trong file /etc/httpd/conf/httpd.conf
và thay bằng dòng
DirectoryIndex index.html smokeping.fcgi
Tìm dòng DocumentRoot "/var/www/html"
(dòng 119) trong file /etc/httpd/conf/httpd.conf
và thay bằng dòng
DocumentRoot "/usr/share/smokeping/cgi"
Khởi động lại httpd và smokeping
systemctl restart httpd
systemctl restart smokeping
Đọc tiếp trên google để khai báo ping.