View source for Minecraft Install
Jump to:
navigation
,
search
[[Category:Linux]] [[Category:Minecraft]] [[File:mc.png|thumb|350px]] '''Copy the commands within the code boxes and paste/run them in Putty''' First you will need to connect to your server using Putty (SSH) in order to do this install See - [[connecting_to_your_server|Connecting to your server]] == 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 == 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 == 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 nogui</pre> == 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 == 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 == Once you have a session running you may want to recconnect to it as the server may crash, or you may want to turn it off or restart etc... First you will need to find what sessions are running & their process id <pre>screen -ls</pre> [[File:puttyscreen.png|350px]] As you see in my screenshot, i have 2 Screen Sessions running, if i want to connect to 2047Servers session i would use the numbers on the left <pre>screen -r 7354</pre> Note Change the ID numbers to what your ones are
Return to
Minecraft Install
.
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
Actions
Search
Navigation
Main page
Recent changes
Random page
Help
Categories
Linux
Windows
Source Based Servers
HLDS Based Servers
Minecraft
2047Servers Control Panel