Difference between revisions of "Minecraft"

From ArchWiki
Jump to: navigation, search
m (avoid contractions to comply with Help:Style#Language_register)
(Minecraft Server: Both of the "two" AUR packages referred to the same package, so removed one and added a section for the "manual" install (as well as a "request" to delete that). Cleaned up the remaining systemd instructions.)
Line 28: Line 28:
 
==Minecraft Server==
 
==Minecraft Server==
  
There are two AUR packages for easy installation of a minecraft server.
+
===Installing the server===
For a server compatible with systemd, install {{ic|aur/minecraft-server}} and then enable the service:
+
 
 +
====From AUR====
 +
 
 +
The simplest way to install the Minecraft server on an Arch Linux system is using the {{aur|minecraft-server}} package in the [[AUR]]. This package includes a [[systemd]] service file for managing the server:
 +
 
 +
To start the server via systemd:
 +
$ systemctl start minecraftd
 +
 
 +
To start the server automatically during boot:
 
  $ systemctl enable minecraftd
 
  $ systemctl enable minecraftd
$ systemctl start minecraftd
 
* Monitor the minecraft server by running the below command as root:
 
# screen -r
 
(Remember that one can exit screen sessions with {{ic|^A,D}})
 
  
{{Note|The first time you run this, /srv/minecraft/eula.txt will be created. You will need to edit this file to state that you have agreed to the EULA to run the server.}}
+
See [[systemd]] for more examples on how to use systemd to manage the server.
 +
 
 +
The {{aur|minecraft-server}} systemd script starts the server in a [[screen]] session. You can monitor the Minecraft server by running this command:
 +
# sudo screen -r
 +
(Remember that you can exit screen sessions with {{ic|^A,D}}.)
 +
 
 +
{{Note|The first time you run the server, {{ic|/srv/minecraft/eula.txt}} will be created. You will need to edit this file to state that you have agreed to the EULA to run the server.}}
 +
 
 +
{{Note|This creates a user called Minecraft with a home directory at {{ic|/srv/minecraft}}. Add your user to the {{ic|minecraft}} group and add group write permission to the directory {{ic|/srv/minecraft}} to modify Minecraft settings.}}
  
{{Note|This creates a user called minecraft with a home directory at {{ic|/srv/minecraft}}. Add your user to the {{ic|minecraft}} group and add group write permission to the directory /srv/minecraft to modify minecraft settings.}}
+
{{Warning|Make sure that all files in the {{ic|/srv/minecraft}} directory are either owned by user Minecraft, or have r/w permissions for all three groups (user,group,other), otherwise server will error out.}}
  
{{Warning|Make sure that all files in the {{ic|/srv/minecraft}} directory are either owned by user minecraft, or have r/w permissions for all three groups (user,group,other), otherwise server will error out.}}
+
====Manual install====
  
=== For a server that uses the legacy rc scripts ===
+
{{Deletion|Apart from the Java install, there's nothing Arch Linux specific in this section and people really should rather install these things via packages. If they really want to install/run it by hand, there are hundreds of tutorials on how to do this out there already, including on the "official" Minecraft Wiki.}}
Install {{ic|aur/minecraft-server}}
 
  
 
You can also run a dedicated Minecraft server:
 
You can also run a dedicated Minecraft server:

Revision as of 12:32, 28 April 2015

Installation

minecraftAUR is available in the AUR. This package includes the official game launcher plus a script to launch it.

Otherwise, just get the launcher on the official download site.

Running Minecraft

If you installed Minecraft from the AUR, you can use the included script:

$ minecraft

Otherwise, you will need to manually launch Minecraft:

$ java -jar Minecraft.jar

Extras

There are several programs and editors which can make your Minecraft experience a little easier to navigate. The most common of these programs are map generators. Using one of these programs will allow you to load up a Minecraft world file and render it as a 2D image, providing you with a top-down map of the world.

AMIDST

AMIDST (Advanced Minecraft Interface and Data/Structure Tracking) is a program that aids in the process of finding structures, biomes, and players in Minecraft worlds. It can draw the biomes of a world out and show where points of interest are likely to be by either giving it a seed, telling it to make a random seed, or having it read the seed from an existing world (in which case it can also show where players in that world are). amidstAUR is available in the AUR.

Mapcrafter

Mapcrafter is a high performance Minecraft map renderer which renders worlds to maps with an 3D-isometric perspective. You can view these maps in any webbrowser and you can host them with a webserver for example for the players of your server. Mapcrafter has a simple configuration file format to specify worlds to render, different rendermodes such as day/night/cave and can also render worlds from different rotations. mapcrafter-gitAUR is available in the AUR.

Minutor

Minutor is described as a minimalistic map generator for Minecraft. Do not let this mislead you, it generates maps of existing worlds, not the other way around. You are provided with a simple GTK based interface for viewing your world. Several rendering modes are available, as well as custom coloring modes and the ability to slice through z-levels. minutorAUR is available in the AUR.

Minecraft Server

Installing the server

From AUR

The simplest way to install the Minecraft server on an Arch Linux system is using the minecraft-serverAUR package in the AUR. This package includes a systemd service file for managing the server:

To start the server via systemd:

$ systemctl start minecraftd

To start the server automatically during boot:

$ systemctl enable minecraftd

See systemd for more examples on how to use systemd to manage the server.

The minecraft-serverAUR systemd script starts the server in a screen session. You can monitor the Minecraft server by running this command:

# sudo screen -r

(Remember that you can exit screen sessions with ^A,D.)

Note: The first time you run the server, /srv/minecraft/eula.txt will be created. You will need to edit this file to state that you have agreed to the EULA to run the server.
Note: This creates a user called Minecraft with a home directory at /srv/minecraft. Add your user to the minecraft group and add group write permission to the directory /srv/minecraft to modify Minecraft settings.
Warning: Make sure that all files in the /srv/minecraft directory are either owned by user Minecraft, or have r/w permissions for all three groups (user,group,other), otherwise server will error out.

Manual install

Tango-edit-cut.pngThis section is being considered for removal.Tango-edit-cut.png

Reason: Apart from the Java install, there's nothing Arch Linux specific in this section and people really should rather install these things via packages. If they really want to install/run it by hand, there are hundreds of tutorials on how to do this out there already, including on the "official" Minecraft Wiki. (Discuss in Talk:Minecraft#)

You can also run a dedicated Minecraft server:

  • Follow the steps above to install Java
  • Download the multiplayer server from the Minecraft site
  • Run the server:
$ java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui

(You can sub the -Xmx and -Xms values for the amount of memory you want your server to use. A good rule of thumb is one GB per ten users.)

  • To configure the server, take a look at this wiki page.

Extras

  • Establishing a Minecraft-specific user is recommended for security. By running Minecraft under an unprivileged user account, anyone who successfully exploits your Minecraft server will only get access to that user account, and not yours.
  • To leave the server running unattended, look into tmux or screen.
  • You may wish to modify your server, to provide additional features:
    • Server Wrappers are one way to add administrative capabilities.
    • Bukkit is a powerful modding API, with a wide variety of plugins available.
      • If installing the Dynmap plugin, you will need to install fontconfig and libcups to get it to work.
  • You might even set up a cron job with a mapper to generate periodic maps of your world.
  • ...or you could use rsync to perform routine backups.

Useful links