Configuring Apt-Cacher
Apt-Cacher will allow you to centrally cache any updates or installed packages on a central machine and help you save bandwidth. No matter if you have two Ubuntu machines or twenty; as far as your bandwidth is concerned your ISP will only think you have one! Below are steps for setting up Apt-Cacher
sudo apt-get install apt-cacher apache2
You also need to configure Apt-Cacher to “go live” so you’ll need to change one more option in another file.
sudo nano /etc/default/apt-cacher
AUTOSTART=0 to AUTOSTART=1
Server configuration
Edit /etc/apt-cacher/apt-cacher.conf if you want to change any options
Storage location
cache_dir=/var/cache/apt-cacher
Administrator contact details
admin_email=root@localhost
default listen port
daemon_port=3142
enable automatic report generating
generate_reports=1
logdir=/var/log/apt-cacher
network segment allowed
allowed_hosts=192.168.0.0/24 (to allow all local machines)
Import any existing apt-get cache:
sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives
Client Configuration Options
Use as a proxy to APT
APT-Catcher utilization Analyzer (Webalizer)
apt-get install webalizer
To configure the software you must look at the global file /etc/webalizer.conf.
Configure the /etc/webalizer.conf file.
Configure the /etc/webalizer.conf file.
LogType cif change to ftp
LogFile /var/log/apt-cacher/access.log
The option LogFile specifies the logfile to use with Webalizer. The default log file is supposed to be the access_log of Apache Web Server, but you can specifies a different one, like the one Squid Proxy Server makes named access.log if you use it in httpd-accelerator mode.
LogFile /var/log/apache2/access.log.1 change to
LogFile /var/log/apache2/access.log.1 change to
LogFile /var/log/squid3/access.log
OutputDir /home/www/webalizer
The option OutputDir specifies the location of the output directory to use for the reports of Webalizer. All present and future report files generated by the Webalizer program will be hosted in this directory. It is recommended that you create this directory where your Apache web site resides.
Incremental yes
The option Incremental if set to Yes tells the program only to process partial logs file, and allows you to rotate your log files as much as you want without the loss of access information. It's recommended to set this option to Yes.
Un comment the following entry
#HistoryName webalizer.hist
IncrementalName webalizer.current
HostName APTCACHER
Quiet no
TimeMe yes
VisitTimeout 1800
CountryGraph yes
DailyGraph yes
DailyStats yes
GraphLegend yes
GraphLines 2
TopSites 30
TopKSites 10
TopURLs 30
TopKURLs 10
TopReferrers 30
TopAgents 15
TopCountries 30
TopEntry 10
TopExit 10
TopSearch 20
TopUsers 20
After configuring all the required options .Now you need to restart the Apache2 server using
/etc/init.d/apache2 restart
/etc/init.d/apache2 restart
Running Webalizer manually first time
Webalizer –c /etc/webalizer/webalizer.conf
Go to web browser type
http://localhost/webalizer