From ed3020b9b779909b4999477a5e9da2585b2231b9 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Sun, 12 Aug 2012 03:47:00 +0100 Subject: [PATCH] Update installation guide with script + make it simpler --- docs/installation.md | 124 ++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 78 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 35435f6..431b253 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -8,128 +8,96 @@ docsitem: installation Installation ============ -This script uses the following tools: **screen**, **rsync**, **zip** +Install MSM on a Debian server (Ubuntu etc.) by pasting this line in your terminal: -*There may be a script to do this in the future, but its quite easy to do yourself, and I prefer to place things manually whenever possible so I know what's going on myself.* + wget -qO- http://git.io/KxE3HQ | sh -## Let's Make This Easy +Have a read of the script [http://git.io/KxE3HQ](http://git.io/KxE3HQ) it it calms your nerves. Or, install MSM manually: -1. Create a tempory variable in your terminal to store the root download URL: +Manual Installation +------------------- - export MSM_URL="https://raw.github.com/marcuswhybrow/minecraft-server-manager/latest/" +1. This script uses the following tools: **screen**, **rsync**, **zip**. Let's install them: -2. Verify the variable now contains that URL by printing it: + sudo apt-get update + sudo apt-get install screen rsycn zip - echo $MSM_URL +2. Download MSM's default configuraiton file, then **read through it** and change anything you want. Be sure to carry any changes you make forwards through this guide. -## Install The Configuration File and Create Directories + sudo wget http://git.io/6eiCSg -O /etc/msm.conf -1. Download the configuration file and place it in the `/etc` directory: +3. Create the directories MSM needs: - sudo wget ${MSM_URL}msm.conf -O /etc/msm.conf - -2. Edit `/etc/msm.conf`, have a read through and make any adjustments, the comments will help you out. - -3. Create and give permissions to directories used by MSM, use the values specified in `/etc/msm.conf` if you change them: - - With the default configuration, all files are stored within the `/opt/msm` directory. + First create the folder where MSM will store server, jars, and other files: sudo mkdir /opt/msm sudo chown minecraft /opt/msm sudo chmod -R 775 /opt/msm - Also be sure to create the directory for ram storage if your system supports ram disk: + If you want to store your world folders in RAM for a performance boost, create this directory in ramdisk (`/dev/shm` is the default in Ubuntu): sudo mkdir /dev/shm/msm sudo chown minecraft /dev/shm/msm sudo chmod -R 775 /dev/shm/msm -## Install The Script +4. Download the MSM script and place it in `/etc/init.d`: -1. Download the Minecraft Server Manager script (called msm) placing it in the `/etc/init.d` directory: + sudo wget http://git.io/J1GAxA -O /etc/init.d/msm - sudo wget ${MSM_URL}init/msm -O /etc/init.d/msm - -2. Give the script the required permissions: +5. Set script permissions, and integrate script with startup/shutdown: sudo chmod 755 /etc/init.d/msm - -3. Update the rc.d links, this allows–for example–servers to be started at system startup automatically: - sudo update-rc.d msm defaults - For Suse operating systems use the command: `sudo /sbin/chkconfig --set msm on` instead. - -## Configure Cron (Scheduled Actions) - -1. Download the cron file and place it in `/etc/cron.d` with the name `msm`: - - sudo wget ${MSM_URL}cron/msm -O /etc/cron.d/msm - -2. If you changed `SERVER_USER` in `/etc/msm.conf` to something other than "minecraft", edit `/etc/cron.d/msm` and change the occurrences of the username "minecraft" on each line, to the username you chose. - -*See the [Using Cron Page][cron] if you are unfamiliar with cron, or for an explanation of how cron is being used in this case.* - - -## Enable Bash Tab Completion Support - -1. Download the bash_completion file and place it in `/etc/bash_completion.d` with the name `msm`: - - sudo wget ${MSM_URL}bash_completion/msm -O /etc/bash_completion.d/msm - -2. Ensure the following lines are uncommented in your `~/.bashrc` file or if you don't have that, find it in `/etc/bash.bashrc` instead: - - if [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi - -3. Bash completion will now be active when you login or if you want it right away do: - - source /etc/bash_completion.d/msm - -Now whenever you are stuck for what comes next in a command, you can press tab to auto-complete options. - -## Simplify Command - -1. Place a symbolic link to the script in `/usr/local/bin` +6. Create a shortcut so we can use just type `msm`: sudo ln -s /etc/init.d/msm /usr/local/bin/msm -This allows you to do `msm bla bla` instead of the slightly longer `/etc/init.d/msm bla bla`. +7. Ask MSM to update, getting the latest files: -### Setup A Server + sudo msm update -1. If you have an existing server, making sure it's stopped you should move it to the server store (**WARNING Not yet supported!**). This performs a straight move, but also organises (if present) the jar file, and moves existing worlds to the "world storage" directory: +8. Setup MSM's included cron script for sheduled tasks: - sudo msm server transition /path/to/existing/server/dir + sudo wget http://git.io/pczolg -O /etc/cron.d/msm - or if you are starting from scratch, first create a jar group which also downloads the latest version: + If you understand cron, give it a read and alter the timings to your liking. + +9. Create a jar group to manage current and future Minecraft versions: sudo msm jargroup create minecraft https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar - or if you want to run a Bukkit server: - - sudo msm jargroup create craftbukkit http://dl.bukkit.org/latest-rb/craftbukkit.jar - - Remember, you can have as many jar groups as you like, and call them whatever you want. - - Next create a new server, and choose the jargroup you just made: +10. Create a new server, and tell it to use the latest of those Minecraft jars: sudo msm server create sudo msm jar minecraft -2. Start your server: +11. Start your new server: + + Before you start make sure to let MSM know which version of Minecraft you are running by adding the following line to `/opt/msm/servers//server.properties` + + msm-version=minecraft/1.3.1 + + The available strings are currently: + + * `minecraft/1.2.0` and above. + * `craftbukkit/1.2.0` and above. + + See [versioning/versions.txt][versions] for the up to the minute list. + + Once that clunky step it out the way (I'm working on making it more transparent) let's start the server: sudo msm start - Servers will create new worlds in the server directory instead of directly in the `worldstorage` directory. Once a new world is created you unfortunately have to stop the server and move the world into (and probably create) the `worldstorage` directory yourself. The `worldstorage` directory should be created in the server directory. Follow issue [#26][#26] for changes to this area. +[versions]: https://github.com/marcuswhybrow/minecraft-server-manager/blob/latest/versioning/versions.txt -## Check Out The Commands +Check Out The Commands +---------------------- -If stuck, you can always type `/etc/init.d/msm help` for a quick list of all commands, or if you want to know more about a command read the [command documentation][commands]. +If stuck, you can always type `msm help` for a quick list of all commands, or if you want to know more about a command read the [command documentation][commands]. -[config]: {{ site.baseurl }}docs/configuration/ -[cron]: {{ site.baseurl }}docs/concepts/cron.html -[commands]: {{ site.baseurl }}docs/commands/ +[config]: {{ site.baseurl }}/docs/configuration/ +[cron]: {{ site.baseurl }}/docs/concepts/cron.html +[commands]: {{ site.baseurl }}/docs/commands/ [#26]: https://github.com/marcuswhybrow/minecraft-server-manager/issues/26 \ No newline at end of file