http://ncu.dl.sourceforge.net/project/lightsquid/lightsquid/1.8/lightsquid-1.8.tgz
extrax
# mkdir /var/www/html/lightsquid
upload ke situ
# cd /var/www/html/lightsquid
# chown apache:apache -R /var/www/html/lightsquid
# nano /var/www/html/squid/lightsquid.cfg
#path to additional `cfg` files
$cfgpath ="/var/www/html/lightsquid";
#path to `tpl` folder
$tplpath ="/var/www/html/lightsquid/tpl";
#path to `lang` folder
$langpath ="/var/www/html/lightsquid/lang";
#path to `report` folder
$reportpath ="/var/www/html/lightsquid/report";
#path to access.log
$logpath ="/var/log/squid";
#path to `ip2name` folder
$ip2namepath ="/var/www/html/lightsquid/ip2name";
nano /etc/httpd/conf/httpd.conf
hilangkan tanda pagar dan ubah all untuk htacces
AllowOverride All
AddHandler cgi-script .cgi
# service httpd restart
# chmod +x *.cgi
# chmod +x *.pl
# yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-GD gd
# yum install php php-common php-mysql php-mcrypt php-gd php-ldap install php-imap php-pgsql php-devel php-bcmath php-dba php-embedded php-mbstring php-interbase php-mhash php-mssql php-eaccelerator php-process php-pspell php-recode php-snmp php-soap php-tidy php-xml php-xmlrpc php-zts
# service httpd restart
# cd /var/www/html/lightsquid
# perl check-setup.pl
# perl lightparser.pl
Penjadwalan
# crontab –e
Pencet i
Ketik
*/30 * * * * /var/www/html/lightsquid/lightparser.pl
Pencet esc
Ketik :wq enter
tes lihat hasil
#crontab –l
diasumsikan lightsquid akan dijalankan oleh crontab setiap 30 menit sekali
agar aksess menggunakan user dan password
# htpasswd -c /var/www/html/lightsquid/password admin
# chmod 644 /var/www/html/lightsquid/password
Setelelah create user beres selanjutnya bisa dilanjutkan dengan merubah file .htaccess
nano /var/www/html/lightsquid/.htaccess
delete isinya dan isikan:
AuthType Basic
AuthGroupFile /dev/null
AuthName "Squid Report"
AuthUserFile /var/www/html/lightsquid/password
require user admin admin
Options FollowSymLinks ExecCGI
DirectoryIndex index.cgi
http:ipclearos/lightsquid
isikan user admin password yang anda buat
Tidak ada komentar:
Posting Komentar