Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 1, 2008 - Submit Your Web Site for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 08, 2008, 03:24:35 AM


Login with username, password and session length


Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Install Awstats on your home PC - Tutorial  (Read 40322 times)
chapterthreebegins
Newbie
*
Offline Offline

Posts: 2


« on: July 30, 2004, 08:43:41 PM »

Hello All,
(This is Kevin from LP Support, but I want to post this as a normal user first so that it is not officially associated with LP)

Below is my first attempt at a Tutorial.  This particular one is a tutorial on how to install Awstats on your home PC.

This has been tested on the following Operating Systems:
Windows XP Pro
Windows XP Home

Your feedback is welcome, but keep in mind this is a friendly guide, not a set in stone step-by-step instruction manual.

Quote
Awstats Tutorial (more like a guide)

Section 0
Please note I assume no responsibility for anything that might happen to your computer.  I do not guarantee this tutorial will work for everybody.  I created this tutorial based on exactly how I got Awstats up and running on my home machine.

There are a few things this tutorial assumes:
- ActivePerl is installed into C:\Perl (ActivePerl is available for downloading at http://www.activestate.com )
- We will be using version 6.2 of Awstats
- You are using Windows XP Pro or Home
- The install path for awstats will be assumed as: C:\awstats-6.2


Quote
Section 1 - Installing Awstats
1. Download Awstats 6.2 from http://www.awstats.org/

2. Extract directory "awstats-6.2" into C:\

3. Click Start, Run, then type "cmd" into the box and click OK.

4. In the DOS window, type "C: \", then type "cd awstats-6.2"

5. While in the awstats-6.2 directory, type "mkdir logs" (this will be used later)

6. Now type "cd wwwroot\cgi-bin" and hit Enter.  Then type "mkdir DirData" (again, will be used later)

7. Now type "cd ../../tools", then type "perl awstats_configure.pl" and hit Enter.

8. This is going to bring up the Awstats configure script.  First prompt should be asking you for the path to Apache.  You don't need Apache to run Awstats, so just type "none" at the prompt and hit enter.

9. The next prompt will be asking you to create a new config file, type "y" then hit Enter.

10. Should be prompting you for your domain name now, go ahead and type it in including "www" and hit enter.  (Example: www.mysite.com)

11. You will see a message that your config file has been created, then it will tell you that it can't add an auto-scheduler.  This is ok as it's not required, so simply hit Enter to continue.

12. The last thing you'll see is just some info about how to run Awstats.  I'll go over that in detail so just hit Enter to finish.


Quote
Section 2 - Configuring Awstats
1. Now the easiest thing to do is go back into Windows, click Start, Run, and type "wordpad" into the box and click "OK"

2. Inside wordpad click on File, then Open.  In the Open dialog box, click on the arrow next to "Rich Text Format" and select "All Documents".  Now find the directory where you installed Awstats, then go into the "wwwroot" folder, then go into the "cgi-bin" folder.  You should see a few files.  The one we want is called "awstats.www.yourdomain.com.conf" (insert your domain).  Double click on that file to open it.

3. We will be editing the config file for Awstats to suit our needs.  Scroll down a little until you see the following line:
LogFile="/var/log/httpd/mylog.log"
change that line to the following:
LogFile="C:\awstats-6.2\logs\yourname.log"
(where "yourname" is whatever you want your log file name to be)

4. Scroll down until you see "HostAliases=" and make sure all your possible site names are there.

5. Now find DirData="." and change it to DirData="C:\awstats-6.2\wwwroot\cgi-bin\DirData"

6. Just a little further down is DirIcons="/icon" which needs to be changed to DirIcons="../icon"

7. Next up (a little ways down the file) is DefaultFile="index.html", just change this to whatever your index page name is.  Check out the examples just above this line if you're not sure.

8. Now click on File and Save at the top.  We are done with the basic configuration to get Awstats up and running.  You are welcome to go back through this file in detail and read what each option does.  There are some other useful settings in the config file, but those will not be covered here.


Quote
Section 3 - Downloading Log Files
1. Note: We are going to download the initial log file.  This is how I do it, there are multiple ways to get a hold of this file.

2. Open up cPanel, then click on "Raw Log Manager", then what you might want to do if it's not already checked is check the first box, "Archive Logs in your..." and click "Save"

3. Now under "Archived Raw Logs" click on the file with the domain you are running stats for and the current month.  This should start a download.  Open the file (I use WinRAR), and you will notice a file with your domain name.  This is your archived raw access log.

4. Extract the file to C:\awstats-6.2\logs, then navigate to that directory using Windows Explorer.  You should see a file in that directory with your domain name.  Rename the file to whatever you chose in Section 2 Step 3 (yourname.log).  Windows will prompt you saying are you sure you wanna change the filetype, click "Yes".


Quote
Section 4 - Fiiiinally Running Awstats
1. Now we are finally ready to run Awstats and generate some stats.  If everything was done correctly you shouldn't have any problems with the following steps.

2. Go back to the DOS window (Start, Run, "cmd" if you closed it) and type the following and hit Enter when done:
cd c:\awstats-6.2\wwwroot\cgi-bin

3. Now type the following and hit enter (replace your domain):
perl awstats.pl -config=www.yourdomain.com -update

4. This might take a while, and I do mean a long while.  To check to make sure if something is actually happening, check out your hard drive activity light on your computer.  If it is going nuts then Awstats is crunching away.  As it is processing you will see some status lines being updated on the screen.  You will know it's done when you get returned to the command prompt.

5. Once you are back at the command prompt, type the following and hit enter (again, replace your domain):
perl awstats.pl -config=www.yourdomain.com -update -output > stats.html

6. This might take a while too, as Awstats is creating the html page so that you can view your stats.  Once you get back to the command prompt, go to Windows Explorer, nagivate to:
C:\awstats-6.2\wwwroot\cgi-bin
and there should be a file in there called "stats.html"
Double click on that bad boy and hopefully you should be staring at your oh-so-wonderful stats.

7. If at this point you are not seeing your stats, something is wrong.
Read the documentation on http://awstats.sourceforge.net/docs/index.html


I hope this proves useful to somebody out there.  I was looking for a document exactly like this when I was trying to install Awstats, but couldn't find one, so I made one Smile

Thanks,
-Kevin
Logged
Loren
Galactic Royalty
*****
Offline Offline

Posts: 321



« Reply #1 on: July 30, 2004, 09:43:52 PM »

Kevin,

Very nice seems very very easy to follow.  I just don't have a current use for it if you know what I mean Smile

Great usage of words with this tutorial type of document.  Thumbs Up
Logged

Visit my site: http://www.fragacow.com
Visit my Forums: http://www.fragacow.com/forum/

Don't forget the tutorials: http://www.lunarpages.com/tutorials
Neco
Jabba the Hutt
*****
Offline Offline

Posts: 647


WWW
« Reply #2 on: July 30, 2004, 11:39:34 PM »

Dude...

That's awesome.
Logged

DaF
Trekkie
**
Offline Offline

Posts: 10



WWW
« Reply #3 on: July 31, 2004, 02:16:56 AM »

Thank you very much, Kevin! It was very easy to setup AWStats according to your detailed steps. Applause

I'd like to have AWStats run through an automated batch. This means that I'd have to download the stats files and have them unpacked from .gz files.

Could you or anyone else help me setting this up?

Btw. Do the logs count against the 800 MB webspace?
Logged

Regards
Daniel
Ed
Berserker Poster
*****
Offline Offline

Posts: 5205



WWW
« Reply #4 on: July 31, 2004, 07:51:50 AM »

Good Job Kevin! Very Happy

Going to move this to the How-to section and make it official.
Logged

Timo
Trekkie
**
Offline Offline

Posts: 13


WWW
« Reply #5 on: August 12, 2004, 10:37:29 AM »

Thank you very much for detailed instructions!

After a succesful installation today, I would like to add following info for others who may need it:
- ActivePerl is available for downloading at www.activestate.com
- Kevin's instructions are valid for Windows XP Home Edition as well.

I got the output file "stats.html" without any problems but its "Full list"-links do not work. Can anyone advise, how to get them working?

Fortunately, I noted that the same results can be obtained by modifying the command in Kevin's Section 4, paragraph 5, as follows: For example, if you want to see the full list of your pages, replace the parameter "-output" with "-output=urldetail". You should also replace the file name "stats.html" with something else - otherwise the original will be overwritten. Following parameters, collected from the source code of "stats.html", give the "Full list" of  
- Visitor domains/countries: -output=alldomains
- Hosts: -output=allhosts
- Robots/Spiders visitors: -output=allrobots
- Pages-URL: -output=urldetail
- Operating Systems: -output=osdetail
- Browsers: -output=browserdetail
- Links from an Internet Search Engine: -output=refererse
- Links from an external page: -output=refererpages
- Search Keyphrases: -output=keyphrases
- Search Keywords: -output=keywords

I hope this helps others who may have the same problem.

Best regards,
Timo
Logged
Kevin
Spacescooter Operator
*****
Offline Offline

Posts: 43



« Reply #6 on: August 12, 2004, 10:53:10 AM »

Thanks Timo,
I have updated the tutorial with the ActivePerl link and the XP Home thing.

Yeah, I couldn't get the links to work either, I tried many different things to no avail.

If somebody gets them working by all means post here and I'll update the tutorial.

Thanks,
-Kevin
LP Staffer
Logged

decipher
Newbie
*
Offline Offline

Posts: 2


WWW
« Reply #7 on: August 16, 2004, 08:15:12 PM »

Great instructions. I think the "list all" link problem has something to do with awstats not being installed in a localhost or a virtual server directory. I'll try and change some of the options of the configuration file to see if this is the case.

edit: OK, getting closer here... http://awstats.sourceforge.net/docs/awstats_faq.html#CGISOURCE
Logged

skylerj
Trekkie
**
Offline Offline

Posts: 15


« Reply #8 on: September 03, 2004, 06:16:32 AM »

Seems like a very good tutorial, and it was going smothly until cmd prompt told me
Quote
'perl' is not recognized as an internal or external command,
operable program or batch file.

So obviously something is wrong with my perl install, though I don't know what. I downloaded ActivePerl-5.8.4.810, ran "installer.bat," and installed perl into c:/
If anyone can help me out with this, I'd appreciate it.
Logged
gadgetfan
Intergalactic Cowboy
*****
Offline Offline

Posts: 52


« Reply #9 on: September 03, 2004, 06:23:26 AM »

Quote from: decipher
Great instructions. I think the "list all" link problem has something to do with awstats not being installed in a localhost or a virtual server directory. I'll try and change some of the options of the configuration file to see if this is the case.

edit: OK, getting closer here... http://awstats.sourceforge.net/docs/awstats_faq.html#CGISOURCE

You can get all of the "list all" links to work if you use awstats to generate static pages.  See http://awstats.sourceforge.net/docs/awstats_tools.html for more information.  I've been using it for a few weeks now and it works fine.  The only major downside is that I don't believe you can use the frames interface, so you can't easily switch between months.  But you can build your own frameset for that Smile
Logged
slowplaying.com
Newbie
*
Offline Offline

Posts: 5


« Reply #10 on: September 14, 2004, 07:53:36 PM »

Skylerj:

Try resetting your computer, it worked for me, I figure if it was asking to run perl.exe or perl.bat or whatever it is, from a differe (c:\awstats) directory, it must be loading c:\perl commands into memory etc. on startup... that seemed to work... try that out? Or maybe you already figured it out..

GL

-Sol
Logged
manse
Spacescooter Operator
*****
Offline Offline

Posts: 49


« Reply #11 on: October 16, 2004, 08:53:56 AM »

Hi,

I'm trying to install awstats but I'm afraid I'm failing at the first hurdle  Embarassed

I can select "awstats-6.2.tgz" to download from the www.awstats.org site but don't know what to do with this file. If I double click it I get the message "Windows cannot open this file".

Can anyone help me download awstats-6.2 please?

Thanks.
Logged

Ed
Berserker Poster
*****
Offline Offline

Posts: 5205



WWW
« Reply #12 on: October 16, 2004, 12:19:14 PM »

Right click and select "Save target as" then save it Smile
Logged

NobodyHome
Space Explorer
***
Offline Offline

Posts: 7


« Reply #13 on: October 29, 2004, 08:43:49 PM »

I tried doing this with awstats 6.1, and there was no directory found wwwroot\cgi-bin  The version you're quoting to install is a beta version does that mean 6.1 does NOT have this directory?
Logged
manse
Spacescooter Operator
*****
Offline Offline

Posts: 49


« Reply #14 on: November 01, 2004, 01:09:40 PM »

Can anyone help me  Confused

I have followed Kevin's fine instructions until section 4.3

When I type the command to run the update, I get the message 'Couldn't open the server log file - no such file or directory' although I am staring at it right there in the c:\awstats-6.2\logs folder. And it has the same name as that specified in the config script.

The only thing I noticed which was slightly different from the instructions was that when I re-named the log file to contain the .log suffix, I was given no Windows message asking if I wanted to do this.

Any advice? Thanks.
Logged

Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM