Install Awstat

De Slacam_Wiki
Revisão de 13h45min de 14 de outubro de 2009 por Machado (discussão | contribs) (Criou página com '= Instalação do AWStat =    Fonte: <span class="Apple-style-span" style="font-family: 'Microsoft Sans Serif', Arial, Helvetica, Verdana; font-size: 11px; line-h…')
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)

Instalação do AWStat

   Fonte: http://awstats.sourceforge.net/docs/awstats_setup.html

Installing awstats is little complex in centOS whereas ive installed awstats easily in my FC9 following this instruction but failed to do the same in centOS. So here is the whole process to follow and setup awstats in centOS 
Step 1: Download the awstats rpm (awstats-6.6-1.el5.rf.noarch.rpm) from here and place it in your server
<div
Step 2: Login to the server with SSH and run awstats from command prompt. To run awstats, go to that directory where you have placed the awstats rpm and type
rpm -ivh awstats-6.6-1.el5.rf.noarch.rpm

<div

Step 3: Now go to the /etc/awstats/ directory and copy the file named awstats.localhost.localdomain.conf and paste it in the same directory with different name. The file name should be awstats.your_domain_name.conf. (lets consider mine one is awstats.abc.conf). In order to do this, go to that specific directory and type
cp awstats.localhost.localdomain.conf /etc/awstats/awstats.Your_domain_name.conf

<div

Step 4: Now Open that file and find the word SiteDomain=Localhost.Localdomain in that file and replace the domain name with your domain name. suppose it was abc
SiteDomain = "abc"
Save that file when you are done and go back to command prompt.

<div

Step 5: Now go to /var/www/awstats/ directory and create 2 file named
awstats062008.abc.txt (I.e: modify with current date) &
awstats062008.abc.bak (I.e: modify with current date)

<div

Step 6: After that, run the following command which will create a html file.
perl awstats.pl -config=Your_domain_name -output -staticlinks > awstats.Your_domain_name.html
and finally run the following command in the command prompt.
perl awstats.pl -config=your_domain_name -update

<div

Step 7: Now open a browser and in the URL and type
http://your_server_ip/awstats/awstats.pl?config=your_domain_name

<div

Step 8: If page is not populating with proper records which indicates that your access_log is not populating properly. So open vhosts.conf file which is located in the /etc/httpd/conf.d/ direcotry and comment out 2 lines about access_log and error_log of that specific domain. Save and close that file and follow step6 again. Hope, everything will work properly now.
Thats all.