Home page: http://www.muquit.com/muquit/software/Count/Count2.6/Count.html
Download source: http://www.muquit.com/muquit/software/Count/Count2.6/Count2.6/download/src/wwwcount2.6.tar.gz
tar xzf wwwcount2.6.tar.gz
Edit files to define paths: configure, configure.in, Config.tmpl, Count-config
- /usr/local/etc/Counter to /opt/Counter
- /usr/local to /opt
- /usr/local/apache/cgi-bin to /home/httpd/cgi-bin (Red Hat 5.x, 6.x) or /var/www/cgi-bin (Red Hat 7.1+)
./build --all -uses database files /opt/Counter/db/Countdb but can not
distinguish between www.domain.com and domain.com.
Two separate entries in database, same page, two count totals.
./build --without-database -Requires page to reference a counter file
You must then reference df=page-file.dat in
This allows www.domain.com and domain.com to refer
to the same file and thus the same hit total.
./build --without-database --prefix=/opt/Count --with-cgi-bin-dir=/var/www/cgi-bin
Note: you must choose one or the other and can not mix database and file methods for one Count.cgi executable.
- Do you know the user and group id of httpd' child process [y|n]:? y
- Enter user id of httpd's child process [no default]:? root
- Enter group id of httpd's child process [no default]:? root
Note: Red Hat 7.1 introduced the user and group apache instead of root
for running the web server. Use apache as the answer to the above questions.
Web server has to have permission to execute cgi and write to Counter files:
chmod ugo+rx Count.cgi
chown nobody.nobody db logs data
chown nobody.nobody *
cd /opt/Counter/data - If using count files and not the database
chown nobody.nobody *
Directory paths must allow the web server write access to /etc/Count/db, logs ..
Relocate tools: mv ./src/dumpdb and editdb to /opt/bin
Add line to web page: <img src="/cgi-bin/Count.cgi alt="Count">
Set count_reload=Yes so page increments on reload.
To add access for page counter, edit file /opt/Counter/conf/count.cfg
and set: strict_mode=NoOnce
added you can change it back to Yes or leave it as Yes and use editdb
tool.List of [authorized] is the list of web server platforms allowed
This configures the binary db file /opt/Counter/db/Authdb.
The following are for build --all and not --without-database:
count_admin_help.cgi - not needed
count_admin.txt - admin created
Tools: (Does not apply to build --without-database)
and /opt/bin/editdb /opt/Count/db/Countdb or Authdb
editdb -c - show all commands.
allow you to view and edit the database.
This perl script must reference its configuration file:
The "1" specifies access to Authdb and Countdb
0 Countdb only.
Use /usr/bin/htpasswd to generate the encrypted field.
prompt>htpasswd -c xxx user1
Re-type new password:
Adding password for user user1
This will create file xxx with the encrypted data.
Note %7E ="~".
|HTML to add counter to page:
<img src="/cgi-bin/Count.cgi?ft=6&frgb=ff0000&comma=T" alt="Count">
Plus many more options.
||Frame around counter of given pixel thickness.
||Digit directory. Default is A, Options A-D
||Instructions to browser: do not cache image, expire immediately.
||frame color in hex RGB
||(T) true or (F) false for comma every third digit from the right.
||Transparent background T/F
||Make background color RGB, transparent. If black is background then
make 000000 transparent to have no background.
||Default is counter. Also clock, date, countdown, image or version
||Max digits to display. Default=6
Red numbers, transparent background:
<img src="/cgi-bin/Count.cgi?chcolor=T&trgb=000000&df=camarotech.com" alt="Count">
Samples of counter