The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upgrade AwStats to 6.0 [how-to]

Discussion in 'General Discussion' started by JackDcrack, Jan 26, 2004.

  1. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    For those of use who cant wait for the next release of Cpanel with AwStats version 6.0...

    Make sure you are logged in as root (su -)

    cd /usr/local/cpanel/3rdparty/bin
    wget http://jdcdesigns.com/stats/awstats-6.0.tar.gz
    tar -xzvf awstats-6.0.tar.gz
    ./upgrade_awstats-6.0.sh
    /scripts/runlogsnow

    THATS IT!
    additionally you can:
    chattr +i awstats.pl
    chattr +i lib/*
    chattr +i /usr/local/cpanel/etc/awstats.conf

    So that CPanel upgrades wont write over it.
     
  2. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    For those of you that want to do it by hand, here are the instructions:

    First get the new awstats files :
    and untar into /usr/local/cpanel/3rdparty/bin

    PHP:
    All files listed in these instructions are located in:
    /
    usr/local/cpanel/3rdparty/bin

    BACKUP THE FOLLOWING FILES
    :
    awstats.pl
    all files in 
    /lib

    vi 
    or pico awstats.pl (the new 6.0 awstats.pl)

    FIND:
    sub Read_Config

    FIND
    :
    if (
    $configdir) { @PossibleConfigDir=("$configdir"); }
        else { @
    PossibleConfigDir=("$DIR","/etc/awstats","/etc/opt/awstats","/etc","/usr/local/etc/awstats"); }

    REPLACE WITH:
    if (
    $configdir) { @PossibleConfigDir=("$configdir"); }
        else { 
            
    my $homedir = (getpwuid($>))[7];
            
    my $awdir "$homedir"/tmp/awstats/";
            @
    PossibleConfigDir=("$DIR",$awdir,"/etc/opt/awstats","/etc/awstats","/etc","/usr/local/etc/awstats");
            }


    FIND:
    warning("Warning: Can't find language files for \"$_[0]\". English will be used.");

    REPLACE WITH:
    #warning("Warning: Can't find language files for \"$_[0]\". English will be used.");
    edit awstats.model.conf, set to the following variables
    (after editing move to /usr/local/cpanel/etc/awstats.conf
    PHP:
    LogFile="%LOGFILE%"
    SiteDomain="%DOMAIN%"
    HostAliases="%DOMAIN% REGEX[^.*\.%DOMAIN%$] localhost 127.0.0.1"
    DNSLookup=%DNSLOOKUP%
    DirData="%AWSTATSDIR%"
    DirCgi="/tmp/awstats"
    DirIcons="/images/awstats"
    AllowToUpdateStatsFromBrowser=%BROWSERUPDATE%
    DNSStaticCacheFile="dnscache.%DOMAIN%.txt"
    DNSLastUpdateCacheFile="dnscachelastupdate.%DOMAIN%.txt"
     
    #2 JackDcrack, Jan 26, 2004
    Last edited: Jan 26, 2004
  3. linuxman

    linuxman Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    156
    I receive the followign error message when trying to run stats now.

    Warning: Can't find language files for "en". English will be used.

    Error: Can't open plugin file "hostinfo.pm" for read. Check if file is in "./plugins" directory and is readable.

    Setup ('/home/decaturg/tmp/awstats/awstats.domainname.com.conf' file, web server or permissions) may be wrong.
    See AWStats documentation in 'docs' directory for informations on how to setup awstats.
     
  4. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    I apologize for that.
    I forgot to comment our all of the plugins in awstats.conf.

    To fix this easily, simply redo the awstats 6.0 [how-to] steps.
    OR
    You can edit the awstats.conf file manually:
    /usr/local/cpanel/etc/awstats.conf
    Go to the PLUGINS SECTION
    and comment out any LoadPlugin=...

    I highly suggest using the first method, to avoid any mistakes.
     
  5. linuxman

    linuxman Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    156
    JackDcrack, thanks, I had already done the first one, and came back here to post and noticed yours, but this will help the others. I just performed your script on another box and all worked well, thanks again for contributing.
     
  6. Slav

    Slav Well-Known Member

    Joined:
    Oct 28, 2002
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    166
    Thanks for this. This is great. Works perfect.
     
  7. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    United Kingdom
    I noticed in the latest EDGE build they've added awstats 6.0
     
    #7 projectandrew, Jan 30, 2004
    Last edited: May 20, 2004
  8. linuxman

    linuxman Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    156
    It wouldn't surprise me after JackDcrack supplied the code.
     
  9. bouncer

    bouncer Member

    Joined:
    Nov 1, 2002
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    151
    :) Hi Jack,
    Am I correct in assuming that if we wanted to upgrade to awstats 6.1 that all we would need to do is alter the 6.0 to 6.1, like so:

    type the following in your command prompt:
    cd /usr/local/cpanel/3rdparty/bin
    wget http://jdcdesigns.com/stats/awstats-6.1.tar.gz
    tar -xzvf awstats-6.1.tar.gz
    ./upgrade_awstats-6.1.sh
    /scripts/runlogsnow
     
  10. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    You are incorrect.
    I have not created any updates for 6.1
     
  11. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    498
    Likes Received:
    4
    Trophy Points:
    168
  12. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156

    Development version is 6.2 - 2004-06-07 13:52
    This may be a not stable version. It is there for download for test purpose ONLY!.


    Last stable version is 6.1 - 2004-05-15 09:57
    Your Perl version must be at least 5.00503 (or higher) to use AWStats 6.0 or higher. See ChangeLog to know what's new and for information on compatibility with previous versions.
    See Features for current features.

    I will look into getting an update for 6.1
    I will post it in a new thread once its complete.

    Thanks!
    --Jack
     
  13. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    498
    Likes Received:
    4
    Trophy Points:
    168
    great.

    By the way, have you gotten a good mail.conf to work to use this for mail stats?
     
  14. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Albert,

    i'll look into it.

    --jack
     
  15. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
Loading...

Share This Page