User Tools

Site Tools


user:jdavis34:portfolio:hpc0project3

Project: Creating a MineCraft Server

A project for HPC by Josh Davis during the Spring 2012.

Objectives

The objective here is obvious, to have a minecraft server installed correctly so that it runs and users are able to venture into their own world and create awesomeness.

Prerequisites

These are not required, but also not limited to:

  • Have a working machine with a Linux based operating system installed.
  • Know how to navigate within Linux so that required files are properly installed.
  • Possibly if wanted you may have a working VM on the machine your working on to install this on.
  • working Java on the machine you intend to install on ( will over this bellow)

Background

Beginning this class it was apparent the amount gamers attending. Being a game the majority of students and even the teacher enjoyed playing it was almost a obligation of us to establish this before the end of the semester came. For those of you who do not know what minecraft is, it can be looked at as digital legos, were the limits to what you create are only limited to your imagination.

Scope

Procedure Installation

1. First thing is first, assuming your logged into you machine ready to install this, your going to want to install Java if you have not done so previously.

a. To do this you wanna make sure to either get it off of the lab46 server, or if unable to access this due to location you can do an apt-get.

b. Your going to want to make sure that your source file contains the right information to install it. Locate the sources.list:

 /etc/apt/sources.list.

Once you are in this file make sure to add:

 deb http://ftp.uk.debian.org/debian/ squeeze main non-free

c. Update your sources list (as root):

 apt-get update

d. Install Java:

 apt-get install sun-java6-jre
2. This step you want to create a directory for MineCraft and download the server file.

a. It doesn't really matter where you put this, for this project we will keep it simple and off the root:

 cd /

b. Now to make the directory, name it what you please but for ease of remembering where it is going with “minecraft”

 mkdir minecraft
 cd minecraft

c. Now to download the actual server file (Note this is a Linux based file not Windows… so if you went to the site to get the link make sure your not grabbing the Windows .exe):

 wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar?
3. Now I have it what do I do with it?

a. First you wanna check the amount of available RAM it has to run:

 free -m
minty@minty-VirtualBox ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:          2008        828       1180          0         68        415
-/+ buffers/cache:        343       1664
Swap:            0          0          0

The important number to pay attention here is the 1664 and to not exceed that but allow the system to have RAM left over.

b. Now is for the actual launching of the server and understanding the parameters.

 java -Xms32M -Xmx1024M -jar minecraft_server.jar nogui

-Xms32M - This is the amount of RAM allowed for start up of the server.

-Xmx1024M - This is the cap at which it will allocate if more memory is needed.

This will result in a little slowdown whenever the allocation is done. So if you have enough RAM just give it that much on start up like so:

  java **-Xms1024M** -Xmx1024M -jar minecraft_server.jar nogui
  

Procedure Connecting

1. First step is to launch MineCraft

a. Lanuch MineCraft.exe on your PC if you do not have it go buy it and download it:

http://www.minecraft.net/download

b. Select Multi-player

c. Then select add server.

d. Now you wanna configure the Host IP. If your on the same network use the IP of the PC. If your server is hosted on a separate network you want the forward facing IP of the router to which the world sees you. expecting your on a Windows based PC playing you would wanna run /ipconfig all and generally use the address that does not start with a 192.168.1. (If you have trouble connecting make sure your router and firewall settings are correct and that the proper ports are forwarded to your server. Notes**

  • Unless you set a static IP for the computer that is hosting the game, the internal IP address can change. This affects port forwarding rules, and can make them invalid.
  • You may also search “my ip address” on Google and it will show your IP address.
  • Users within your network can connect with your internal IP address.
  • If you are playing on the same machine on which the server is running, select the “Multiplayer” option in the game client, click direct connect, and then type in “localhost” instead of an IP address.

Misc Stuff Regarding Administration

There is a good list of things listed here that you can use. I would write them up in here but there so well documented here there is no point in redundancy.
Here is another good list Item ID's that can be used to give yourself stuff

http://www.minecraftwiki.net/wiki/Data_values (your going to need to give yourself OP to give yourself items.)

Reflection

References

user/jdavis34/portfolio/hpc0project3.txt · Last modified: 2012/05/01 19:03 by jdavis34