Editing FoolFuuka/Install/Ubuntu16
From Bibliotheca Anonoma
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 4: | Line 4: | ||
__NOTOC__ | __NOTOC__ | ||
== Prepare things == | == Prepare things == | ||
Line 25: | Line 12: | ||
[https://docs.hhvm.com/hhvm/installation/linux#ubuntu-16.10-yakkety from docs.hhvm.com] | [https://docs.hhvm.com/hhvm/installation/linux#ubuntu-16.10-yakkety from docs.hhvm.com] | ||
<pre>sudo apt-get install software-properties-common | <pre>sudo apt-get install software-properties-common | ||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 | sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449 | ||
sudo add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main"</pre> | sudo add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main"</pre> | ||
== Add repo for | == Add repo for MariaDB 10.1 == | ||
[https:// | [https://downloads.mariadb.org/mariadb/repositories/#mirror=accretive from downloads.mariadb.org] | ||
<pre> | <pre>sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 | ||
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial main"</pre> | |||
== Add repo for NGINX Stable == | == Add repo for NGINX Stable == | ||
Line 41: | Line 28: | ||
<pre>wget https://nginx.org/keys/nginx_signing.key | <pre>wget https://nginx.org/keys/nginx_signing.key | ||
sudo apt-key add nginx_signing.key | sudo apt-key add nginx_signing.key | ||
sudo add-apt-repository "deb http://nginx.org/packages/ubuntu/ | sudo add-apt-repository "deb http://nginx.org/packages/ubuntu/ xenial nginx"</pre> | ||
== Add repo for sphinxsearch == | == Add repo for sphinxsearch == | ||
{{Note|Todo}} | |||
== Install all the needed packages. == | == Install all the needed packages. == | ||
Line 53: | Line 39: | ||
<pre>sudo apt-get update | <pre>sudo apt-get update | ||
sudo apt-get install git nginx hhvm | sudo apt-get install git nginx hhvm mariadb-server mariadb-client imagemagick maven openjdk-8-jdk-headless</pre> | ||
== Install composer for downloading FoolFuuka dependencies. == | == Install composer for downloading FoolFuuka dependencies. == | ||
Line 76: | Line 62: | ||
upload_max_filesize = 32M | upload_max_filesize = 32M | ||
post_max_size = 32M | post_max_size = 32M | ||
</nowiki>}} | </nowiki>}} | ||
Line 121: | Line 104: | ||
== Set Permissions and Group for FoolFuuka Directory == | == Set Permissions and Group for FoolFuuka Directory == | ||
<pre> | <pre>sudo chown -Rf www-data:www-data /var/www/foolfuuka</pre> | ||
sudo chown -Rf www-data:www-data /var/www/foolfuuka | |||
== Install hhvm with nginx == | == Install hhvm with nginx == | ||
Line 168: | Line 149: | ||
== Disable transparent_hugepage == | == Disable transparent_hugepage == | ||
<pre>su -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'</pre> | |||
<pre>su -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' | |||
<pre>sudo nano /etc/default/grub</pre> | <pre>sudo nano /etc/default/grub</pre> | ||
Line 186: | Line 166: | ||
}} | }} | ||
== edit | == edit MariaDB to use utf8mb4 for correct unicode processing == | ||
< | {{hc|sudo nano /etc/mysql/my.cnf|<nowiki> | ||
[client] | |||
default-character-set = utf8mb4 | |||
[mysql] | [mysql] | ||
default-character-set = utf8mb4 | default-character-set = utf8mb4 | ||
[mysqld] | [mysqld] | ||
character-set-client-handshake = FALSE | character-set-client-handshake = FALSE | ||
Line 203: | Line 180: | ||
collation-server = utf8mb4_general_ci | collation-server = utf8mb4_general_ci | ||
open-files-limit=40000 | open-files-limit=40000 | ||
</nowiki>}} | |||
Enable toku (Find and Uncomment the load module) | |||
</ | <pre>sudo nano /etc/mysql/conf.d/tokudb.cnf </pre> | ||
<pre>sudo systemctl stop mysql | <pre>sudo systemctl stop mysql | ||
Line 217: | Line 192: | ||
<pre>sudo mysql_secure_installation</pre> | <pre>sudo mysql_secure_installation</pre> | ||
<pre>mysql - | <pre>mysql -uroot -p | ||
SET GLOBAL default_storage_engine=TokuDB; | SET GLOBAL default_storage_engine=TokuDB; | ||
SET GLOBAL log_bin_trust_function_creators = 1; | SET GLOBAL log_bin_trust_function_creators = 1; | ||
CREATE USER 'asagi'@'localhost' IDENTIFIED BY 'pass'; | CREATE USER 'asagi'@'localhost' IDENTIFIED BY 'pass'; | ||
CREATE USER 'foolfuuka'@'localhost' IDENTIFIED BY 'pass'; | CREATE USER 'foolfuuka'@'localhost' IDENTIFIED BY 'pass'; | ||
CREATE DATABASE asagi DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; | CREATE DATABASE asagi DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; | ||
CREATE DATABASE foolfuuka DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; | CREATE DATABASE foolfuuka DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci; | ||
Line 228: | Line 202: | ||
GRANT ALL PRIVILEGES ON `asagi`. * TO 'foolfuuka'@'localhost'; | GRANT ALL PRIVILEGES ON `asagi`. * TO 'foolfuuka'@'localhost'; | ||
GRANT ALL PRIVILEGES ON `foolfuuka`. * TO 'foolfuuka'@'localhost'; | GRANT ALL PRIVILEGES ON `foolfuuka`. * TO 'foolfuuka'@'localhost'; | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
exit</pre> | exit</pre> | ||
Line 236: | Line 208: | ||
<pre> | <pre> | ||
sudo mkdir /var/www/foolfuuka/public/foolfuuka/boards/ | |||
sudo chown www-data:www-data /var/www/foolfuuka/public/foolfuuka/boards/ | |||
sudo chmod 777 /var/www/foolfuuka/public/foolfuuka/boards/ | |||
sudo adduser asagi | sudo adduser asagi | ||
sudo su asagi | sudo su asagi | ||
cd ~ | cd ~ | ||
git clone https://github.com/ | git clone https://github.com/oohnoitz/asagi.git optimizations | ||
cd asagi | cd asagi | ||
mvn package assembly:single | mvn package assembly:single | ||
Line 246: | Line 221: | ||
== Configure Asagi == | == Configure Asagi == | ||
<pre>nano asagi.json</pre> | <pre>cp asagi.json.example asagi.json | ||
nano asagi.json</pre> | |||
Insert the following JSON into that file: | Insert the following JSON into that file: | ||
Line 271: | Line 247: | ||
"deletedThreadsThresholdPage": 8, | "deletedThreadsThresholdPage": 8, | ||
"refreshDelay": 30, | "refreshDelay": 30, | ||
"throttleAPI": | "throttleAPI": false, | ||
"throttleURL": "a.4cdn.org", | "throttleURL": "a.4cdn.org", | ||
"throttleMillisec": 11100, | "throttleMillisec": 11100, | ||
Line 383: | Line 359: | ||
Also make sure to install imagemagick and set the path in the config to it. | Also make sure to install imagemagick and set the path in the config to it. | ||
{{Note| | {{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 == | ||
Line 394: | Line 370: | ||
<pre> | <pre> | ||
/var/lib/sphinxsearch | /var/lib/sphinxsearch | ||
</pre> | |||
=== Supplement Sphinxsearch === | |||
<pre> | |||
cd /var/run | |||
sudo mkdir sphinxsearch | |||
sudo chmod -Rf 777 sphinxsearch | |||
</pre> | </pre> | ||
Line 420: | Line 404: | ||
=== Build the indexes === | === Build the indexes === | ||
<pre>sudo indexer *_ancient --rotate | <pre>sudo indexer *_ancient --rotate</pre> | ||
sudo indexer *_main | <pre>sudo indexer *_main --rotate</pre> | ||
=== Configure Crontab === | === Configure Crontab === | ||
<pre> | <pre> | ||
sudo crontab | sudo nano /etc/crontab | ||
</pre> | </pre> | ||
<pre> | <pre> | ||
Line 433: | Line 416: | ||
@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 440: | Line 424: | ||
Then, in the admin panel, simply add the board that corresponds to the board you injected. | Then, in the admin panel, simply add the board that corresponds to the board you injected. | ||
== Extra configuration == | == Extra configuration == | ||
Line 454: | Line 436: | ||
</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 | ||