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.1 [how-to]

Discussion in 'General Discussion' started by JackDcrack, Jun 9, 2004.

  1. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Upgrade AwStats to 6.1 [how-to]
    For those of use who cant wait for the next release of Cpanel with AwStats version 6.1...

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

    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


    THATS IT!
    additionally you can:
    chattr +i awstats.pl
    chattr +i lib/*
    chattr +i plugins/*
    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:
    6
    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.1 awstats.pl)

    (
    around line 1065FIND:
    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");
            }


    (
    around line 1424)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%$] %DOMAINS% 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, Jun 9, 2004
    Last edited: Aug 16, 2004
  3. jzollo66

    jzollo66 Registered

    Joined:
    Jun 12, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Can the same method be used to upgrade to 6.2 ?
     
  4. JackDcrack

    JackDcrack Well-Known Member

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

    Version 6.2 is not stable. It is still being developed, so it is not recommended that you use it on your server. I will only make these quick installs for stable releases.

    --jack
     
  5. Rooter

    Rooter Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    146
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    Root Administrator
    Is this supposed to happen?

    "./upgrade_awstats-6.1.sh: line 34: [: awstats.pl: binary operator expected"

    It still appears to work and finish the job, but just wondering if you knew about that.
     
  6. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    i got that too.
     
  7. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    upgrade seems to have worked perfectly fine for me....

    thanks...
     
  8. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Oops!

    Sorry about that. Its a typo in the output. It does not affect the functions of the script. The error will have no effect on your install/upgrade.

    Thanks!
     
  9. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    If we don't do this:

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

    So that CPanel upgrades wont write over it.

    What happens when a cpanel upgrade is done? Does it just not update awstats? Or, does it install the old version? What would be the best thing to do here?

    Thanks
    Kirk
     
  10. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    if you chattr +i those files... then i'm assuming you're now responsible for updating awstats forever until you reverse that.

    So just for laughs sake... how do you reverse that, so lets say, in the future you wanted cpanel to start upgrading it on its own again...??

    thanks
     
  11. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  12. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Until the Cpanel software is also upgraded, it will overwrite this version with an older one. I would highly suggest doing the chattr here. It is easy enough to reverse it at any time.

    You could simply reverse it. By using the same code, but with "-i"

    chattr -i awstats.pl
    chattr -i lib/*
    chattr -i plugins/*
    chattr -i /usr/local/cpanel/etc/awstats.conf
     
  13. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    Thanks for your help! I just wanted to be sure I wasn't going to break cpanel. :)

    Kirk
     
  14. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for posting this how to!!
     
  15. zentz

    zentz Registered

    Joined:
    Sep 28, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    so anyone knows when will the next release of Cpanel with AwStats version 6.1 be ready ?
     
  16. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for this interesting topic indeed!

    I am getting this message when updating awstats from within cPanel:

    Thanks for any help
     
  17. JackDcrack

    JackDcrack Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Try running:
    /scripts/runlogsnow

    From your command prompt. Wait for it to completely finish.

    Running the "runlogsnow" script will create/fix your users tmp/log files
    Then try from the web again.
     
  18. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, it's fixed now! :)
     
  19. albatroz

    albatroz Well-Known Member

    Joined:
    Mar 6, 2003
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Virtual Orbis / Peru
    cPanel Access Level:
    Root Administrator
    chattr error

    Whenever I run this and every chattr command
    # chattr +i plugins/*
    I get this error

    chattr: Inappropriate ioctl for device while reading flags on plugins/userinfo.pm
     
  20. JackDcrack

    JackDcrack Well-Known Member

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

    This is not a problem with awstats or the isntall script I have made, but with your "chattr" or Linuix Install.
    ie, the filesystem doesn't support extended attributes

    I would suggest starting a new thread asking this question and including what version of Linux/Cpanel you are using.


    Also you might find something here:
    http://groups.google.com/groups?q="chattr: Inappropriate ioctl"&hl=en&lr=&sa=N&tab=ig
    --Cheers
     
    #20 JackDcrack, Oct 9, 2004
    Last edited: Oct 9, 2004
Loading...

Share This Page