Menu Home

Installing Flax Basic Search on Ubuntu

Moby – Disco Lies

Flax search is a search engine based on the powerful Xapian search engine. Basically it’s Xapian pre-configured with a nice UI and some extra features, and their business model is custom configuration and support, while offering Flax Basic as a taster. At the moment Flax Basic is developed primarily for Windows as a desktop search tool (a’la Google Desktop) but it can also be used as an intranet search engine, and it can be installed on Linux, like so. As root:

apt-get install python-cherrypy3 python-processing html2text
cd /opt
wget http://flaxcode.googlecode.com/files/flax-source-1.0.0.tgz && tar xvf flax-source-1.0.0.tgz
mv flax-source-1.0.0 flax
wget http://flaxcode.googlecode.com/files/HTMLTemplate-1.4.2.tar.gz && tar xvf HTMLTemplate-1.4.2.tar.gz
http://xappy.googlecode.com/files/xappy-0.5.tar.gz && tar xvf xappy-0.5.tar.gz
cd HTMLTemplate-1.4.2/ && python setup.py install
cd ../xappy-0.5 && python setup.py install
cd ../flax/src && python startflax.py --set-admin-password

They recommend starting startflax.py with --conf-dir=. to get it reading conf files held within the same directory, the python scripts seem to look in data/conf/ so simply issue:
mv *.conf data/conf/ (or cp *.conf data/conf/, or cd into data/conf/ and make some symlinks… your choice)

Then finally:
python startflax.py

Browse to http://localhost:8090/admin and login with the username ‘admin’ and the password that you configured, et voila! It’s all yours.

These instructions assume you have all the dependencies and tools necessary, the first apt-get should get you mostly sorted though. YMMV!

Categories: Lunix Lunacy Open Source

Tagged as:

rawiri

5 replies

  1. What version of Ubuntu did you install Flax on? Using 8.10 server I'm getting some errors at the last command:

    ********************************************************************************
    cd flax/src && python startflax.py –set-admin-password
    Traceback (most recent call last):
    File “startflax.py”, line 37, in <module>
    from indexserver import indexer
    File “/opt/flax/src/indexserver/indexer.py”, line 46, in <module>
    import htmltotext_filter
    File “/opt/flax/src/indexserver/htmltotext_filter.py”, line 26, in <module>
    import htmltotext
    ImportError: No module named htmltotext
    ********************************************************************************

    I'm guessing it has to do with html2text, which above is referred to as htmltotext?

    Also, before you install Flax, you need to install Xapian, as per their instructions at http://www.xapian.org, right?

    Thanks in advance /// Martin

  2. Hi Martin,
    this was on 8.10.

    You’re right, it is to do with html2text, if the apt version doesn’t work then you’ll have to download their version from here:

    http://flaxcode.googlecode.com/files

    untar it and again: python setup.py install

    Their tracebacks are very helpful at telling you what’s missing, I had this same problem for quite a while working my way through to find the right combination of deps 🙁

    I don’t recall having to install xapian as a prerequisite, I think the xapian libraries come with the flax installer – soldier on and see what flax tells you. Good luck! 🙂

  3. where did the Overclockers NZ forum go?? but thanks for your blog such a great read, all the best! you teh programmer guru..

  4. not too sure about the OCNZ forums eh… I really need to get sql access so that we can do some migration testing.. we might want to move to another host too…

  5. Hi Rawiri,

    Thanks for working on this. Just to clear things up, we didn’t really intend Flax as a competitor to Google Desktop, more as a simple demo of the whole Flax platform – Google are a lot bigger than us! Flax Basic is well, basic, so don’t expect it to have all the features of GD. However, it *is* open source at least!