iorewwelcome.blogg.se

Minecraft on mac os x
Minecraft on mac os x





  1. #Minecraft on mac os x how to
  2. #Minecraft on mac os x install
  3. #Minecraft on mac os x download

To unload the daemon (so it won’t autostart at boot) sudo launchctl unload /Library/LaunchDaemons/ To restart it after stopping: sudo launchctl start net.minecraft This command stops the server but it doesn’t remove the autostart Daemon-next boot it will start again. Normally you want to make these the same for sanity sake. The name is one given in the plist file not the actual file name. To stop the server temporarily sudo launchctl stop net.minecraft It will start when you load it the first time. Most likely a permissions issue.Ģ) controlling it.to load the server by hand: sudo launchctl load /Library/LaunchDaemons/ So now you know the program and the paths are right. List the current directory (state) and you will see a whole bunch of files and folders have been created. Once it stops printing stuff out, type ctrl-c to kill it. You may see some java exceptions printed in the process, but if the program stays running then it’s working. If you are nervous, disconnect your ethernet cable for a moment. This is reasonably safe, assuming you trust mojang, to do for a moment just to eliminate the permission issues. cd /opt/minecraftserver/state/usr/bin/java -Xmx1024M -Xms1024M -jar /opt/minecraftserver/minecraft_server.1.6.2.jar note, at this point you are running the server as root. To help diagnose this try running the command right from the command line. If so then the server jar is running and is running as nobody. Test to see if it worked: ps auxww | grep java | grep jarĭoes the output include something like this: nobody 1405 0.5 10.8 3814720 681608 ? Rs Mon06PM 25:58.23 /usr/bin/java…

#Minecraft on mac os x install

If it’s not installed OSX will usually ask you if you want to install java and then automagically do this for you.Īs root, (sudo -s -)run the following:launchctl load /Library/LaunchDaemons/ You must change these paths if you set this up in a different place.Ģ) testing it.first make sure you have java installed./usr/bin/java -versionif java is installed then this will reply with the java version at that path. The key thing here is that the paths to the “state” folder and the executable are hardcoded. And it will start the server when the Daemon is loaded, which happens either at boot time or if you explicitly tell the daemon to load. It also tells it to run the job as the username nobody. You can adjust the values for your system if that turns out to be too much.

Label net.minecraft RunAtLoad WorkingDirectory /opt/minecraft_server/state UserName nobody ProgramArguments /usr/bin/java -Xmx1024M -Xms1024M -jar /opt/minecraft_server/minecraft_server.1.6.2.jar nogui The above is plist speak to tell it that it should change into the working directory where we want it to store its data, then launch the java jar with a memory size of 1G.

You need to create this as root or otherwise assure it’s owned by root:wheel and can be read. The file name is not important, but it’s tradition to name the Daemon for website that it came from. Minecraft is going to run as user nobody, and it will need permission to modify the state folder contents.Ĭhown nobody /opt/statechmod 755 /opt/stateĪs root, create the file /Library/LaunchDaemons/ Since the system is going to invoke this file automatically you don’t want it changing with simple user level permissions.Ĭhown -R root:wheel /opt/minecraftserverchmod -R a+xr /opt/minecraftserver This will assure that no one can change the jar file without root access. Mv /User/bob/Downloads/minecraft_server.1.6.2.jar /opt/minecraftĪnd make sure the top level folder and executable are owned by root. Now if your user name is bob then move the minecraft jar into place: Sudo -s -mkdir -p /opt/minecraft_server/state It doesn’t matter where this it, but the permissions on the folder do matter. And currently the jar filename is: minecraft_server.1.6.2.jar, but that will change too.ġ) Creating a place for it.When you run the jar the first time it’s going to create a lot of files and subdirectories the in the current working directory (CWD) so we want to create a nice place to do this. Currently that site is but that might change in the future.

#Minecraft on mac os x download

The first step is to download the minecraft server jar file from the Mojang website.

#Minecraft on mac os x how to

Finally I show how to backup the worlds you create.ġ) creating the launchDaemon that starts the minecraft server. And I also want it to restart automatically when I reboot the computer. Since I don’t fully trust the server not to have some security hole, I want it to run as user nobody so it doesn’t have a lot of permissions. Here’s a recipe for setting up Minecraft server on OS X.







Minecraft on mac os x