juhanurmi / ahmia

Ahmia hidden service search engine
BSD 3-Clause "New" or "Revised" License
199 stars 64 forks source link

Ahmia - Tor Hidden Service Search

https://ahmia.fi/

https://ahmia.fi/

New repository!

https://github.com/ahmia/search

Compatibility

Ahmia requires Python 2.7+ and Django 1.6+

The crawler is called Onionbot and it requires Apache Solr for the data.

Installation

Install depencies:
$ apt-get install libxml2-dev libxslt-dev python-dev
$ apt-get install libpq-dev
$ apt-get install python-socksipy python-psycopg2 libapache2-mod-wsgi
$ apt-get install libffi-dev
$ pip install -r requirements.txt
Furthermore, you will need to set the rights to the tools:
$ chmod -R ugo+rx /usr/local/lib/ahmia/tools/
And to Apache:
$ chown -R www-data:www-data /usr/local/lib/ahmia/
$ chmod -R u=rwX,g=rX,o=rX /usr/local/lib/ahmia/
Move the Apache settings and adjust WSGI processes=X threads=Y

Upper limit to memory that Apache needs is XY8MB. For instance, 4168MB = 513MB.

cp apache2/sites-available/django-ahmia /etc/apache2/sites-available/django-ahmia
/etc/init.d/apache2 restart
And after creating the SQLite database:
$ chown www-data:www-data /usr/local/lib/ahmia
$ chown www-data:www-data /usr/local/lib/ahmia/ahmia_db
Not required, but recommended for better system performance:

Features

Demo

You can try the demo by cloning this repository and running the test server with provided data:

$ python manage.py syncdb
$ python manage.py loaddata ahmia/fixtures/initial_data.json
$ python manage.py runserver

Then open your browser to http://localhost:8000

Tests

Unittests:

$ python manage.py test ahmia/tests/

For developers

Please, at least, validate your Python code with:

$ pylint --rcfile=pylint.rc ./ahmia/python_code_file.py

and fix the major problems.