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 to AWstats 6.3

Discussion in 'General Discussion' started by Shane_F, Feb 8, 2005.

  1. Shane_F

    Shane_F Member

    Joined:
    Jan 21, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    These are the steps I know:

    1) Download AWstats 6.3 STABLE from here: http://prdownloads.sourceforge.net/awstats/awstats-6.3.tgz onto your hard drive
    2) Binnary Upload the files:
    to /usr/local/cpanel/3rdparty/bin
    NOTE: MAKE SURE IF YOU UPGRADED TO SOMETHING ELSE THAT YOU chatter -i all those files ont he server, even the directory, or the files will not overwrite)
    3) Login in SSH and do:
    4) Around line... 1100 in the sub Read_Config function

    Replace:

    with:

    Then look for:

    and add a # next to warning.
    Save the file.

    5) Chattr TIME

    chattr +i awstats.pl
    chattr +i lib/*
    chattr +i plugins/*
    chattr +i lang/*

    6) Run the update logs command.

    I'll try to create a patch file, so it's easier. :)
     
  2. jupiter

    jupiter Member

    Joined:
    Oct 1, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Shane Im at a loss... I tried your instructions but it didn't seem to update anyones stats on the box to 6.3
    Im missing something here and Im afraid to totally eff up anything on the box..

    If your available for an install job let me know how much and I will paypal you to get the job done for me...

    You can message me on yahoo messenger at
    user:
    bh1warehouse

    or post me your contact address so we can connect.

    Thanks
    Dan
     
  3. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    For me work OK, thanx :]
     
  4. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    Upgrade to AWStats 6.4. Automatic script!

    Would like to share our simple file to upgrade AWStats to version 6.4 (latest STABLE).
    It is simple and works like a charm for us.

    AWStats 6.4 is protected from all known vulnerabilities and has no problems with cPanel.

    Code:
    #!/bin/bash
    
    VER='6.4';
    echo "Installing AWStats version $VER to /usr/local/cpanel/3rdparty/bin directory. cPanel patch will be applied.";
    
    download() {
    cd /root
    rm -rf awstats-* ; 
    echo "Getting the package...";
    wget -N --timeout=10 --tries=1 http://switch.dl.sourceforge.net/sourceforge/awstats/awstats-$VER.tgz > /dev/null 2>&1 ; 
    }
    
    install() {
    echo "Unpacking...";
    tar zxf awstats-$VER.tgz ;
    cd awstats-$VER;
    chown -R root.root *;
    echo "Chattr'ing and removing target AWStats files...";
    chattr -i /usr/local/cpanel/3rdparty/bin/awstats.pl;
    chattr -i -R /usr/local/cpanel/3rdparty/bin/plugins;
    chattr -i -R /usr/local/cpanel/3rdparty/bin/lib;
    chattr -i -R /usr/local/cpanel/3rdparty/bin/lang;
    rm -f /usr/local/cpanel/3rdparty/bin/awstats.pl;
    rm -rf /usr/local/cpanel/3rdparty/bin/plugins;
    rm -rf /usr/local/cpanel/3rdparty/bin/lib;
    rm -rf /usr/local/cpanel/3rdparty/bin/lang;
    echo "Copying new files...";
    cd wwwroot/cgi-bin;
    chmod -R g-w,o-w *;
    cp -p awstats.pl /usr/local/cpanel/3rdparty/bin/awstats.pl;
    cp -pr plugins /usr/local/cpanel/3rdparty/bin/plugins;
    cp -pr lib /usr/local/cpanel/3rdparty/bin/lib;
    cp -pr lang /usr/local/cpanel/3rdparty/bin/lang;
    echo "Applying cPanel patch...";
    patch -N -i /usr/local/cpanel/3rdparty/bin/awstats.diff /usr/local/cpanel/3rdparty/bin/awstats.pl;
    echo "Chattr'ing files...";
    chattr -i /usr/local/cpanel/3rdparty/bin/awstats.pl;
    chattr -i /usr/local/cpanel/3rdparty/bin/plugins/*;
    chattr -i /usr/local/cpanel/3rdparty/bin/lib/*;
    chattr -i /usr/local/cpanel/3rdparty/bin/lang/*;
    
    cd /root;
    rm -rf awstats-* ;
    
    echo "Done!";
    }
    
    download
    install
     
  5. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    Thx, for sharing...

    Updated mine, but with a few errors...

    None of the chattr commands worked, this was the error:

    chattr: Inappropriate ioctl for device while reading ...................

    Everything seems to be working fine though...
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    chattr won't work if you're not running on ext2/3, i.e. most VPS solutions that use their own filesystem. It's always a bad idea using chattr anyway on files that cPanel is likely to update as you could easily break a cPanel update which could affect the whole server.
     
  7. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    :confused:
    Should I be worried?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, since you weren't able to use chattr anyway. Just be aware that when yo next update cPanel it will likely reinstall whatever version comes with the release it upgrades to.
     
  9. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    To ALL:

    If you will check the script you will see that we are using fool-proof chattr -i set.
    E.g. we do not set immutable flag on cPanel files!

    So, everyone concerned may relax :)

    P.S. If anyone would like to have AWStats upgraded no matter if cPanel replace it or not, create script /scripts/postupcp and insert there call to our script. This will keep you updated even if cPanel replace AWStats :)

    P.P.S. Perfomance notice - if you are going to use postupcp, remove download routine (just remove word download from the bottom of the script), replace string rm -rf awstats-* ; to rm -rf awstats-$VER ; and place file called awstats-6.4.tgz into /root folder. It will speed up things, safe the traffic and cpu usage. Maniacs may keep archive unpacked and just copy the files over cPanel ones :D :
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Ah! so you are, thank you for pointing that out :eek:
     
Loading...

Share This Page