These Things Matter to Me
Monday, September 08, 2008
  How to install the Python prerequisites for the Memetracker Drupal module
How to install the Python prerequisites for the Memetracker Drupal  module.

Usually the installation of Drupal modules is pretty straightforward:

  • Download module to modules/
  • Uncompress
  • Enable
  • Configure
  • Profit

But the Memetracker module is a bit different, requiring a bunch of Python stuff, and ideally, "root" on your server.  It's not that hard to set up, but if you're not used to installing stuff outside of the Druapl-verse, these notes might help you.

(These instructions are for Ubuntu Hardy Heron. The steps are likely very similar on other Debian-based distributions, including earlier versions of Ubuntu.
I've also successfully installed Memetracker on Centos 5.x/Redhat Enterprise Linux 5.x. I have a document for that coming soon, though the packages and steps are very similar, and you could extrapolate these notes and apply to other Linux versions.)

Most of you should skip to step 2, as you probably already have Drupal running..

1. Make sure you have all "normal" LAMP and Linux utilities installed for your typical Drupal install.

1a. Install the LAMP stuff, mail server stuff that Drupal requires.

# apt-get install apache2 php5 libapache2-mod-php5 php5-mysql mysql-server php5-gd postfix 

(Note: Though Drupal core can run on PHP4, the Memetracker module *requires* PHP5, so that's what we're using here.  You don't have to go out of your way to get this on Hardy Heron, but there is a small possibility some of you went out of your way to get PHP4, so I'm steering you towards PHP5 here.)

1b. Though not required to run Drupal, these additional packages make life much easier, and it's just a matter of time before you miss them:

# apt-get install openssh-server wget build-essential groff-base man-db unzip

2.  Unlike most Drupal setups, you also need to have some Python resources handy to run Memetracker.

2a. The first bunch of Python tools already have nice Ubuntu packages already made up for you.

# apt-get install python-numpy python-numeric python-dev python

2b. Pyclust doesn't have an Ubuntu package made for it.  We need to compile it from source (There will be a python-cluster package in the next Ubuntu version, Intrepid Ibex.)

Get the source:

# wget http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/cluster-1.41.tar.gz

(Note, this is the newest version as of 20080908.  Please check http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm  for newest version.)

Uncompress the source:

# tar -xvzf cluster-1.41.tar.gz

Now install it:

# cd cluster-1.41
python setup.py install

You now have all your Python stuff installed. 
Let's verify it works:

# python
>> from Pycluster import *
(You will get your Python prompt back if you have your Python stuff installed correctly.)

That's it. You now have your environment ready for Memetracker.  There's lots of other stuff you can do to optimize your system for Memetracker, and I have some additional Memetracker documentation coming up.  However I noticed an immediate need for this Python stuff to be written down in a step-by-step manner, as many Drupal folks don't usually have to do so much Python/Linux stuff.

Labels: , , , , ,

 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home
probably a little too much

About
Linux sysadmin. I cry when make fails. And during the Oscars. Every year.
Contact
andy: andiacts [at] gmail.com
Archives
September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / January 2009 / February 2009 /




Powered by Blogger

Subscribe to
Posts [Atom]