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

    Obsidian

    FWIW, you may want to cover installing a firewall to help lock down the server -- assuming the server is not a VPS run through OpenVZ (which sucks something terrible for game servers).
    I'd recommend covering the use of "ufw", as it's probably the simplest commandline frontend to iptables that I've seen.
    Just be sure to let people know to default in off, and always allow 22/tcp in. :)
     
  2. Offline

    TnT

    If you want to write it up, I'll happily add it.
     
  3. Offline

    plewwatson

    When I type ,/start.sh it says: ./start.sh: line 1: va: command not found. What do I do?
     
  4. Offline

    Obsidian

  5. Offline

    Kid Tiger

    OK, so I'm new to Putty, Linux, computers, electricity, all this stuff... (Not really) But I need some help.

    I'm following your tutorial to the T, and I'm having problems. I'm doing everything as root. Do I need to create a user to do everything?

    Here's what I've done when I opened my server on Putty.

    Code:
    apt-get update
    I did this just to update my OS.

    Code:
    adduser minecraft
    I did this just to create a user so I don't run shit from root. I know to go back to root though if I'm downloading stuff like Java or Curl or WGET to my server.

    After that, I start following your tutorial!

    Code:
    sudo apt-get install openssh-server
    The output is

    Code:
    Reading package lists... Done
    Building dependency tree... Done
    openssh-server is already the newest version.
    
    OK, I can live with that... So, next I do this...

    Code:
    root@Gamingrepublic:~# sudo mkdir /opt/java
    
    It gives me NO output. If I ignore it and keep going with the steps, it outputs that I'm doing shit that it's not recognizing basically. I feel like I'm finger banging a tree right now.
     
  6. Offline

    Obsidian

    FWIW, "apt-get update" does not update the Linux operating system. It just obtains the latest package information.
    To fully update the OS on Ubuntu, you do this:
    Code:
    sudo apt-get update && apt-get upgrade
    It will list the packages it wants to update, and ask for confirmation to proceed.
     
  7. Offline

    TnT

    No worries. We are here to help.

    Yes, you should have a user created just for this purpose. I didn't cover that as its covered in the Ubuntu setup.

    That all looks good. You can run the server from the minecraft username you created.

    Good so far.

    When you first setup an Ubuntu Server 10.10 x64, it offers a bunch of things you can add. I skipped them all and clicked continue before I realized I should have chosen openssh. Hence I needed that command, but it looks like you don't.

    Type:
    Code:
    ls -lah /opt/
    
    The mkdir command gives you no output normally.
     
  8. Offline

    Kid Tiger

    OK, I'll be back in a second... thanks for your help, in advance, guys.
    --- merged: Feb 6, 2011 6:32 PM ---
    OK, so I reinstalled my OS just to have a clean slate, and when I did I followed the instructions to install the openssh-server. Here's what it looks like...

    Code:
    root@Gamingrepublic:~# sudo apt-get install openssh-server
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
      openssh-client
    Suggested packages:
      ssh-askpass libpam-ssh keychain openssh-blacklist-extra rssh
      molly-guard ufw
    Recommended packages:
      xauth
    The following packages will be upgraded:
      openssh-client openssh-server
    2 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
    Need to get 1109kB of archives.
    After this operation, 0B of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Get:1 http://archive.ubuntu.com/ubuntu/ lucid-updates/main openssh-server 1:5.3p1-3ubuntu5 [304kB]
    Get:2 http://archive.ubuntu.com/ubuntu/ lucid-updates/main openssh-client 1:5.3p1-3ubuntu5 [805kB]
    Fetched 1109kB in 1s (587kB/s)
    Preconfiguring packages ...
    (Reading database ... 21594 files and directories currently installed.)
    Preparing to replace openssh-server 1:5.3p1-3ubuntu4 (using .../openssh-server_1%3a5.3p1-3ubuntu5_amd64.deb) ...
    Unpacking replacement openssh-server ...
    Preparing to replace openssh-client 1:5.3p1-3ubuntu4 (using .../openssh-client_1%3a5.3p1-3ubuntu5_amd64.deb) ...
    Unpacking replacement openssh-client ...
    Setting up openssh-client (1:5.3p1-3ubuntu5) ...
    
    Setting up openssh-server (1:5.3p1-3ubuntu5) ...
    
    Configuration file `/etc/init/ssh.conf'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : background this process to examine the situation
    The default action is to keep your current version.
    *** ssh.conf (Y/I/N/O/D/Z) [default=N] ? Y
    Installing new version of config file /etc/init/ssh.conf ...
    ssh stop/waiting
    start: Job failed to start
    
    I chose Y, should I have chosen N? Job failed to start. Is that a problem?
     
  9. Offline

    Obsidian

    Try this:

    "sudo service ssh start"

    If that doesn't work, replace "ssh" in the command with "sshd". I can't remember wtf the daemon was named.
     
  10. Offline

    Kid Tiger

    When? Before I run

    sudo apt-get install openssh-server

    ...or after all of the crap I just output'd, so now?
     
  11. Offline

    Obsidian

    Yep, do it now and see if the ssh daemon starts up. I'd like to know what it says, it'll help me figure out what's going on with the installation (might just be a stupid warning being thrown).
     
  12. Offline

    Kid Tiger

    Any of you guys want to set it up for me? :D

    I'll be happy to send you my server's ip and info.
    --- merged: Feb 6, 2011 6:47 PM ---
    root@Gamingrepublic:~# sudo service ssh start
    start: Job failed to start
    root@Gamingrepublic:~# sudo service sshd start
    sshd: unrecognized service
    root@Gamingrepublic:~#
     
  13. Offline

    Obsidian

    Job failed to start...strange.

    Googling around, it looks like a problem with the package "upstart".
    What distro are you using? (version too please)
     
  14. Offline

    Kid Tiger

    Ubuntu-10.04-x86_64

    I don't understand how others have had success getting it to start with the tutorial but I'm having problems.
     
  15. Offline

    Obsidian

    Sounds like you've got the botched upstart package. Can you try updating the OS and rebooting the server?

    Code:
    sudo apt-get update && apt-get upgrade -y
    
    # reboot command
    sudo reboot
     
  16. Offline

    Kid Tiger

    I just reinstalled my OS. When it comes back up, should I still do what you just suggested

    sudo apt-get update && apt-get upgrade -y
    # reboot command
    sudo reboot

    ?
     
  17. Offline

    Obsidian

    Yep, do so. The server OS ISO you're using might have a borked package in there by default, and updating may help solve the problem.
     
  18. Offline

    Kid Tiger

    /updating

    When I do the openssh command again and it asks me in the end if I want to update press Y or press N to keep as default config, what should I do?
     
  19. Offline

    Obsidian

    Hit D, find what's different. The new lines will be prefixed with a "+", the old lines prefixed with a "-".
    There might be something in the config that needs to stay the same. Hard to say without seeing the diff.
     
  20. Offline

    Kid Tiger

    Still updating...

    When I set the server up with craftbukkit, will this enable me to load my own personal world onto the server, or should I get another app/console for my server to do that?
     
  21. Offline

    TnT

    Yes, you can do that.
    Why didn't you install 10.10 right away?
     
  22. Offline

    Kid Tiger

    My hosting didn't offer it as an option. I don't know what's new and what's not, man.

    Like I said, it's updating still at the moment... as soon as it's done I'll jump back on the tutorial from step one and go forth.

    I'll adduser minecraft
    Then I'll go back to root and apt-get install openssh-server

    Is that a sound plan?
     
  23. Offline

    Obsidian

    @TnT I'm betting it's because 10.04 is an LTS release.
     
  24. Offline

    TnT

    At the start of the ubuntu 10.10 server install, what options did you choose?
     
  25. Offline

    Kid Tiger

    Options? So far all I've done is reinstall my server and run the following command

    sudo apt-get update && apt-get upgrade -y

    It's still unpacking files and such...
     
  26. Offline

    TnT

    Ok, if you get an option to replace your ssh.conf file, don't do it.
     
  27. Offline

    Kid Tiger

    It just asked me!

    Configuration file `/etc/init/ssh.conf'
    ==> Modified (by you or by a script) since installation.
    ==> Package distributor has shipped an updated version.
    What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
    D : show the differences between the versions
    Z : background this process to examine the situation
    The default action is to keep your current version.
    *** ssh.conf (Y/I/N/O/D/Z) [default=N] ? N
    ssh stop/waiting
    ssh start/running, process 5631
    --- merged: Feb 6, 2011 7:32 PM ---
    Now it's asking me about /etc/init/mountall.conf'

    I'm just choosing N for all of these...
    --- merged: Feb 6, 2011 7:35 PM ---
    OK, here's where I'm at....

    Code:
    root@Gamingrepublic:~# sudo mkdir /opt/java
    root@Gamingrepublic:~# sudo mkdir /opt/java/64
    root@Gamingrepublic:~# cd /opt/java/64
    root@Gamingrepublic:/opt/java/64# sudo cp /tmp/jre-6u23-linux-x64.bin .
    cp: cannot stat `/tmp/jre-6u23-linux-x64.bin': No such file or directory
    root@Gamingrepublic:/opt/java/64#
    
     
  28. Offline

    Obsidian

    Seems like you didn't wget the JRE.
     
  29. Offline

    Kid Tiger

    JRE installed, and still get the same error

    Code:
    root@Gamingrepublic:~# cd /opt/java/64
    root@Gamingrepublic:/opt/java/64# sudo cp /tmp/jre-6u23-linux-x64.bin .
    cp: cannot stat `/tmp/jre-6u23-linux-x64.bin': No such file or directory
    root@Gamingrepublic:/opt/java/64#
    
    This is getting ridiculous. SERIOUSLY, do one of you want to set this up for me for a small fee? I've been dealing with this shit for 2 days. I'm over it. I just want it up and running now.
    --- merged: Feb 6, 2011 8:09 PM ---
    Also, I just ran the command cat /etc/issue to see what ubuntu I had to make sure that I didn't sit through a 7 minute upgrade for nothing.. and lo and behold

    Code:
    root@Gamingrepublic:~# cat /etc/issue
    Ubuntu 10.04.2 LTS \n \l
    
     
  30. Offline

    Obsidian

    Yeah, you're not moving forward to a new OS when you update -- you're just updating the packages for it. Due to the nature of the dependencies, sometimes there are older packages in the previous repo that are necessary to not break everything in sight. The new releases of a distro usually have this resolved, but for an older release it's just not possible to set up without having massive dependency conflicts.
    Just take it easy, you're on the latest for that version of ubuntu now.



    Not to mention, it's an LTS (Long Term Release). It'll still get as new of packages as it can, and it's supported by canonical for 3 years, as opposed to the standard 18 months of support for the normal releases.
     
Thread Status:
Not open for further replies.

Share This Page