Installing awstats

apps

#1

Ok, I’ve been following the instructions in the wiki on installing awstats and have a few questions that hopefully someone here can help me with. I haven’t used cron jobs or shell access before.

  1. step 11 says to type in a perl command:
    Enter this command:
    perl /home/yourusername/awstats/tools/awstats_buildstaticpages.pl -config=example.com
    -update -awstatsprog=/home/yourusername/awstats/awstats.pl -dir=/home/yourusername/example.com/statistics/

Where do I enter this? In a file? I downloaded Putty for shell access and used it to connect and tried entering it there, but it said “Error: couldn’t open config file “awstats.mysite.com.conf” nor “awstats.conf” etc…”

So then I tried to skip ahead and do the cron job. I entered crontab -e and it brought up a screen (pico) and I typed in the line from the wiki (changing the data as needed for my domain/account) and when I tried to exit and save it it said:
no crontab for username - using an empty one
no modification made

I know I’m probably missing something simple, but I’ve been looking through the knowledge base and the forums and haven’t quite figured it out yet. Help? Thanks!


#2

bump I’m assuming this is fairly simple, as others have been able to do it with no problem. I am just a bit lost and the DH provided stats have been giving me a headache, so I’d rather get this installed.

Help!?


#3

you’re right, you have to enter that at the a telnet/ssh commnd prompt. The thing is that you have to update the command to reflect you’re own user and install.

perl /home/yourusername/awstats/tools/awstats_buildstaticpages.pl -config=example.com
-update -awstatsprog=/home/yourusername/awstats/awstats.pl -dir=/home/yourusername/example.com/statistics/

I bolded the parts you need to change. Just plug in your info. The yourusername part will be the user you’re logging into ssh with, and the example.com is your domain.

-Matttail


#4

Yeah, I had changed my data in there, I just entered it here generically. Turns out the problem was I was an idiot and when I had uploaded the awstats.mydomain.conf I didn’t remove the .txt at the end, so it couldn’t find it. facepalms

So I got that and the crontab running (set it to 1pm so I could see if it was working). It said you could set it up to run twice a day too, so how would I do it if I wanted it to run at say 11am and 11pm (I understand the ‘0 11 * * *’ side of it). Do I set them up as separate crontabs or do I just write a second line below the first one?

Also, is the crontab time PST because of DreamHost being in California?

Thanks for your help!


#5

Well, kind of answered my own questions there. I ran it once and figured out the time difference.

And hopefully just adding a second line with the additional time info will be sufficient to get it run twice a day.

Now I’m off to try to add a second domain. :slight_smile:

Would it be best to have the additional domains crontabs run at different times?


#6

you don’t need to make another line for this…
instead of doing
0 11 * * *
use
0 11,22 * * *

that tells it to run at the 11th, and 22nd hour of the day

cheers,
Pete