Latest revision |
Your text |
Line 101: |
Line 101: |
| index index.php index.html index.htm; | | index index.php index.html index.htm; |
|
| |
|
| client_max_body_size 32M; # set to the same as max PHP upload size in HHVM
| |
| location / { | | location / { |
| try_files $uri $uri/ /index.php$is_args$args; | | try_files $uri $uri/ /index.php$is_args$args; |
Line 329: |
Line 328: |
|
| |
|
| The installer is quite self explanatory, just make sure to remove the Boards prefix. | | The installer is quite self explanatory, just make sure to remove the Boards prefix. |
|
| |
| Also make sure to install imagemagick and set the path in the config to it.
| |
|
| |
| {{Note|In the installer one should have FoolFuuka table prefix set (default is fine ff_). But after installing one needs to set BOARD PREFIX to blank since asagi doesn't have any. FoolFuuka table prefix != board table prefix. Here's [https://github.com/p0wer0n/FoolFrame/commit/3368e24dc9d89b881460f8c876ddb91c78b5b955 a code change that does it.]}}
| |
|
| |
|
| == Add boards, Configure Sphinx == | | == Add boards, Configure Sphinx == |
|
| |
|
| To configure Sphinx Search, take the following links:
| | http://IP/admin > Search > Generate Config. |
| | |
| http://IP/admin -> Search -> Generate Config. | |
| http://IP/admin -> Boards -> Edit -> Check Use SphinxSearch as search engine.
| |
| On the Search panel, change the working directory (on Ubuntu) to the following:
| |
| <pre>
| |
| /var/lib/sphinxsearch
| |
| </pre>
| |
| | |
| === Supplement Sphinxsearch ===
| |
| | |
| <pre>
| |
| cd /var/run
| |
| sudo mkdir sphinxsearch
| |
| sudo chmod -Rf 777 sphinxsearch
| |
| </pre>
| |
| | |
| === Start Sphinxsearch ===
| |
| <pre>
| |
| sudo nano /etc/default/sphinxsearch
| |
| </pre>
| |
| Change the following line from
| |
| <pre>START=no</pre>
| |
| to
| |
| <pre>START=yes</pre>
| |
| Save and run the following command
| |
| <pre>sudo /etc/init.d/sphinxsearch start</pre>
| |
|
| |
|
| | | Copy config out of FF and add your MySQL database information. Paste this to /etc/sphinxsearch/sphinx.conf |
| Right-click and copy this config out of Foolfuuka and add your MySQL database information for asagi.
| |
| Change the following line from
| |
| <pre>pid_file = /var/lib/sphinxsearch/searchd.pid</pre>
| |
| to
| |
| <pre>pid_file = /var/run/sphinxsearch/searchd.pid </pre>
| |
| | |
| Then, paste this to <code>/etc/sphinxsearch/sphinx.conf</code>
| |
| | |
| If anything errors, kill any running instance of asagi and restart it
| |
|
| |
|
| === Build the indexes === | | === Build the indexes === |
Line 381: |
Line 341: |
|
| |
|
| === Configure Crontab === | | === Configure Crontab === |
| <pre>
| | |
| sudo nano /etc/crontab
| |
| </pre>
| |
| <pre> | | <pre> |
| @hourly sudo -u sphinxsearch /usr/bin/indexer --rotate *_delta > /dev/null | | @hourly sudo -u sphinxsearch /usr/bin/indexer --rotate *_delta > /dev/null |
Line 389: |
Line 347: |
| @monthly sudo -u sphinxsearch /usr/bin/indexer --rotate *_ancient > /dev/null | | @monthly sudo -u sphinxsearch /usr/bin/indexer --rotate *_ancient > /dev/null |
| </pre> | | </pre> |
|
| |
|
| |
|
| === Adding Archives === | | === Adding Archives === |
Line 400: |
Line 357: |
| == Extra configuration == | | == Extra configuration == |
|
| |
|
| Depending on which distro you use or how many posts you have, some configs might need to be changed. | | Depending on which distro you use, some configs might need to be changed. |
|
| |
|
| === Fixing thumbnail creation === | | === Fixing thumbnail creation === |
Line 409: |
Line 366: |
| </pre> | | </pre> |
| and make sure it is the same value in Admin panel -> general -> Imagemagick Convert | | and make sure it is the same value in Admin panel -> general -> Imagemagick Convert |
|
| |
| === For Huge Boards: Problem with random dropped posts/threads due to stats triggers ===
| |
|
| |
| When Desuarchive was configured with a new server using the 4plebs fork of FoolFuuka and Asagi, it was a mystery why /a/ was behind in archiving. Normal posts were being bled somehow.
| |
|
| |
| But everything was running fine configuration-wise. No asagi errors. Nothing. And all other boards were great.
| |
|
| |
| However, ''just get rid of stats triggers/procedures'' and it should be fine.
| |
|
| |
| Asagi has triggers that update {{ic|_daily}} and {{ic|_users}} tables. FFuuka stats plugin reads those tables and make stats. Probably the {{ic|_users}} table was messed up/too large for /a/, so it slows down inserts because the update runs before it.
| |
|
| |
| 4plebs is working on stats plugins that does it without them, since stats calc on insert isn't a smart idea.
| |
|
| |
| ==== Procedure ====
| |
|
| |
| I just removed the calls to stats procedures. Should work but check it out first. But should leave the procedures there (commented out?) so that you can go back.
| |
|
| |
| # Stop Asagi.
| |
| # Run the code below:
| |
| # Start Asagi.
| |
|
| |
| {{lc|<nowiki>
| |
| DROP TRIGGER IF EXISTS "after_ins_a";
| |
|
| |
| delimiter //
| |
|
| |
| CREATE TRIGGER "after_ins_a" AFTER INSERT ON "a"
| |
| FOR EACH ROW
| |
| BEGIN
| |
| IF NEW.op = 1 THEN
| |
| CALL create_thread_a(NEW.num, NEW.timestamp);
| |
| END IF;
| |
| CALL update_thread_a(NEW.thread_num);
| |
| END//
| |
|
| |
| DROP TRIGGER IF EXISTS "after_del_a"//
| |
|
| |
| CREATE TRIGGER "after_del_a" AFTER DELETE ON "a"
| |
| FOR EACH ROW
| |
| BEGIN
| |
| CALL update_thread_a(OLD.thread_num);
| |
| IF OLD.op = 1 THEN
| |
| CALL delete_thread_a(OLD.num);
| |
| END IF;
| |
| IF OLD.media_hash IS NOT NULL THEN
| |
| CALL delete_image_a(OLD.media_id);
| |
| END IF;
| |
| END//
| |
|
| |
|
| |
| delimiter ;
| |
| </nowiki>|lang=sql}}
| |