Help - Search - Members - Calendar
Full Version: Install and Automate Urchin 5 on Ensim Webppliance (all versions)
The Planet Forums > Control Panels > Urchin
Pages: 1, 2
foggy
This howto is based on projectandrews now defunct unofficialsupport.com website.


Quick and dirty way of Installing Urchin 5 on Ensim Webppliance (Any version)

(Please note, this howto does not contain instructions on setting up UTM tracking.
I don't like UTM, it seems to break too much so i never used it.)

Login to SSH as root "su -"

#Make a download directory and cd into it

mkdir urchin
cd urchin

#Download and extract the Urchin setup file (for redhat 7.2/7.3)

wget http://www.urchin.com/download/urchin5/dow...500_redhat72.sh
sh urchin5500_redhat72.sh

#Installing Urchin

./install.sh
Select 1 for english language
Select 1 if this is a new install (select 2 for upgrade)
Accept the default location of /usr/local/urchin (just press enter)
Select 1 to create the directory
Choose port number, I use 8080
leave user as 'nobody' (just press enter)
leave group as 'nobody' (just press enter)
Select 2 to not start urchin
Select 1 to continue the install

#Remove the download folder

cd /root; rm -fr urchin

#Allow the port 8080 in your firewall

If you have a firewall now is the time to allow port 8080.
If you use apf then:

pico -w /etc/apf/conf.apf (add port 8080)

#Save the file

ctrl x then y

#Restart the firewall

service apf restart

#Setting up the Logformat

pico -w /etc/httpd/conf/httpd.conf

#Search for 'logformat'

ctrl w (then type in "logformat")

#Replace this line

CODE
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined


#With this line

CODE
LogFormat "%h %v %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" "%{Cookie}i"" combined


ctrl x then y to save

#Restart Apache

service httpd restart

#Change logrotate to rotate daily

pico -w /etc/logrotate.conf

(change the line that reads "weekly" to "daily" (no quotes))

ctrl x then y to save

#Make urchin startup on reboot

cp /usr/local/urchin/util/urchin_daemons /etc/rc.d/init.d/urchin

chmod 755 /etc/rc.d/init.d/urchin

#Open this file

pico -w /etc/rc.d/rc.local

#Add to the bottom

/etc/rc.d/init.d/urchin start

ctrl x then y to save

#Ensim automation scripts

cd /etc/appliance/customization/

pico -w add-all.sh

#Add this code

CODE
#! /bin/sh



DOMAINS=`/usr/local/bin/sitelookup -a domain`

SITERETVAL=$?

if [ $SITERETVAL -eq 0 ]; then

for DOMAIN in $DOMAINS

do

USER=`/usr/local/bin/sitelookup -d $DOMAIN site_admin`

/etc/appliance/customization/urchin-add.sh $DOMAIN $USER

done

fi


ctrl x then y to save

pico -w urchin-add.sh

#Add this code

CODE
#! /bin/sh



URCHINPATH="/usr/local/urchin"

OUTPUT="/tmp/urchin-temp.conf"



DOMAIN=$1

USER=$2@$1

PASSWORD="urchin"



echo "<Profile Name="$DOMAIN">" > $OUTPUT

echo " ct_name=$DOMAIN" >> $OUTPUT

echo " ct_affiliation=(NONE)" >> $OUTPUT

echo " ct_website=http://www.$DOMAIN" >> $OUTPUT

echo " ct_reportdomains=www.$DOMAIN,$DOMAIN" >> $OUTPUT

echo " cs_llist=$DOMAIN-access-log,$DOMAIN-access-log.[1-4]" >> $OUTPUT

echo " ct_defaultpage=index.html" >> $OUTPUT

echo " cs_vmethod=0" >> $OUTPUT

echo " cs_ulist=$USER" >> $OUTPUT

echo "</Profile>" >> $OUTPUT

echo >> $OUTPUT

echo "<Task Name="$DOMAIN">" >> $OUTPUT

echo " ct_name=$DOMAIN" >> $OUTPUT

echo " ct_affiliation=(NONE)" >> $OUTPUT

echo " cr_frequency=4" >> $OUTPUT

echo " cr_minute=0" >> $OUTPUT

echo " cr_runnow=0" >> $OUTPUT

echo " cr_enabled=off" >> $OUTPUT

echo "</Task>" >> $OUTPUT

echo >> $OUTPUT

echo "<Logfile Name="$DOMAIN-access-log">" >> $OUTPUT

echo " ct_name=$DOMAIN-access-log" >> $OUTPUT

echo " ct_affiliation=(NONE)" >> $OUTPUT

echo " ct_loglocation=/home/virtual/$DOMAIN/var/log/httpd/access_log" >> $OUTPUT

echo " cs_logformat=ncsa" >> $OUTPUT

echo " cr_type=local" >> $OUTPUT

echo " cs_rlist=$DOMAIN" >> $OUTPUT

echo "</Logfile>" >> $OUTPUT

echo >> $OUTPUT

echo "<Logfile Name="$DOMAIN-access-log.[1-4]">" >> $OUTPUT

echo " ct_name=$DOMAIN-access-log.[1-4]" >> $OUTPUT

echo " ct_affiliation=(NONE)" >> $OUTPUT

echo " ct_loglocation=/home/virtual/$DOMAIN/var/log/httpd/access_log.[1-4]" >> $OUTPUT

echo " cs_logformat=ncsa" >> $OUTPUT

echo " cr_type=local" >> $OUTPUT

echo " cs_rlist=$DOMAIN" >> $OUTPUT

echo "</Logfile>" >> $OUTPUT

echo >> $OUTPUT

echo "<User Name="$USER">" >> $OUTPUT

echo " ct_affiliation=(NONE)" >> $OUTPUT

echo " ct_fullname="$DOMAIN"" >> $OUTPUT

echo " ct_name=$USER" >> $OUTPUT

echo " ct_password=$PASSWORD" >> $OUTPUT

echo " cs_rlist=$DOMAIN" >> $OUTPUT

echo "</User>" >> $OUTPUT



$URCHINPATH/util/uconf-import -f $OUTPUT


ctrl x then y to save

pico -w virtDomain.sh

Add this code

CODE
IP=`/bin/hostname -i`

/etc/appliance/customization/urchin-add.sh $1 $2


(if you already have code in this file, just add)

CODE
/etc/appliance/customization/urchin-add.sh $1 $2


chmod 755 virtDomain.sh urchin-add.sh add-all.sh

#Add current sites to urchin profiles

./add-all.sh

#Start urchin

service urchin start

#Open Urchin in browser and configure and add license

Go to http://IPADDRESS:8080/

User: admin
Pass: urchin (this should be changed)

If you have a licence from RS, click "Activate Pre-Purchased License"

Enter the license in the window that opened then click continue.

Add your contact information and click 'register' then click the link to install the license.

Now your back to urchin.

Click continue, leave the admin settings as default and click next. Enter a new password and click next and now your done.

Urchin stats update on the hour.

Your clients can access them via

http://IPADDRESS:8080/

User: username@domain.com
Pass: urchin (should be changed)


To install a link from Webppliance Pro to urchin see this thread
(i have copyied the thread to the next post incase somehow it becomes deleted)

http://forum.rackshack.net/showthread.php?...&threadid=24197
foggy
From "msrootserve"

**Please note that future ensim upgrades will usually overwrite this hack, keep a backup of the file you changed so you can copy it back.**

How To Urchin Link Site Admin Nav Bar 3.5x

cd /usr/lib/python2.2/site-packages/ensimappl
cp skin_gui_35.py skin_gui_35.py.bak (just in case you mess up)
pico -w skin_gui_35.py

scroll down to where you find the SA_menu_items
decide where in the menu you wish to put it, I placed mine between help and logout. Some may wish to paste this code above Analog and Webalizer.

paste the following

{'caption': 'URCHIN',
'href': 'http://64.246.30.12:8080',
'target': '_blank'},

Replace the IP# above with your server IP#. This assumes you are using port 8080 for your Urchin.

When pasted correctly a snippet would look like this
{'caption': 'HELP',
'href': '/docs/%(lang)s/site/',
'target': '_blank'},
{'caption': 'URCHIN',
'href': 'http://64.246.30.12:8080',
'target': '_blank'},
{'caption': 'LOGOUT',
'href': '/webhost/services/virtualhosting/siteadmin/manage_logout?relogin=webhost/rollout/site',
'target': '_top'},

type control-x and yes to save, then
service webppliance restart

You should now be able to login to your site admin and see Urchin on your list of Site Administrator service options.

Enjoy!
Ahdonline
This worked great the first try. Thanks for the update!
Netino
How much domains we can use on the $1 RS version of Urchin?

Regards,
Netino
foggy
QUOTE
Originally posted by Ahdonline
This worked great the first try.  Thanks for the update!


You're welcome icon_smile.gif





netino: i think you can have 200 or 300 profiles (domains) with the RS 1.00 urchin license.
SciFiJunkie
Foggy,

I bow down and kiss your feet.

I had lost my hard copy of this and was looking for a , know copy, on my CD backups. You have help in many ways.

Thanks,
SciFijunkie
lgatzoulis
Hi,

I've already installed in the past Urchin 4 using more or less the procedures you describe.

Can I install Urchin 5 and use the same method to generate a new license? Or do I need to buy a new license from Rackshack or Urchin?

Any help will be greatly appreciated.
foggy
Think you'll need a new license.. they are only $1.00 from RS so that shouldnt be a problem..
Buttercup
Thanks for the directions Foggy. How do I start urchin up using SSL?

Thanks!
Rene
Hello, installed without a itch but I get a strange error when running the urchin within the urchin admin area for a site.

ERROR: (7008-911-381) DB file is the wrong size - run sanitizer.

What is this and what do I do ?
The urchin is running for that site though via access_log but maybe it is because that size is 54MB large, don't know.....

Please help
Rene
nvm.. problem solved....

Need to delete all logs for that site and rerun the application..

Done...
hbouma
Hey Foggy,

Thanks for providing the how-to again for people to read. I have three suggestions to make though:

1) If possible, can you re-add how to connect to Urchin via a secure connection? Thats the only step I can't remember from the Andrew's how-to.

2) One step that isn't in any urchin documentation that burned me about 5 times before I got this Urchin process down is that nothing mentions to back up the urchin db on a regular basis with the uconf-export utility. If you export your urchin database, you won't need to get another serial key from Rackshack when your database gets hosed. (like when you use uconf-import with the -r option) You can just restore your old database and continue without missing a step.

3) If you're not going to support UTM tracking, why does your howto still change the Apache log format? If I recall correctly, the log format change was only for the UTM tracking...

Thanks again for the how-to!

Hal
animal88
I am fairly new to all this. How can I assign urchin to certain users, but not permit other users to use it? Thank you.
LighthousePoint
Okay, this is odd, but I installed Urchin 5, and Ensim's built-in 4.1 support worked just fine -- didn't have to do anything extra...
Miso
does one have to remove urchin4 to install this.. or can this go over the top?

And does urchin give you report ofr every domain on the box or do you have to congire each domain?
hbouma
QUOTE
Originally posted by LighthousePoint
Okay, this is odd, but I installed Urchin 5, and Ensim's built-in 4.1 support worked just fine -- didn't have to do anything extra...


Uh, what built-in 4.1 Urchin support does Ensim have?

Hal
LighthousePoint
Ensim supports 4.1 out-of-box. It works fine with 5 on my boxes... It still says 4.1 when I add it in site-admin, but the stats are all 5.
secwrd
Nice foggy... but it doesn't add sites to user profiles ? it seems to add the sites fine, but I've had to go and edit the user to give them the report access.... that just me?
Miso
Is this what you need screwd?
http://forum.ev1servers.net/showthread.php...&threadid=13626


By the way.. how does urchin compare to AWSTATS?
foggy
QUOTE
Originally posted by secwrd
Nice foggy... but it doesn't add sites to user profiles ? it seems to add the sites fine, but I've had to go and edit the user to give them the report access.... that just me?


That should be just you.

When you create a site, it adds it to urchin. the site owner can login with the details below to view their site stats.

Username is: theirusername@theirdomain.com

Password is: urchin
secwrd
QUOTE
Originally posted by foggy
That should be just you.  

When you create a site, it adds it to urchin. the site owner can login with the details below to view their site stats.

Username is:  theirusername@theirdomain.com

Password is: urchin


Yeah I havent tried it for new sites yet, but I ran it for 130 existing domains none of the user have a domain in their profile... only thing I changed was a different default password and for the user to be $1 not $2@$1
foggy
QUOTE
Originally posted by secwrd
Yeah I havent tried it for new sites yet, but I ran it for 130 existing domains none of the user have a domain in their profile... only thing I changed was a different default password and for the user to be $1 not $2@$1


I can't support a modified script, sorry.

I only have been using it the way it is written, and it works fine that way. (this script is what used to be on unofficialsupport.com)
secwrd
QUOTE
Originally posted by foggy
I can't support a modified script, sorry.  

I only have been using it the way it is written, and it works fine that way. (this script is what used to be on unofficialsupport.com)


lol, I'm not asking for you to support a script, just mentioning it doesn't seem to assign domains to profiles.
Doobla
2 Questions:

1. How does this compare to Webalizer and AWStats?

2. Is ther eany way to automate the login? If they are already in the control panel I'd like to log them in automatically.

thanks,

Jon
foggy
QUOTE
Originally posted by Doobla
2 Questions:

1.  How does this compare to Webalizer and AWStats?

2.  Is ther eany way to automate the login?  If they are already in the control panel I'd like to log them in automatically.

thanks,

Jon


It seems to have more detailed stats than webalizer.. never seen what awstats looked like.. But urchin it is a nice clean looking program.. and i think RS still sells it for $1.00 so if u try it and don't like it your only out a buck.


I havent figured out how to automate the login.. With cPanel it does, but with ensim it doesnt. If someone knows, i'd like to hear how to do it.
hbouma
QUOTE
Originally posted by LighthousePoint
Ensim supports 4.1 out-of-box.  It works fine with 5 on my boxes...  It still says 4.1 when I add it in site-admin, but the stats are all 5.


Okay, I can stop looking at you like you're from a different planet now as I've figured out what you're talking about. Lighthouse, Ensim Pro for Windows supports Urchin out of the box while Ensim Pro for Linux does not. It would be nice if they had added Urchin support to the Linux platform. Hopefully they'll do it soon so we don't have to worry about trying to support it like this. :/

Hal
night-red
It workes great even withthe new ver.
PeterP
Great HowTo

Thx.
hbouma
Hi everyone,

Now for the bonus round. Anyone have any thoughts on how we can have the Urchin data inside the client's website ala cPanel so that it can be backed up along with the website?

Thanks!

Hal
LighthousePoint
QUOTE
Originally posted by hbouma
Hi everyone,

Now for the bonus round. Anyone have any thoughts on how we can have the Urchin data inside the client's website ala cPanel so that it can be backed up along with the website?

Thanks!

Hal


symlink, perhaps?
hbouma
Hi,

I'm thinking that would be the best way. The files would have to be created when the account is created and symlinked to the proper place in the urchin data.

This also implies a urchin delete needs to be done when the account is removed. Otherwise Urchin will not be happy that the symlinked data is gone when it tries to run the reports on that website.

Hal
DavidG
when I run add_all i get:

/etc/appliance/customization/urchin-add.sh: line 33: syntax error near unexpected token `>>'
/etc/appliance/customization/urchin-add.sh: line 33: `echo " ct_loglocation=/home/virtual/$DOMAIN/var/log/httpd/access_log" >> '
/etc/appliance/customization/urchin-add.sh: line 33: syntax error near unexpected token `>>'

......... repeats a lot of times

anyone got any ideas on how to resolve this?
dradford
I have ensim pro on fedora linux, I tried what you said for it showing up in the control panel, but it did not work. set it between help and log out. Did not show up. any sugestions?
PDM
Does Urchin 5.x run ok on RHEL/Ensim Pro 3.7-x
SherKhan
QUOTE
Originally posted by PDM
Does Urchin 5.x run ok on RHEL/Ensim Pro 3.7-x


Same question here.
cse
hi,

dont know if I missed any posts, but is there a way to add all the sites on your server automaticaly to urchin, without having to go thorugh the urchin interface ?

Thanks
PDM
QUOTE
add all the sites


I believe that's on the first page.
cse
PDM,

thanks I've seen it now
webexceed
I thought I'd lay this all out and hopefully somebody knows the answer. It bugs me that all new sites that get created have urchin for their password. It SEEMS to me that there is an easy fix for that, but I don't know the exact process that ensim follows when setting up a new site.

According to the instructions for this integration you create a file called /etc/appliance/customization/virtDomain.sh and place the following into it:

CODE
IP=`/bin/hostname -i`

/etc/appliance/customization/urchin-add.sh $1 $2


I don't know where it's getting the variable data from for $1 and $2, but I suspect it's from ensim's site creation routines. I also suspect that the siteadmin password must be available also. ????

Does anyone know?? I think I'll try playing around with it and see if $3 works. icon_biggrin.gif
Gonzalo2002
Good HowTo

I have a little problem from admin page i can see the reports for every domain, but from domains page urchin statists i can't see.

How can i solve it?

Thanks in advance.
acidbox
QUOTE
Originally posted by PDM
Does Urchin 5.x run ok on RHEL/Ensim Pro 3.7-x


I'm not sure if the automation script works, but I did see on the Urchin website, that there is a specific version of Urchin for RHEL (urchin5501_redhat_ent3.sh). Might want to try that one before you get into the script.

Update: I used this RHEL version with the original tutorial and it worked. Still wish we could get it to auto-login instead of having the user log in again.
naramation
-edit- multiple post
naramation
-edit- multiple post, sorry
naramation
-edit- sorry again
naramation
A couple of questions...


By default, Urchin is setting new profiles to run "Never". How can I make the default "Hourly", withut having to edit a few hundred domains by hand?

And 2nd, I remember Urchin4 that I got from RS ages ago supported additional modules (ecommerce, to be precise), does the new Urchin5 license?

Thanks icon_smile.gif
naramation
Read up a bit, looks like I'll have to add the uconf-schedule utility to a daily cron to set all the profiles to hourly update... Is there an esier/better way of doing this?
rksells
When I try to run ./install.sh I get file can't be found
Also when you say to go to
get http://www.urchin.com/download/urch...5000_redhat72.sh
then below that their is a line that says
sh urchin5500_redhat72.sh
How are we to run that? Is it just one line or two?
af199
So far so good. All the instructions previously worked a treat and i get all new sites with an Urchin profile. THe trouble is, when you come to click on the link to view the reports for ANY site, i get a javascript error saying something like :

Line 234 Col 7
'document' is null or not an object

and

Line 437 Col 7
'mywin.location' is null or not an object

I'm viewing urchin via the IP address and it is Urchin 5.

Anyone seen this problem before or have any ideas?
norther
The automation script added only 100 profiles out of 130. I guess there's some kind of license limitation. After I licensed the product and re-run add-all.sh I got all 130 profiles.

Great how-to, thank you! icon_biggrin.gif

BTW, someone asked previously if it's possible to use ssl-connection to urchin panel. Anyone got it working?
TUXVSP
Does this hack also work for Ensim 4.0 on RHEL?

And I am guessing: urchin5600r2_redhat_ent3 (latest) from there website.

Now does the hack break everytime ensim releases a update? ie: 4.0.1? etc... And have to be redone each time? Or was that if you wanted to add a link in the admin control panel

Update: I have installed it using that file, with the hack setup above, all seems fine, guess I need to wait an hour to see any updates... But would still like to know if the hack gets deleted everythine ensim patches something.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.