1. If you have a problem and need help, create a new thread with a title that briefly describes the problem.
    Do not use titles like 'Help!' or 'I have a problem!'
    Dismiss Notice
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Server setup (Linux Debian, x64)

Discussion in 'Server Help' started by nettse, Nov 7, 2011.

  1. nettse

    nettse Shipwright

    Messages:
    3
    This guide should help you to set up server easily. This is exactly a STEP-BY-STEP guide, how to set a Linux server after you get your own dedicated server/VPS/whatever. Exactly, steps from the account management to server run. All you have is to "copy & paste" from here to your linux command prompt.
    (except text written in "< >")





    1a) update of list of packages + text editor

    apt-get update // updates list of packages

    apt-get install nano // installs simple text editor

    -

    1b) x86 libraries (only for x64 machines)

    apt-get install ia32-libs // installs x86 libraries

    -

    2) permissions

    chmod -R 777 /dev/pts // edits additional permissions for screen

    -

    3) creating new user and his folder in order to make your linux server more secured

    adduser <username> // adds user, user's password and his folder

    ; ls -ld /home/<folder> // to verify that owner of <folder> is <username>

    -

    4) getting into <folder>, switching user to <username>, additionaly extract

    cd /home/<folder> // gets you into <folder>

    su <username> // switches user to <username>

    wget http://kag2d.com/download/file/kag200x.tar.gz // downloads KAG server archive
    tar -xzvf kag190xd.tar.gz // untar KAG archive

    cd kag_linux // gets you into kag_linux folder

    chmod +x KAG // sets KAG to be run or executed as a program
    chmod +x dedicatedserver.sh // sets dedicatedserver.sh to be run or executed as a program

    -

    5) first run for server update

    ./dedicatedserver.sh // runs dedic, which will eventually update
    [ctrl+c] // after update, shuts down server with this command

    -

    6) server config editation

    nano Base/Scripts/dedicated_autoconfig.gm // opens server config file in text editor, after editing just save and exit

    -

    7) run server on background

    screen -dmS <screenname> ./dedicatedserver.sh // runs server on background

    -

    8) autorestart script on crash (info can be found here) (if you're about to use this, skip step #7)

    wget http://dl.dropbox.com/u/23114384/files/dedi.sh // downloads autorestart script

    chmod +x dedi.sh // sets dedi.sh to be run or executed as a program

    screen -dmS <screenname> ./dedi.sh // runs restart script & server on background





    Notes:
    <username> - Choose anything. But I rather recommend to use "kag", so after connecting on your server, you will be able to see, where exactly is your server located. (in case you will run many more game servers on your server)
    <folder> - This is exactly your <username>.
    <screenname> - This is just for you. No matter how will you name your screen run of your kag server. Anyway, it's way better to name it somehow close to "kag", so you will recognize your kag server, if you will run many other servers with screen.
    [ctrl+c] - I guess you can find CTRL & C button on your keyboard. There's nothing to explain. Just press it at once.

    Additional information:
    All of those commands can be Googled, or found on KAG wiki.

    Credits:
    incarnum for his help & explanation of each command
     
    Noburu, trelawney and Wyeth like this.
  2. Static

    Static Shopkeep Stealer

    Messages:
    124
  3. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    Remove the above line and this turns into a Debian 32bit/x86 guide \o\
     
  4. Static

    Static Shopkeep Stealer

    Messages:
    124
    Already have this on the wiki... http://kagwiki.com/wiki/Server

    So no sure why it was posted :s

    Only good thing it added was tells you not to use the root.
     
  5. nettse

    nettse Shipwright

    Messages:
    3
    Dear Static, guide on wiki is missing some lines. And this is STEP-BY-STEP guide, not like "You have to do something, and after that this". Not everybody (like me before) wants to exactly set up a server few hours. Reading this guide, I think every person can do this within 20 minutes or less.
     
  6. Static

    Static Shopkeep Stealer

    Messages:
    124
    Same with the wiki page espcially after the edits I did.
     
  7. nettse

    nettse Shipwright

    Messages:
    3
    It's not the same :)