Minecraft server McMyAdmin troubles

Discussion in 'Linux - General discussion' started by Nelmeco, Sep 13, 2012.

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

    Nelmeco Regular member

    Joined:
    Feb 17, 2007
    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    26
    I have setup a minecraft server with McMyAdmin.

    To start the server I ssh into it, and run the command sudo ./MCserveretcwhatever

    The problem is when I exit out of the ssh, the server stops, however as long as I am connected via ssh, the server stays up.

    What am I doing wrong and how can I rectify this?

    If you need anymore information, just ask

    Thanks

    -Nelmeco
     
  2. Schmick

    Schmick Member

    Joined:
    Apr 6, 2010
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    16
    Try:
    Code:
    sudo ./MCserveretcwhatever &
    Also look at the man page, it might have a flag you can pass to daemonise it.
     
  3. Nelmeco

    Nelmeco Regular member

    Joined:
    Feb 17, 2007
    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    26
    Thank you very much, that worked. Could you explain what that did?

    I appreciate it.
     
  4. Schmick

    Schmick Member

    Joined:
    Apr 6, 2010
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    16
    No problem mate, we've all been in the same position when we were learning Linux.

    The & symbol at the end of a command tells it to run in the background, in the case of a server program like you're using, that sort of turns it into a daemon.

    Daemons in *nix are like services in Windows. SSH that you connect into is a daemon for instance, so just like your minecraft server except automatically started on boot.

    Depending on your distro, you should find a bunch of daemon scripts in /etc/rc5.d/ or /etc/rc.d/ . You might even find one in there related to minecraft (just guessing, I haven't searched for it). Can try playing with:
    Code:
    sudo /etc/rc5.d/[daemon] [start/stop/restart]
    or
    Code:
    sudo service [daemon] [start/stop/restart]
    Always best not to play with ssh unless you have physical access to a machine to get it back up and running if it stops!

    And a bit of a background on the significance of rc5 and all the other rcX numbered folders - they're related to runlevels. http://en.wikipedia.org/wiki/Runlevel gives a bit of background. Not really necessary to know, but for a typical Linux system with graphical desktop you'll be left in run level 5 after boot. /etc/inittab controls some of that stuff, but should only very rarely ever have to go in there (if setting up Arch Linux for example, is where you can tell it to boot directly into slim if it isn't run as a daemon).
     
  5. Nelmeco

    Nelmeco Regular member

    Joined:
    Feb 17, 2007
    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    26
    Its actually a headless server without a GUI. I'm currently studying to get an Information Systems Management degree and I'm trying to learn as much about Linux as I possibly can.

    I appreciate the information!
     
  6. Schmick

    Schmick Member

    Joined:
    Apr 6, 2010
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    16
    If you want to learn a bit more about Linux, try installing Arch. It will force you to learn a lot about how the individual applications fit together and system administration.
     
  7. Nelmeco

    Nelmeco Regular member

    Joined:
    Feb 17, 2007
    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    26
    I've got a lot of time today so I think Ill throw it on a virtual machine and figure it out. Thanks for the suggestion.
     
  8. jhonsmith3741

    jhonsmith3741 Member

    Joined:
    Dec 24, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    11
    The & symbol at the end of a command tells it to run in the background, in the case of a server program like you're using, that sort of turns it into a daemon. I appreciate the information!
     
Thread Status:
Not open for further replies.

Share This Page