| 1 |
***********
|
| 2 |
* WARNING *
|
| 3 |
*********************************************************************************
|
| 4 |
* *
|
| 5 |
* You have to get in mind that this module requieres 2.0 GB free space on your *
|
| 6 |
* disk to be able to complete all the cron proceses, which includes downloading *
|
| 7 |
* DMoz RDF contents and RDF handling&importing from mysql. *
|
| 8 |
* *
|
| 9 |
*********************************************************************************
|
| 10 |
|
| 11 |
Steps to get this module running on drupal:
|
| 12 |
|
| 13 |
1) You need to install DMOZ::ParseRDF module from CPAN
|
| 14 |
+ http://search.cpan.org/CPAN/authors/id/P/PA/PAUL/DMOZ-ParseRDF-0.14.tar.gz
|
| 15 |
2) Import dmoz.mysql from mysql
|
| 16 |
+ mysql -u drupal_user -p drupal_db < dmoz.mysql
|
| 17 |
3) Install, enable and configure dmoz module
|
| 18 |
+ move dmoz directory to /{drupal_installation_path}/modules/
|
| 19 |
+ enable dmoz module on /admin/modules
|
| 20 |
+ configure dmoz module on /admin/settings/dmoz
|
| 21 |
- You must fill "ODP Category" field from a DMOZ
|
| 22 |
category in dmoz.org, such as Top/World/Spanish
|
| 23 |
- You must enable "Update on cron" field to get dmoz
|
| 24 |
module running automatically.
|
| 25 |
4) Create dmoz directory under /{drupal_installation_path}/files/ with
|
| 26 |
read&write privileges for webserver process UID
|
| 27 |
5) Be sure http://your_site/cron.php is running in crontab every 5
|
| 28 |
minutes (dmoz needs to be executed very frecuently because it needs to
|
| 29 |
complete a lot of tasks for parsing and importing contents)
|
| 30 |
|
| 31 |
_________________________________________________________________________________
|
| 32 |
|
| 33 |
Here you are aditional indexes to speed up search
|
| 34 |
|
| 35 |
# This one speeds up update, 100 registers processed, 44000 rows from 30 to 3 s !!
|
| 36 |
|
| 37 |
ALTER TABLE `dmoz_node` DROP INDEX `Index_url`,
|
| 38 |
ADD INDEX `Index_url`(`url`(1000));
|
| 39 |
|
| 40 |
# Speed up category update
|
| 41 |
# 100 registers processed, 6739 rows from 55 to 12 s !!
|
| 42 |
ALTER TABLE `dmoz_term_data` DROP PRIMARY KEY,
|
| 43 |
ADD PRIMARY KEY(`tid`, `topic`),
|
| 44 |
ADD INDEX `Index_topic`(`topic`);
|
| 45 |
# 500 registers processed, 6740 rows from 70 to 6,5 s !!
|
| 46 |
ALTER TABLE `dmoz_term_data` ADD INDEX `Index_catid`(`catid`);
|
| 47 |
|
| 48 |
ALTER TABLE `dmoz_structure` ADD INDEX `Index_topic`(`topic`);
|
| 49 |
|
| 50 |
# Counting nodes
|
| 51 |
UPDATE dmoz_term_data d
|
| 52 |
SET count = (SELECT count(*) FROM term_node t WHERE d.tid = t.tid)
|
| 53 |
|