Thursday, September 5, 2013

Install SquidGuard 1.4 on Red Hat 6.4 X86_64

Persiapan:
1. Install Berkeley DB http://rijalbuntu.blogspot.com/2013/09/install-berkeley-db-4329-on-redhat-64.html
2. Download file http://www.squidguard.org/Downloads/squidGuard-1.4.tar.gz
3. Kopikan ke /usr/local/src

Compile:
[root@tester src]# tar xvfz squidGuard-1.4.tar.gz
[root@tester src]# cd squidGuard-1.4

[root@tester squidGuard-1.4]# ../configure --with-db=/usr/local/BerkeleyDB.4.3 --with-ldap
[root@tester squidGuard-1.4]# make
[root@tester squidGuard-1.4]# make install
Installing squidGuard
Done.
Installing configuration file
Created directory /usr/local/squidGuard
Assigned /usr/local/squidGuard to user squid
Created directory /usr/local/squidGuard/db
Assigned /usr/local/squidGuard/db to user squid
Created directory /usr/local/squidGuard/log
Assigned /usr/local/squidGuard/log to user squid
Copied sample squidGuard.conf
/usr/local/squidGuard/squidGuard.conf is now readable
The initial configuration is complete.

Congratulation. SquidGuard is sucessfully installed.

Pengecekan:
[root@tester local]# cd /usr/local/squidGuard
[root@tester squidGuard]# ls -l /usr/local/squidGuard
total 12
drwxr-xr-x 2 squid root 4096 Sep  5 11:19 db
drwxr-xr-x 2 squid root 4096 Sep  5 11:19 log
-rw-r--r-- 1 root  root 1240 Sep  5 11:19 squidGuard.conf

Convert textfile to db:
[root@tester squidGuard]# /usr/local/bin/squidGuard -C all

[root@tester squidGuard]# tail -f log/squidGuard.log
2013-09-05 11:31:58 [17227] New setting: dbhome: /usr/local/squidGuard/db
2013-09-05 11:31:58 [17227] New setting: logdir: /usr/local/squidGuard/log
2013-09-05 11:31:58 [17227] Added User: root
2013-09-05 11:31:58 [17227] Added User: foo
2013-09-05 11:31:58 [17227] Added User: bar
2013-09-05 11:31:58 [17227] destblock good missing active content, set inactive
2013-09-05 11:31:58 [17227] destblock local missing active content, set inactive
2013-09-05 11:31:58 [17227] init domainlist /usr/local/squidGuard/db/blacklists/adult/domains
2013-09-05 11:32:20 [17227] create new dbfile /usr/local/squidGuard/db/blacklists/adult/domains.db
2013-09-05 11:32:22 [17227] init urllist /usr/local/squidGuard/db/blacklists/adult/urls
2013-09-05 11:32:22 [17227] create new dbfile /usr/local/squidGuard/db/blacklists/adult/urls.db
2013-09-05 11:32:22 [17227] init expressionlist /usr/local/squidGuard/db/blacklists/adult/expressions
2013-09-05 11:32:22 [17227] squidGuard 1.4 started (1378355518.638)
2013-09-05 11:32:22 [17227] db update done
2013-09-05 11:32:22 [17227] squidGuard stopped (1378355542.671)

Cek hasilnya:
[root@tester squidGuard]# ls -l db/blacklists/adult/*.db
-rw-r--r-- 1 root root 44257280 Sep  5 11:32 db/blacklists/adult/domains.db
-rw-r--r-- 1 root root  3444736 Sep  5 11:32 db/blacklists/adult/urls.db


No comments:

Post a Comment

Silahkan beri komentar ya.. :-)