From af24e58a08a5aa705b5ab9b828dc068593d508ae Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Sun, 19 Jul 2020 02:27:35 +0000 Subject: [PATCH] Add multicraft gentoo article --- _posts/2020-07-19-multicraft-php-gentoo.md | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 _posts/2020-07-19-multicraft-php-gentoo.md diff --git a/_posts/2020-07-19-multicraft-php-gentoo.md b/_posts/2020-07-19-multicraft-php-gentoo.md new file mode 100644 index 0000000..f8cc7f0 --- /dev/null +++ b/_posts/2020-07-19-multicraft-php-gentoo.md @@ -0,0 +1,99 @@ +--- +title: "Installing MultiCraft on Gentoo Linux" +layout: post +--- + +In a very odd combination of requirements, +I needed to install [MultiCraft](https://multicraft.org) on a Gentoo Linux system. +The PHP `USE` flags are important so you don't have to recompile it three times like I did. + +Here are some useful tips I came across: + +### PHP `USE` flags + +In `/etc/portage/package.use/php` I placed the following line: + +
+dev-lang/php cgi mysql mysqli fpm pdo gd truetype
+
+ +This should give you enough for a mysql backended MultiCraft installation. +The `cgi` option may not be required as `fpm` stands for *FastCGI Process Managment*. +I don't know for sure though. + +### Paper + +This will grab the latest version of the Paper jar file using [YivesMirror](https://yivesmirror.com). +I'm not sure how reputable it is, +but my buddy who works with this stuff more often than me seemed to recognize it. + +
+## See the default craftbukkit.jar.conf for a detailed documentation of the
+## format of this file.
+[config]
+name = Paper 1.16.1 Latest
+source = https://yivesmirror.com/files/paper/Paper-1.16.1-latest.jar
+category = Mods
+
+[encoding]
+#encode = system
+#decode = system
+#fileEncoding = latin-1
+
+[start]
+command = "{JAVA}" -Xmx{MAX_MEMORY}M -Xms{START_MEMORY}M -XX:MaxPermSize=128M -Djline.terminal=jline.UnsupportedTerminal -jar "{JAR}" nogui
+
+ +### Other Tips + +Do not use the option to setup a separate user for each server. +This completely stalled any work getting done with a ton of 'permission denied' errors. + +#### Security + +If the panel is in the root directory of your NGINX web server, +use the following in your server block to deny access to the `/protected` directory. + +
+location /protected {
+  deny all;
+  return 404;
+}
+
+ +##### MySQL + +It is always good practice to separate privileges. +The MultiCraft daemon should have one SQL login, +with one database allocated to it. +The MultiCraft panel should have a separate SQL login, +with a separate database allocated to it. + +You can do this with the following commands in your MySQL prompt: + +
+sql> CREATE DATABASE multicraft_daemon_database;
+Query OK, 0 rows affected (0.01 sec)
+
+sql> CREATE DATABASE multicraft_panel_database;
+Query OK, 0 rows affected (0.01 sec)
+
+sql> CREATE USER 'muilticraft_daemon'@'localhost' IDENTIFIED BY 'strong password here';
+Query OK, 0 rows affected (0.01 sec)
+
+sql> CREATE USER 'multicraft_panel'@'localhost' IDENTIFIED BY 'different strong password here';
+Query OK, 0 rows affected (0.01 sec)
+
+sql> GRANT ALL PRIVILEGES ON multicraft_daemon_database . * TO 'multicraft_daemon'@'localhost';
+Query OK, 0 rows affected (0.01 sec)
+
+sql> GRANT ALL PRIVILEGES ON multicraft_panel_database . * TO 'mutlicraft_panel'@'localhost';
+Query OK, 0 rows affected (0.01 sec)
+
+
+ +During setup, make sure the proper credentials are used for each step. +Database 1 is the panel database. +Database 2 is the daemon database. + +Happy hacking :)