Minecraft Install
From 2047Servers Support
(Created page with "Category:Linux Category:Minecraft 350px '''Copy the commands within the code boxes and paste/run them in Putty''' First you will need to conne...") |
|||
| Line 9: | Line 9: | ||
== Java Check/Install == | == Java Check/Install == | ||
| + | |||
| + | Because Minecraft is built using Java, your Server will need to be able to run Java applications (.jar files) | ||
| + | |||
| + | Checking what version of Java/JRE you have | ||
| + | |||
| + | <pre>java -version</pre> | ||
| + | |||
| + | Checking what versions of Java is on your server | ||
| + | |||
| + | <pre>locate bin/java</pre> | ||
| + | |||
| + | If you have any version of Java installed, that is great (The newer the better) 6+ is best | ||
| + | |||
| + | If you need to install java/jre see links below | ||
| + | |||
| + | You can visit the [http://www.java.com/en/download/linux_manual.jsp/ Java Linux Download Page] | ||
| + | |||
| + | Then if you follow the instructions to the one you downloaded, following this tutorial - [http://www.java.com/en/download/help/linux_install.xml#rpm Java Linux Install Tutorial] | ||
| + | |||
| + | Be warned Java applications are very resource hungry and can eat up allot of RAM/CPU, that is why it is exspensive to host Minecraft Servers. | ||
| + | |||
| + | |||
== Making a folder for the server == | == Making a folder for the server == | ||
| + | |||
| + | You will need to make a folder somewhere that the server files will be installed (If you have done this, skip this part) | ||
| + | |||
| + | The most common or best place to put most of your files on a server is in the /home folder | ||
| + | |||
| + | Change Directory to /home | ||
| + | |||
| + | <pre>cd /home</pre> | ||
| + | |||
| + | Now make a folder e.g. MC_Server Note to change the "MC_Server" to the servers name or folder name | ||
| + | |||
| + | <pre>mkdir MC_Server</pre> | ||
| + | |||
| + | Now go into that folder | ||
| + | |||
| + | <pre>cd MC_Server</pre> | ||
| + | |||
| + | Now you have a new / clean folder you can being to download & install the files for the server. | ||
| + | |||
| + | |||
== Downloading Minecraft Server == | == Downloading Minecraft Server == | ||
| + | |||
| + | First you will need to download the Linux Minecraft Server jar file | ||
| + | |||
| + | You can find the latest download link on the Minecraft Website - http://www.minecraft.net/download | ||
| + | |||
| + | <pre>wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar</pre> | ||
| + | |||
| + | (^ Check that the link is correct via their website) | ||
| + | |||
| + | After downloading you will need to run the server for the first time, this will create the core files & a server world. | ||
| + | |||
| + | <pre>java -Xms512M -Xmx1G -jar minecraft_server.jar</pre> | ||
== Basic Config == | == Basic Config == | ||
| + | |||
| + | After starting up your Minecraft Server for the first time it will create all the basic config files that you can edit, the main one is server.properties | ||
| + | |||
| + | <pre>nano server.properties</pre> | ||
| + | |||
| + | In this file you can change things like server name, max players, server port, MOTD, mobs on or off & many more. | ||
| + | |||
| + | You will also want to add people to the "ops.txt" this file is a list of usernames that will be your server Operators "Ops" (Admin rights) people listed in this file will have access to all of the server commands like kick, give item, ban, add people to op (See full list - http://www.minecraftwiki.net/wiki/Server_Commands) | ||
| + | |||
| + | If you are making your server private (only allow a list of people to join it, you will have to set the "white-list=true" option in server.properties & then add the list of usernames to the white-list.txt file in the servers folder | ||
== Running Minecraft Server via Screen == | == Running Minecraft Server via Screen == | ||
| + | |||
| + | When you go to run the game server you want it to run in the background even when you disconnect from Putty, you will find if you just leave it running & close Putty you will kill the server (kills any processes you left running) | ||
| + | |||
| + | The way you keep a process running while you disconnect, is by making a session (using screen) Note to change the "MC_Server" to the servers name or folder name | ||
| + | |||
| + | <pre>screen -S MC_Server</pre> | ||
| + | |||
| + | Now you will notice you are on a new session with a clean view of Putty | ||
| + | |||
| + | <pre>java -Xms512M -Xmx1G -jar minecraft_server.jar</pre> | ||
| + | |||
| + | You can change the values in this command line (Xms = Minimum RAM to use & Xmx is Max RAM to use) Change these settings to what you want, as long as your server has the right space to run it e.g. don't set the max ram to more than the servers ram otherwise it may crash, lag or be unstable | ||
| + | |||
| + | If all done right your server should start up fine, load the map & tell you what ip/port the server is listening on | ||
| + | |||
== Reconnecting to the process / session == | == Reconnecting to the process / session == | ||