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

Linux Exiting server from SSH and using FTP?

Discussion in 'Server Help' started by Asu, Jun 30, 2013.

  1. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Hello everyone. Since few hours, I've got a OVH VPS running on CentOS 6 that I want to use to create servers for my team, Draco.

    I'm using PuTTY to connect to the VPS. I had lots of problems to setup the server, but I finally did it.
    I enter './KAGdedi' and the server starts : Allelujah! But I wasn't able to close server from SSH. exit, restart : Nothing worked. Ctrl + D : Not at all. How to fix it? I don't like to restart entire machine to close it...
    Also, I didn't found how to use FTP access to my machine. Any ideas?
     
  2. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    here are the commands I use to start my server (make sure you have the screen utility installed first):

    cd LOCATION/OF/KAGDEDI/
    screen -S SERVERNAME
    ./dedicatedserver.sh
    then use Ctrl+A and then hit D to exit out of it.

    When you want to reconnect to your screen, type:

    screen -r

    When you detach from the screen, it will print the screen process number, which is the process you have to kill to restart the KAG server. The command to kill is:

    screen kill ####

    Hope this helps

    (You can learn more about screen by pulling up its manual. To open the manual, type:
    man screen
    )
     
  3. Shadreki

    Shadreki ᴋᴀɢ ᴅᴡᴇʟʟᴇʀ Donator

    Messages:
    115
    Hello AsuMagic,

    I think the command for installing screen is: apt-get install screen, try it. You could use nano for managing your files just through PuTTy, but if you want a more friendlier environment, then you could go with WinSCP. Need more help? Just PM me. Have a nice day!

    * Guessing you have windows *​
     
  4. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Because a lot of tutorials for linux servers are made for Debian / Ubuntu, I'll reinstall the VPS under Debian 7.0 ( apt-get does not exists on CentOS, it is yum instead )
    On OVH website I saw that CentOS doesn't support FTP...

    But what is 'screen'? Should I use xMing to have the X windows on my computer?

    Thank you both anyway!
    </br>--- merged: Jul 1, 2013 7:24 AM ---</br>
    I reinstalled the VPS under Debian. I installed screen.
    When I start the server './KAGdedi : No such file or directory'.
    When I start the bash script, I have an error that the KAGdedi doesn't exists....
    When I do a 'ls', I see that it exists...
    Any idea?
     
  5. lavalord

    lavalord Haxor Staff Alumni Donator Tester

    Messages:
    672
    You might have to make KAGdedi executable.
    Type "chmod +x ./KAGdedi"
    Then when you start the server with "./KAGdedi" it should work.

    If that doesn't work it might be because you are running a 64-bit OS version of debian.
    Then you will need to install this "ia32-libs" with "apt-get install ia32-libs".
     
  6. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    I reinstalled server on Ubuntu 32 bit because it was too boring. Now, it works. Thanks! ( P.S. : You chmod command helps me for kscript )
     
  7. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    I don't think you should add the ./ to the chmod command line.
     
  8. lavalord

    lavalord Haxor Staff Alumni Donator Tester

    Messages:
    672
    Isn't adding "./" good practice?
     
  9. Shadreki

    Shadreki ᴋᴀɢ ᴅᴡᴇʟʟᴇʀ Donator

    Messages:
    115
    I really like Debian and I usually always roll with that but I read somewhere that KAG servers works best with Ubuntu, so that's what I picked. Haven't really seen a big difference though..
     
  10. lavalord

    lavalord Haxor Staff Alumni Donator Tester

    Messages:
    672
    Also I'm pretty sure KAG stopped working on older Linux operating systems like CentOS since build 400 and something.
     
  11. incarnum

    incarnum Shopkeep Stealer

    Messages:
    35
    Same thing, with the exception of Debian being a more stable solution for servers. "Ubuntu is an operating system with Linux kernel based on Debian and distributed as free and open source software." Source
    Was it documented? I suppose it's possible but it would be worth to double-check it.
    It is neither "good practice" or something that should be used at all times. The dot-slash (./) in Unix-like operating systems tells the Shell to execute a compiled program in the current directory (the directory you are currently in). The pwd command will tell you which directory are you inside if you for some reason get lost. Executing software without the dot-slash tells the Shell to look in the $PATH environment variable for the executable. You can view the actual $PATH variable contents if you echo it in the shell:
    Code:
    root@narwhal:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    As seen below, my KAGdedi is not in either of these directories, so the execution fails:
    Code:
    root@narwhal:~# KAGdedi
    -bash: KAGdedi: command not found
    There are cases where you'd like to add software to the $PATH to save you the dot-slash madness however you generally should not modify the $PATH variable unless you absolutely need to. In order to have your KAGdedi execute on a simple "kagdedi" command, place a script that would turn on KAGdedi in /usr/local/bin for example.

    Example script contents:
    Code:
    #!/bin/bash
    cd /home/kag/ctf
    chmod +x ./KAGdedi
    screen ./KAGdedi autostart Scripts//dedicated_autostart.gm autoconfig Scripts/dedicated_autoconfig.gm
    Once placed in /usr/local/bin/kagdedi, we need to make it executable:
    Code:
    chmod +x /usr/local/bin/kagdedi
    Now upon executing 'kagdedi' we can have our server start in the screen application. As mentioned earlier, to detach from screen, press CTRL+A D (as in hold down CTRL, press A and then D).
    You may hit a point where you will toss out Ubuntu for being too ambiguous or inconvenient, as opposed to more popular server distributions. CentOS is fine, but not as friendly as Debian.

    Oh, I almost forgot. Welcome to Linux!
     
    Asu and Shadreki like this.
  12. lavalord

    lavalord Haxor Staff Alumni Donator Tester

    Messages:
    672
    Well I speak from experience, Foxodi and I used to run our KAG servers on CentOS way back when (around 400's). After a certain update came out, that required some new dependencies which CentOS and older Linux distributions didn't have (worked this out using gdb), our servers stopped working. Anyway I think the devs tried to make a work around for it but ulitmately it failed iirc and KAG lost support for those operating systems.
     
  13. incarnum

    incarnum Shopkeep Stealer

    Messages:
    35
    It'd be great if you could provide me with the missing libraries but other than that yeah, use a better server OS. :shad: