If you need to install w3perl for each of your virtual hosts, you only
need to install the package once (easier for upgrade !).
You'll need to make first a master installation on one server and then use
the installation described here for others.
* Master installation
The first step is to install a master installation of w3perl.
If you are using an Apache server, just use 'install.pl -a'. If it fails,
edit $pathcgi and $pathw3perl and run it. See specific documentation if you need more help.
* Virtual host installation
Your virtual host doesn't need to have a cgi directory to be able to install
w3perl.
- As a webmaster
- All virtual host : install.pl -e
If you want to install w3perl on each virtual hosts, use the '-e' flag.
The script will read the Apache server configuration file and will install
w3perl for each virtual hosts found in this file.
- One virtual host : install.pl -b
Edit $virtual_web (virtual web directory) , $virtual_web_log (virtual logfile directory), $virtual_www (virtual web name). Then run 'install -b'
- As a client
Make a symbolic link to the w3perl install.pl script (either in the cgi virtual web directory or in your main directory if you don't have cgi).
(cd /<vhosts>/cgi-bin/ ; ln -s /<master_install>/cgi-bin/w3perl/install.pl
install.pl).
By running the
script with the -u flag, the current directory will be read from the script
and will find the right parameters from the Apache configuration server.
If the script fail to find your Apache configuration file, you could load
it from command line via the -j flag.
* Virtual host stats
- As a webmaster
To run the stats for your virtual hosts, just select the right configuration
file and run cron-w3perl.pl -a -c <virtual_host_config>
- As a client
You need first to activate the w3perl installation with the 'install.pl -u'
script. Once done, a new script is created in your directory : cron-w3perl.pl
You just need to run this script with the '-a' flag. So two steps are
required :
- install.pl -u
- cron-w3perl.pl -a
* Virtual host crontab
Once the stats completed, you can choose to add the cron-w3perl.pl script
in your crontab. You need to call the 'crontab -e' command from telnet.
A text window will appears, then enter your crontab entry for cron-w3perl.pl
(something like 01 00 * * * * /<your_path>/cron-w3perl.pl -e). Then
check with 'crontab -l' your entry is valid.
The '-e' flag will run all scripts in a incremental way (saving CPU),
01 00 means the scripts will be launch at 00 h 01 the night. You need to
run this script only ONCE a day with this flag.
If you want to get more stats update (every hour), don't use the '-e' flag.
Use 'cron-w3perl.pl -b' to see actual time launch and edit the script if
you need changes. Default should be ok for most people. Then add
cron-w3perl.pl to your crontab without the '-e' flag.
Client (virtual host) don't need to specify a configuration file to launch
their own cron-w3perl.pl script but webmaster should specify which one
they want to run via the '-c' flag (if no flag, default is config.pl)