• 0

    posted a message on HOW-TO: Run a server on Amazon EC2
    Lets see, where to begin.

    Warning: I am typing this with the mindset that you've seen a linux box before, and as such, one can navigate thru a text based terminal. If you can't, go slower and learn. Google is your friend. I look stuff up all the time..

    First of all, I wanted to play with the EC2 Instance that was provided by AWS. Not any of the other flavors one could obtain if you had to pay.

    Thus, I have a small t1.micro instance running AMI: amzn-ami-2011.02.1.x86_64-ebs (ami-8e1fece7)

    As you may know those instances are semi Fedora flavored, at least as far as I can tell.

    So you will be using YUM if you want to do any kind of non-manual package upgrades.

    You will have to sudo yum for anything to stick.

    I would recommend that you "sudo yum groupinstall development-tools" (this gets you gcc, make and all the build tools)
    Then a "sudo yum update" once or twice followed by a "sudo yum install screen"

    If your interested, there is also a yum grouplist that will show all available groups name.
    (Getting Web Services to run was pretty easy doing this)

    After hit the return key you will get a list like the following:

    Administration Tools
    Compatibility Arch Support
    Development Tools
    GNOME Desktop Environment
    GNOME Software Development
    Games and Entertainment
    Graphical Internet
    Mail Server


    You should see them in two categories. “Installed” and “Available”. Hopefully, one knows what that means.

    For your information the partition you get to play with is 8GB.

    so, I've also went ahead and provisioned an additional 1GB EBS volume, attached it to the instance as /dev/sdb1
    and added it to the system as a swap partition. (This may cost me a dollar or two extra a month, so long as the swap doesn't go and thrash all over the place.. (Read: memory leak) If you do this, use one of the free alarms and set a alert for excessive IO access.

    The hardest part was getting the additional volume attached to the instance. It helped to have the instance in a stopped state, and looking paying attention to the EBS volume section of the control panel didn't hurt either. Once I had the volume attached, I booted the instance, and did a old fashioned "'Add swap after install' dance"

    mkswap /dev/sdb1
    swapon /dev/sdb1
    sudo nano /etc/fstab #(opens a text editor, paste the next line on the top, Save with Crtl-X )
    /dev/sdb1 none swap sw 0 0

    For extra credit:
    swapon -a
    swapon -s

    To obtain and build cpulimit I went to my /home/ec2-user directory
    wget http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz
    tar zxf cpulimit-1.1.tar.gz
    cd cpulimit-1.1
    cp cpulimit /usr/bin

    cpulimit must see the pid to attach.. So, run screen, then mine craft, then switch to a new window and run cpulimit

    When you are done playing, detach from screen, (Ctrl-A d) to leave every thing running.

    I'm still playing around with the instance. It might be good for recursion testing of a new build, or perhaps a 5 man server tops, but AWS's CPU throttle will bring the server to it's knees. Until I had installed cpulimit, it preformed worse than a P4 800mhz w/ 360M memory I had lying around that I threw Dammn Small Linux on..

    Hope this helps a little. perhaps we can find a way around that cursed throttle.
    Posted in: Server Support and Administration
  • To post a comment, please .