Menu

Installation avec un marqueur



Les étapes sont les suivantes : extraction du logiciel, insertion de la balise dans vos pages web, installation de W3Perl en local et création d'un fichier de configuration.
Répertoire d'installation de W3Perl
Votre répertoire Cgi-bin

1.1 - Installation sur le serveur

Téléchargez le package W3Perl Tag. Décompressez le à la racine de votre serveur web, un répertoire /w3perl/ sera crée

1.2 - Droits

Une fois décompresser à la racine de votre serveur web, les fichiers suivants sont présents :

/w3perl/resources/Readme-tag.txt la balise à insérer dans vos pages
/w3perl/resources/tag_log.php le script php qui génére les fichiers de log
/w3perl/resources/js/w3perl_tag.js le code javascript à insérer dans vos pages
/w3perl/logs/htaccess.dist un fichier exemple htpassword pour protéger votre répertoire logs (Apache)

Le répertoire /w3perl/logs/ doit être en écriture pour le serveur. Protégez ce répertoire !!!.

1.3 - Insertion de la balise javascript

Editez chaque fichier que vous désirez monitorer et ajoutez la balise suivante juste avant la balise finale </body> :
<script type="text/javascript" src="/<w3perl_install_dir>/resources/js/w3perl_tag.js"></script>
<w3perl_install_dir> est le répertoire d'installation de w3perl, la valeur par défaut étant /w3perl/

PHP doit être actif sur votre serveur.

 A distance 

If you want to run the stats on the server, use the whole w3perl package (which include the w3perl-tag files).

1.4 - Installation on the server

  • Automatic
    If you are running an Apache server, you can use 'install.pl -a' to install the package without editing anything. The 'a' flag will install w3perl on the main server found in the apache configuration file (Apache configuration file should be readable by the script). In fact, the script is just looking for the ScriptAlias directive to find where the cgi-bin is located.

  • Manually
    Edit the install.pl script. Modify if needed the perl location in the first line. Then change $pathcgi and $pathw3perl according to your system. $pathcgi is the location where the scripts will be installed, default is /path_to_your_cgi-bin/cgi-bin/w3perl/. $pathw3perl is the directory where the package have been extracted : /path_to_your_server_root/w3perl/
    Run install.pl. If your cgi-bin is root owner, you'll have to run the script as root.

  • Windows
    Windows user can use the binary available.

1.5 - Configuration file

Use your favourite browser and go to http://localhost/w3perl/admin/ . You'll see the w3perl administration interface.
Select 'Make configuration file' and fill the different forms. Use default config filename. If you don't have a web server running, you could also fill the configuration file manually. The configuration file have to be copied (not moved !) into your /path_to_your_cgi-bin/cgi-bin/w3perl/ (because server owner can't write to /cgi-bin/ due to security restriction)

1.6 - Compute stats

Wait a day so logfile won't be empty.
You can use the 'Launch scripts' in the administration interface and click on the different scripts to launch them or use the command line to run the scripts. It's up to you. Avoid using both launch as web user and login user have different file access permission.

1.6 - Crontab

If everything is right, edit cron-w3perl.pl, choose when you want to launch the different scripts and finally add it in your crontab. When launch with the -a flag, cron-w3perl will update all stats for you.


 Locally 

Installing W3Perl locally is safer as most provider doesn't allow too much CPU to be used on their server.

1.4 - Extract locally

Download the W3Perl package. Extract it locally.

1.5 - Installation locally

  • Automatic
    If you are running an Apache server, you can use 'install.pl -a' to install the package without editing anything. The 'a' flag will install w3perl on the main server found in the apache configuration file (Apache configuration file should be readable by the script). In fact, the script is just looking for the ScriptAlias directive to find where the cgi-bin is located.

  • Manually
    Edit the install.pl script. Modify if needed the perl location in the first line. Then change $pathcgi and $pathw3perl according to your system. $pathcgi is the location where the scripts will be installed, default is /path_to_your_cgi-bin/cgi-bin/w3perl/. $pathw3perl is the directory where the package have been extracted : /path_to_your_server_root/w3perl/
    Run install.pl. If your cgi-bin is root owner, you'll have to run the script as root.

  • Windows
    Windows user can use the binary available.

1.6 - Configuration file

Use your favourite browser and go to http://localhost/w3perl/admin/ . You'll see the w3perl administration interface.
Select 'Make configuration file' and fill the different forms. Use default config filename. If you get into trouble, you could also fill the configuration file by hand. The configuration file have to be copied (not moved !) into your /path_to_your_cgi-bin/cgi-bin/w3perl/ (because server owner can't write to /cgi-bin/ due to security restriction).
Be sure to activate the option to retrieve remotely logfiles. Fill the server name, password and directories. W3Perl will download your logfiles before processing.

1.7 - Compute stats

Wait a day so logfile won't be empty.
You can use the 'Launch scripts' in the administration interface and click on the different scripts to launch them or use the command line to run the scripts. It's up to you. Avoid using both launch as web user and login user have different file access permission.

1.8 - Crontab

If everything is right, edit cron-w3perl.pl, choose when you want to launch the different scripts and finally add it in your crontab. When launch with the -a flag, cron-w3perl will update all stats for you.