You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
4.6 KiB

2 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Installing MultiCraft on Gentoo Linux | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Tait Hoyem">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<div id="wrapper">
<header>
<h1>tait.tech</h1>
<nav>
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="/ideas/" class="nav-link" >Ideas</a>
<a href="/links/" class="nav-link" >Links</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
</nav>
</header>
<main>
<article>
<header>
<h1 class="post-title">Installing MultiCraft on Gentoo Linux</h1>
<time datetime="20-07-19" class="post-date">Sunday, July 19 2020</time>
</header>
<hr>
<p>In a very odd combination of requirements,
I needed to install <a href="https://multicraft.org">MultiCraft</a> on a Gentoo Linux system.
The PHP <code class="language-plaintext highlighter-rouge">USE</code> flags are important so you dont have to recompile it three times like I did.</p>
<p>Here are some useful tips I came across:</p>
<h3 id="php-use-flags">PHP <code class="language-plaintext highlighter-rouge">USE</code> flags</h3>
<p>In <code class="language-plaintext highlighter-rouge">/etc/portage/package.use/php</code> I placed the following line:</p>
<pre class="terminal">
dev-lang/php cgi mysql mysqli fpm pdo gd truetype
</pre>
<p>This should give you enough for a mysql backended MultiCraft installation.
The <code class="language-plaintext highlighter-rouge">cgi</code> option may not be required as <code class="language-plaintext highlighter-rouge">fpm</code> stands for <em>FastCGI Process Managment</em>.
I dont know for sure though.</p>
<h3 id="paper">Paper</h3>
<p>This will grab the latest version of the Paper jar file using <a href="https://yivesmirror.com">YivesMirror</a>.
Im not sure how reputable it is,
but my buddy who works with this stuff more often than me seemed to recognize it.</p>
<pre class="terminal">
## 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
</pre>
<h3 id="other-tips">Other Tips</h3>
<p>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.</p>
<h4 id="security">Security</h4>
<p>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 <code class="language-plaintext highlighter-rouge">/protected</code> directory.</p>
<pre class="terminal">
location /protected {
deny all;
return 404;
}
</pre>
<h5 id="mysql">MySQL</h5>
<p>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.</p>
<p>You can do this with the following commands in your MySQL prompt:</p>
<pre class="terminal">
sql&gt; CREATE DATABASE multicraft_daemon_database;
Query OK, 0 rows affected (0.01 sec)
sql&gt; CREATE DATABASE multicraft_panel_database;
Query OK, 0 rows affected (0.01 sec)
sql&gt; CREATE USER 'muilticraft_daemon'@'localhost' IDENTIFIED BY 'strong password here';
Query OK, 0 rows affected (0.01 sec)
sql&gt; CREATE USER 'multicraft_panel'@'localhost' IDENTIFIED BY 'different strong password here';
Query OK, 0 rows affected (0.01 sec)
sql&gt; GRANT ALL PRIVILEGES ON multicraft_daemon_database . * TO 'multicraft_daemon'@'localhost';
Query OK, 0 rows affected (0.01 sec)
sql&gt; GRANT ALL PRIVILEGES ON multicraft_panel_database . * TO 'mutlicraft_panel'@'localhost';
Query OK, 0 rows affected (0.01 sec)
</pre>
<p>During setup, make sure the proper credentials are used for each step.
Database 1 is the panel database.
Database 2 is the daemon database.</p>
<p>Happy hacking :)</p>
</article>
</main>
<hr>
<footer>
This page will be mirrored on <a href="https://beta.tait.tech/2020/07/19/multicraft-php-gentoo/">beta.tait.tech</a>.
</footer>
</div>
</body>
</html>