พอดี webmaster คงเหนื่อยๆช่วงนี้นะคับคงมีหลายๆคนไปถาม เช่นเดียวกันกับผมนะคับ
เลยเขียนมาให้ทุกคนลองทำดูนะคับ
putty เข้าไปใน root user
apt-get update
apt-get install sarg
pico /etc/squid/squid.conf
\\ คำสั่งเพื่อเข้าไปแก้ไขไฟล์\\เพิ่ม cache_access_log /var/log/squid/sarg.log
หลังชุดคำสั่ง
logformat common %{%Y-%m-%d %H:%M:%S}tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh$
cache_access_log /var/log/squid/access.log common
\\ อันนี้คือโปรแกรม log ของเดิมจากแผ่นซื่งทำการแก้ไขแล้ว\\cache_access_log /var/log/squid/sarg.logไฟล์
\\ log จะถูกนำไปเก็บไฟล์ /var/log/squid/sarg.log\\กด ctrl +x แล้วกด y เพื่อทำการ save
touch /var/log/squid/sarg.log
\\พิมใน command\\/etc/init.d/squid restart
\\ พิมใน command เพื่อทำการ restart service squid \\เสร็จแล้วให้เข้าไปหา webmin
https://ip-server:10000ใส่ user password
กด Refresh Modules
\\ ทำการ reload modu ต่างๆไปที่ Server >> Squid Report Generator >> Log Source and Report Destination
เลือก Other file แล้วใส่ /var/log/squid/sarg.log
Mail sending command ให้เลือก Default (mailx)
แล้วกด save
แล้วไปที่ Scheduled Report Generation
Scheduled report enabled?
\\ ให้เลือก Yes, at times selected below .. Simple schedule ..
\\ ให้เลือก Daily (at midnight)save
เลือก Generate Report Now
แค่นี้ก็เสร็จแล้วท่านก็เข้าไปดู sarg ได้ที่
http://ip-server/squid-reports/ขอบคุณคับ
ใครที่แก้ไข /etc/init.d/tableroute.sh
เป็น 1 wan game 2 wan internet balance แบ่งให้ผมด้วยนะคับ ประมาณงงนะคับ ไฟล์อื่นแก้ไขหมดแล้วเหลือตัวเดียวนี้ละคับ T-T