OS X Minecraft server setup: Difference between revisions

From munkjensen.net/wiki
Line 93: Line 93:
== About the YAMS scripts and files. ==
== About the YAMS scripts and files. ==
<blockquote>
<blockquote>
=== admin_accept_eula ===
This script
=== admin_chk_version ===
This script
=== admin_ejectramdisk ===
This script
=== admin_launch_on_ramdisk ===
This script
=== admin_quit_read_command-fifo ===
This script
=== admin_read_command-fifo ===
This script
=== admin_stop_on_ramdisk ===
This script will stop the server gracefully if the following conditions are met:
* Server is running on RAM disk
=== admin_update_server ===
=== admin_update_server ===


Line 100: Line 130:
* RAM disk must be ejected. See admin_eject_ramdisk
* RAM disk must be ejected. See admin_eject_ramdisk


=== admin_stop_on_ramdisk ===
=== admin_wipe_everything ===
 
This script
 
=== backup_exclude_list
 
=== backup_ramdisk ===
 
This script
 
=== cmd_list ===
 
This script
 
=== cmd_raw ===
 
This script
 
=== cmd_say ===
 
This script
 
=== cmd_showhelp ===
 
This script
 
=== cmd_whitelist-add ===
 
This script
 
=== cmd_whitelist-delete ===
 
This script
 
=== cmd_whitelist-list ===
 
This script
 
=== cmd_xp2player ===
 
This script


This script will stop the server gracefully if the following conditions are met:
=== net.minecraft.ramdisk.server.backup


* Server is running on RAM disk
=== server-icon.png


admin_accept_eula*
=== server.properties
admin_chk_version*
admin_ejectramdisk*
admin_launch_on_ramdisk*
admin_quit_read_command-fifo*
admin_read_command-fifo*
admin_stop_on_ramdisk*
admin_update_server*
admin_wipe_everything
backup_exclude_list
backup_ramdisk*
cmd_list*
cmd_raw*
cmd_say*
cmd_showhelp*
cmd_whitelist-add*
cmd_whitelist-delete*
cmd_whitelist-list*
cmd_xp2player*
net.minecraft.ramdisk.server.backup
server-icon.png
server.properties





Revision as of 11:18, 8 November 2015

Preface.

This page will describe how i run my Minecraft servers. All scripts i use will soon be available at my BitBucket repo. I just need to finish up the last few details before releasing my first version ;-)

Some of my inspiration was found at electricmonk.nl and minecraft.gamepedia.com.

The guide to YAMS.

Install Macports.

Installation is neatly described at the Macports install page.

Install tmux.

Use macPorts for the install process. It can be done like this at the time of writing they page.

  • sudo port install tmux
  • type in your password, and you should get something similar to this:
Password:
--->  Computing dependencies for tmux
--->  Dependencies to be installed: libevent
--->  Fetching archive for libevent
--->  Attempting to fetch libevent-2.0.22_1.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/libevent
--->  Attempting to fetch libevent-2.0.22_1.darwin_15.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/libevent
--->  Attempting to fetch libevent-2.0.22_1.darwin_15.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/libevent
--->  Fetching distfiles for libevent
--->  Attempting to fetch libevent-2.0.22-stable.tar.gz from http://skylink.dl.sourceforge.net/levent/libevent/libevent-2.0
--->  Verifying checksums for libevent                                               
--->  Extracting libevent
--->  Applying patches to libevent
--->  Configuring libevent
--->  Building libevent
--->  Staging libevent into destroot
--->  Installing libevent @2.0.22_1
--->  Activating libevent @2.0.22_1
--->  Cleaning libevent
--->  Fetching archive for tmux
--->  Attempting to fetch tmux-2.1_0.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/tmux
--->  Attempting to fetch tmux-2.1_0.darwin_15.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/tmux
--->  Attempting to fetch tmux-2.1_0.darwin_15.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/tmux
--->  Fetching distfiles for tmux
--->  Attempting to fetch tmux-2.1.tar.gz from http://lil.fr.distfiles.macports.org/tmux
--->  Verifying checksums for tmux
--->  Extracting tmux
--->  Configuring tmux
--->  Building tmux
--->  Staging tmux into destroot
--->  Installing tmux @2.1_0
--->  Activating tmux @2.1_0

If you want integration with system pasteboard consider installing port tmux-pasteboard as well

--->  Cleaning tmux
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.

User with limited privileges.

This way of creating a new user for your Minecraft Server IS complicated... but necessary if you want to run your Minecraft Server as secure as possible.
The login to GUI, makes it possible to run scheduled tasks using OS X launchd / launchctl ;-)

  1. Do it like this, but After "append Groups/_minecraft GroupMembership _minecraft"
    execute the ddcl command  passed /Users/_minecraft "YourTemporaryPassword"
  2. Exit dscl
  3. Stop following the guide when you get to "You might want something like this to prevent the user from showing up in the login dropdown:".
  4. Log out of OS X
  5. Log in as "_minecraft". Skip everything related to the first userlogin on the GUI.
  6. Log out.
  7. Log in as your normal user.
  8. Continue the user creation from "You might want something like this to prevent the user from showing up in the login dropdown:"
  9. STOP completely when you reach "Creating the user home". The rest is covered here after :-)


Finish up by deleting the following obsolete files and folders.

  1. cd ../_minecraft/
  2. sudo rm -R Desktop Documents Downloads Movies Music Pictures

YAMS...

  1. Change to the new user : sudo su - _minecraft
  2. Download the sourcecode like this : curl -kLOs https://bitbucket.org/fmjensen/yams
  3. unzip the scripts : unzip yams-<version>.zip
  4. Change to the directory containing the scripts : cd yams-<version>
  5. "Update" your server : ./admin_update_server
  6. READ the output from the script you just ran, and ACT upon the information ;-)

About the YAMS scripts and files.

admin_accept_eula

This script

admin_chk_version

This script

admin_ejectramdisk

This script

admin_launch_on_ramdisk

This script

admin_quit_read_command-fifo

This script

admin_read_command-fifo

This script

admin_stop_on_ramdisk

This script will stop the server gracefully if the following conditions are met:

  • Server is running on RAM disk

admin_update_server

This script can update the server if the following requirements are met:

  • Server must not be running.
  • RAM disk must be ejected. See admin_eject_ramdisk

admin_wipe_everything

This script

=== backup_exclude_list

backup_ramdisk

This script

cmd_list

This script

cmd_raw

This script

cmd_say

This script

cmd_showhelp

This script

cmd_whitelist-add

This script

cmd_whitelist-delete

This script

cmd_whitelist-list

This script

cmd_xp2player

This script

=== net.minecraft.ramdisk.server.backup

=== server-icon.png

=== server.properties


Personalize your server.

TBD