Skip to content

Instantly share code, notes, and snippets.

@congto
Last active March 20, 2018 08:19
Show Gist options
  • Save congto/c4de990aaec204f188c8c0e89f93fa62 to your computer and use it in GitHub Desktop.
Save congto/c4de990aaec204f188c8c0e89f93fa62 to your computer and use it in GitHub Desktop.
note_smokeping.md

Ghi chép cài đặt Smokeping

Yêu cầu

  • Máy cài đặt CentOS7 64 bit

Bước chuẩn bị

  • Đă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.

HẾT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment