How to setup a Ubuntu CraftBukkit Server (x64) running Java x64

Discussion in 'Bukkit Help' started by TnT, Jan 15, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    OneArmManny

    That did it dude, good eye :D Thanks :) Sorry I spammed up your post so much.. lol
     
  2. Offline

    TnT

    Don't sweat it, without you I wouldn't have caught my mistake. Happy mining.

    If you want, check out my post on improving performance for how to setup a ramdisk (change paths to world dir accordingly).
     
  3. Offline

    OneArmManny

    *nod* Will check it out now :D
     
  4. Offline

    TnT

    Change this:
    Code:
    java -Xms2030M -Xmx2560M craftbukkit-0.0.1-SNAPSHOT.jar nogui
    To this:
    Code:
    java -Xms2030M -Xmx2560M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
     
  5. Offline

    cnx4mia123

    how come when i copy the link and do yum install [link] it says nothing to do? how do i fix this also im doing it as root
     
  6. Offline

    Stormx

    OP, Sun Java can be installed and selected as default via:

    Code:
    sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
    sudo apt-get update
    sudo apt-get install sun-java6-jre
    sudo update-alternatives --config java
    It's been included in the "partners" repo since 10.04 (see the release notes)
     
  7. Offline

    TnT

    Looks good, but it doesn't make it clear if it's installing Sun Java x64, or x86. Can you do a java -version for me and let me know - it'd be nice to get it all done in command line.
     
  8. Offline

    user7

    What are your permissions on start.sh ?
    Try:
    Code:
    # chmod +x start.sh
    --- merged: Jan 17, 2011 11:01 PM ---
    Installation instructions:
    http://www.java.com/en/download/help/5000011400.xml

    Pretty easy, but make sure you uninstall the the Open Java first.
    If your unsure on how to do that..
    Code:
    $ man yum
    But should be something like this..

    Find the package you want removed.
    Code:
    # yum list |grep -i java  
    Then remove it
    Code:
    # yum remove java-1.6.0-openjdk.x86_64
    I know there is a yum repo that does host a copy of sun java, but you would need to look for it, can't seem to find it. But any centos, redhat, fedora repo should do the trick.
     
  9. Offline

    TnT

    Edit: Added -d64 flag to java process to make it use the 64-bit data model if available.
     
  10. Offline

    TnT

    Edited to remove the -Xms value and replace with -Xincgc
     
  11. Offline

    Bacu

    I don't know jack about linux, so I'll ask this.

    Is it possible to leave the server console and go back to the shell to change a file or something, then re-enter the server console, without needing to shut it down?
     
  12. Offline

    mughi


    what's wrong with you??! :)

    i only skimmed this, so i may have missed it, but it might be a good idea to have them create a different user to run minecraft as.. avoids security issues. i'm going to use your backup instructions, because doing it manually sucks :)
     
  13. Offline

    TnT

    Upon installing Ubuntu you get prompted to setup a new user account (aside from root). As this is a single purpose box, I relied on them using that account to run it. I suppose I could modify it to create a very limited user account, just didn't worry about that much.

    So I throw this question out the to community. What do you think? Should I create a section on setting up a very restricted user, or as long as they aren't running as root are they fine?

    As for backups, if you have the Ubuntu GUI installed, SimpleBackup is a sweet alternative to the rsync command line backup.
     
  14. Offline

    mughi

    makes sense.. i use my server for other stuff (mostly to get pandora around the proxy at work :) )
    by default, ubuntu users are non-root. so it is probably ok
    --- merged: Jan 27, 2011 6:38 PM ---
    use screen for this...

    you'll have to google it.. i've learned from a friend, but not enough to really give instructions.
    i have a screen window for main server, test server, tectonicus (mapper), minecraft user shell, main user shell, etc
    and with screen, you can reconnect to it if you ssh in from another computer.. (screen -dr)

    wonderful stuff
     
  15. Offline

    TnT

    I saw a post floating around with instructions on this, I just can't find it right now. Its in here somewhere.

    I wish they had a section for us to sticky "How To" articles. Its would be nice to have a single spot to go to when looking for them, instead of digging through the forums.
     
  16. Offline

    Olas

    I agree, they did it with plugins, so why not articles.
     
  17. Offline

    Bacu

    Also, what would happen if I closed the SSH window with the server running? would I need to kill it and restart it to get access again?
     
  18. Offline

    TnT

    Yes, you would. However, that is when using the screen command comes in handy as it allows you to run the program and close your SSH session without force stopping the server.

    Shit, I really need to find those instructions.
     
  19. Offline

    Bacu

    Well then, that sounds incredibly useful.
     
  20. Offline

    TnT

  21. Offline

    drampelt

    I get this when I run craftbukkit in Ubuntu:
    Could not create the Java virtual machine.
    Java HotSpot(TM) 64-Bit Server VM warning: CMSMarkStack allocation failure Java HotSpot(TM) 64-Bit Server VM warning: Failed to allocate CMS Marking Stack Error occurred during initialization of VM Could not create CMS collector

    It works fine for me on my mac.
     
  22. Offline

    TnT

    Hmmm, which Java are you using? Oracle or OpenJDK? The latest version? What command are you running it with?
     
  23. Offline

    drampelt

    I got the java bin file from java.com and used the command in your start.sh file. Server works fine with just "java -jar craftbukkit.jar nogui"
     
  24. Offline

    TnT

    Can you post the command you're using? I'm guessing you've just typo'd somewhere (Or I typo'd somewhere in my instructions).
     
  25. Offline

    drampelt

    I used
    java -d64 -Xincgc -Xmx400M -jar craftbukkit.jar nogui
    400M cause my server is crappy :(
     
  26. Offline

    TnT

    Is it possible to try it with 512M? I am wondering if setting the max heap at 400M is simply too low (when you don't specify the -Xmx, it will go as high as it needs to). Did you try the exact same command on your Mac, or did you modify values?
     
  27. Offline

    drampelt

    I am using a VPS and for now until I upgrade I have 512M limit. I had different values on my mac.
     
  28. Offline

    TnT

    Try with -Xmx512M. It should still work even if your max server ram is 512. It'll just eat up everything there. I just haven't seen anyone run the server with less than 512M, so that's my guess.
     
  29. Offline

    drampelt

    Without the -Xincgc but with -Xmx512M it works but with -Xincgc it says not enough ram and stops
     
  30. Offline

    TnT

    Edited to state it won't work with less than 512M
     
Thread Status:
Not open for further replies.

Share This Page