I figured out how to make the minecraft server run on the x86 architecture NAS. It's actually quite easy to do, considering I have absolutely no knowledge of the Linux system to begin with, it only took me 3 days to figure everything out. I will not post all the things that didn't work to not confuse anyone, so here we go:
Here's what you need:
- minecraft_server.jar
JRE QPKG
Optware QPKG
Putty
First of all, you need to install the Java Runtime Environment QPKG and the Optware IPKG. On my system, installing the QPKGs worked like a charm.
Next, download the minecraft_server.jar from http://www.minecraft.net and make a new share on your server (using the standard webadmin interface) called
- Code: Select all
minecraft_server
and copy the minecraft_server.jar into that folder. If you have already run a server and created your own world, the files appear in a subfolder (usually called "world") of where the server was run and you can copy that to the new locationif you wish, but can do that later after making sure the server runs.
Next, you need to start putty and connect to your machine and do the following:
- Code: Select all
ipkg install screen
this will install "screen", which is a small programm that allows you to close putty yet still keep the process you started running, so you can turn your PC off while the server keeps running.
The next thing we need to do is check whether the environment variable path is correct.
- Code: Select all
echo $PATH
should produce a lot of bin and sbin folders, but also a reference to some JRE folder, in my case that is /share/MD0_DATA/.qpkg/jre/bin. This wasn't set by the JRE QPKG for some reason, so I had to add it manually:
- Code: Select all
export PATH=/share/MD0_DATA/.qpkg/JRE/jre/bin:$PATH
Alright, almost ready! If you now check the PATH again with echo $PATH, it should include our addition. Unfortunately, I haven't figured out yet how to set this automatically after each reboot, but doing it manually works fine as well. Just to be on the safe side, I added the minecraft server path to PATH as well:
- Code: Select all
export PATH=/share/minecraft_server:$PATH
I don't think it's necessary, but o well. You can now check whether the path to java has been saved by typing
- Code: Select all
java -version
Finally, we now start the server for the first time:
- Code: Select all
cd /share/minecraft_server
and then
- Code: Select all
screen -S minecraft java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
And voilà, here it is! You can close putty now and the server will keep running.
When you want to stop the server and have closed the putty window, just open a new one, logon and type
- Code: Select all
screen -ls
which shows you the running screens. We named ours minecraft, so it will produce
There is a screen on:
123456.minecraft
so you go back to this screen by typing
- Code: Select all
screen -rx minecraft
which will bring you back to the command line of the server where you can then type "stop" which will stop the server and screen as well.
Any comments or additions welcome!
Have fun!
barcode
Edit: It's been asked a few times how to update the server. It's really simple, log in to the shell via putty like explained above, type "screen -rx minecraft" and "stop" to stop the server from running.
BACKUP THE ENTIRE DIRECTORY RIGHT NOW!
Then rename "minecraft_server.jar" (so you can go back to that version just in case), I do this by just adding the version number (minecraft_server_110.jar, for example). Then download the latest "minecraft_server.jar" from the official website and either save it directly to that folder or copy it from wherever you download it to.
That's it. You can restart the server like explained above and off you mine... Version 1.2.x will convert your world save automatically, which may take a while - depending on the size of your world. This has worked on every update since beta 1.4 for me...
News