Which Linux for Server?

Discussion in 'Bukkit Help' started by Gordon, Jan 28, 2011.

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

    Gordon

    Hey
    I´m setting up my minecraft server on an new vServer.
    Which linux should i use?
    And do i need to install a firewall?
    Max
     
  2. Offline

    Duendek86

    I'm using Ubuntu 10.10 and works perfectly with openjdk. I haven't installed any firewall.
     
  3. Offline

    fffizzz

    if its solely for Minecraft, i'd say archlinux as its least resource whoring distro out there. Ubuntu/centos/etc will work fine though, if you using for workstation also, go with Ubuntu.
     
  4. Offline

    Gordon

    Just one more Question:
    How do I update the server ?Or is this done automatic?
     
  5. Offline

    fffizzz

    be more specific, how do you update "what" server, minecraft binaries, or the distro itself? And, which distro are you going to use as this will be different for each one as well.
     
  6. Offline

    Gordon

    Sorry. .. I asked for the craftbuckit.jar
    I decided to use CentOS
     
  7. Offline

    TnT Retired Staff

    I use Ubuntu Server 10.10 x64 with Oracle Java x64 and it works fine (I see a poster above saying OpenJDK works well too).

    If you want a guide, I have one written up. It includes a section on how to keep CraftBukkit up to date.
     
  8. Offline

    DerpinLlama

    Personally I'd go for either Ubuntu or Fedora.
     
  9. Offline

    Gordon

    @TnT thx :) works great
     
  10. Offline

    croxis

    When I first set up my vps I tested the base ram use of ubuntu 10.10 server and gentoo, as I have used both in the past. I was surprised to find out that ubuntu had, at least for the base install, a smaller memory footprint.
     
  11. Offline

    Duendek86

    10.10 x64 me too :p
     
  12. Offline

    ppingos

    I have a 32-bit Slackware home server that I also use for Minecraft.
     
  13. Offline

    ShivalWolf

    Given its Java and Java can be loaded onto almost any linux distribution.
    It does not matter what you use just use something you like.

    Debian and all deb based linux's are easy to update and install It is step by step and can be run on almost anything. You don't need to install the Graphical environment if you don't need it and its base build is everything you need, Just make sure to enable SSH.

    Redhat/Fedora and other RPM based distributions have no problems either just not the easiest to update and last i looked have the graphical front ends by default.

    Centos is well old but stable. Its got afew non standard methods of doing things but once you get used to it your fine.

    Gentoo is good if you want full customisation of everything but you probably don't need that so stick to something thats easy and you can learn with. I am a Debian user and would highly recommend it. If not Debian then Ubuntu as it is well easier then debian to work with.
     
  14. Offline

    user7

    Personal preference. However depending on your skill level, you might wanna look at a distro that has both a large user community, and easy package management.

    RHEL, Fedora, and Centos are all the same core. RHEL is your stable enterprise distro with vendor support. Fedora is the bleeding edge of RHEL, and Centos is just RHEL without the branding recompiled from the RHEL source. So it will be the same stable versions of packages, however these packages will be much older than fedora. All three of these however utilize the yum (formerly up2date) package management system. So while you can use RPM's it's much easier to use yum.
    Oracle linux is also RHEL.
    If your going to go with a Redhat based system, Fedora is probably going to be best if your running it on consumer grade x86/x86_64 hardware. Just because it's going to have latest packages, wide hardware support, and a fairly large community.

    Ubuntu is also another with a really large support community. Their forums are excellent. Can't go wrong with this distro if your new to the *nix world.

    Regardless of the disto you choose, you may wish to install it without a gui, depending on your hardware and skill level. Since a gui is only going to consume more system resources.

    Try a few though, see which ya like. VMware marketplace has a bunch of prebuilt disto's if you just wanna take them for a test drive.
     
  15. Offline

    Plague

    Ubuntu for a server? Just use debian if you are a .deb distro fan.
     
  16. Offline

    Toasty

    Personally, I wouldn't use any Debian based distro as a server. RHEL based distros are designed to function as servers, and so they have very long, stable releases, and minimize the need to restart the server. I wouldn't use Fedora if you plan on having this server running for any length of time, because your OS will be out of date within a year. CentOS is the best decision here since it's stable, free, widely used, and will be supported for years to come, regardless of the version you choose to use (currently it's CentOS v5.5).

    As for keeping craftbukkit up to date, the update script TnT has in his tutorial will work on just about any Linux distro, since most of them have wget installed from the get go, or at least has it available for download.

    Taken from TnT's Ubuntu Server tutorial:

    Code:
    #!/bin/sh
    wget "http://artifacts.lukegb.com/artifactory/plugins-snapshot/org/bukkit/craftbukkit/0.0.1-SNAPSHOT/craftbukkit-0.0.1-SNAPSHOT.jar"
    rm craftbukkit.jar
    mv craftbukkit-0.0.1-SNAPSHOT.jar craftbukkit.jar
    java -d64 -Xincgc -Xmx1024M -jar craftbukkit.jar nogui
    TnT, just let me know if you don't want that here, and I'll remove it.
     
  17. Offline

    Obsidian

    FWIW, I do recommend that you all install a firewall and make use of it; if anything, it's best to use for holding brute force attacks against ssh at bay (recommended command: "ufw limit log 22/tcp").
     
  18. Offline

    ShivalWolf

    @Obsidian
    I find fail2ban is far more useful for protecting SSH and many other services to.
    It reads logs, Looks for auth failures and firewalls any client that fails auth more then a specified amount of times.
    Its not compatible with all linux variations unfortunately but its still useful.
     
  19. Offline

    Obsidian

    Hmm, I'll take a look at that. Thanks, hadn't seen that before.
     
  20. Offline

    zajacmp3

    There is no such thing as better linux.
    Everyone is the same. The difference is with the starting configuration and packages that are installed.
     
  21. Offline

    Toasty

    No, but there is such thing as a better distro. Why bother reading into detail about all the packages you'd need to get the functions you want, when someone's already done most of the work for you?

    As for a firewall, CentOS (and most other distros iirc) have iptables installed as a default package. iptables is a massive pain to configure, but Firestarter makes it immensely easier. The only problem is that finding an RPM for Firestarter that was compiled for CentOS x86_64 is like looking for a needle in a hay stack.

    So, if you choose to go with CentOS 5.5 64-bit, and you want to use Firestarter, then here's the package I use on my servers:
    http://rpm.pbone.net/index.php3/sta...m/firestarter-1.0.3-17.el5.kb.x86_64.rpm.html
     
  22. Offline

    Clinton

    Ubuntu with CSF works great.
     
  23. Offline

    ShivalWolf

    Iptables is really very simple. a firewall only needs the most basic of rules

    /etc/network/if-up.d/firewall:
    Code:
    #!/bin/bash
    
    IPTABLES=/sbin/iptables
    HOME_IP=(home ip address this only is needed if you have a linux dedicated server outside your own network. If this host is inside your network put in your local ip subnet like 192.168.1.0/24)
    
    ##clean table and reset to default
    ${IPTABLES} -F
    ${IPTABLES} -P INPUT ACCEPT
    
    ##If you have a static HOME ip make a open firewall to it##
    
    ${IPTABLES} -A INPUT -i eth0 -s ${HOME_IP} -j ACCEPT
    
    ######### UDP ######
    ##Add more ports separated by spaces##
    ##Make sure you leave port 22 in this list you need ssh##
    for TCPPORT in 22 80 443; do
      ${IPTABLES} -A INPUT -p tcp --dport ${TCPPORT} -j ACCEPT
    done
    
    ###########UDP ports###########
    ##Same as above separated port numbers by space##
    ##Make sure you have 53 open or you dont have any DNS##
    ##123 is your NTP port if you are using ntp for time sync
    for UDPPORT in 53 123; do
      ${IPTABLES} -A INPUT -p udp --dport ${UDPPORT} -j ACCEPT
    done
    
    ## Allow SYN ACKs from people we connect to. ##
    ${IPTABLES} -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT
    ${IPTABLES} -A INPUT -p icmp -j ACCEPT
    
    ## final catch all if you are worried about the rules to test change DROP to LOG and watch your syslog for any bad drops##
    ${IPTABLES} -A INPUT -i lo -j ACCEPT
    ${IPTABLES} -A INPUT -i eth0 -j DROP
    
    Just make sure its in your interface up folder owned by root and executable by root and you get a nice basic firewall.
    Any new ports just add to the TCP or UDP ports list and run the script.
     
Thread Status:
Not open for further replies.

Share This Page