1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Tutorial CentOS 32-bit/64-bit complete dedicated server guide, chroot, startup script and newest libstdc++

Discussion in 'Multiplayer' started by class101, Dec 15, 2013.

  1. Note: CentOS 7 works, think to uncomment the 7.1 rpm link and comment the 6.7 one, by default the 6.7 is set.
    If using 7.1, compiling gcc should not be required anymore. Let me know if you find more 7.1 compatibilities issues or changes.

    Tip : Guide designed for the 'Fusion Gamer' style (you can set it in the forum preferences)
    New : Guide ready for Furious Koala (small launcher file removed but required to us)

    [​IMG]

    [​IMG]

    Once everything is set you will have access to few more commands:

    From inside the chroot
    [​IMG]

    Or from outside
    [​IMG]

    Note: This is a generic method, it has been successfully tested with Starbound on CentOS 6.x 32-bit and 64-bit and also after some slight modifications with Terraria and King Arthur's Gold servers.



    [​IMG]

    In the block below all the commands of the guide, if you are new with Linux I recommend to start at section 2.

    (See the guide section 2. for more details)
    Code:
    cd /
    mkdir -p /chroot-starbound/
    mkdir -p /chroot-starbound/var/lib/rpm
    rpm --rebuilddb --root=/chroot-starbound/
    # CentOS 7.1 ?
    # rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/7/os/$(uname -i)/Packages/centos-release-7-1.1503.el7.centos.2.8.$(uname -m).rpm
    rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/6/os/$(uname -i)/Packages/centos-release-6-7.el6.centos.12.3.$(uname -m).rpm
    yum --installroot=/chroot-starbound install -y rpm-build yum
    cp /etc/resolv.conf /chroot-starbound/etc/resolv.conf
    cp /etc/sysconfig/network /chroot-starbound/etc/sysconfig/network
    cp /etc/rc.d/init.d/functions /chroot-starbound/etc/rc.d/init.d/functions
    echo "/dev /chroot-starbound/dev none bind 0 0" >> /etc/fstab
    echo "/dev/pts /chroot-starbound/dev/pts none bind 0 0" >> /etc/fstab
    echo "/proc /chroot-starbound/proc proc defaults,noatime 0 0" >> /etc/fstab
    echo "/sys /chroot-starbound/sys sysfs defaults,noatime 0 0" >> /etc/fstab
    mount -a
    cp /chroot-starbound/etc/skel/.??* /chroot-starbound/root
    chroot /chroot-starbound
    yum -y install screen wget gcc gcc-c++ make zip tar glibc procps vi nano initscripts SDL libvorbis libogg libpng freetype openssl
    yum -y update
    mkdir -p /tools/installers_to_delete/
      --[ Building the newer c++ lib to /tools/gcc-4.8.2/ ]--
        cd /tools/installers_to_delete/
        wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
        tar -xzvf gcc-4.8.2.tar.gz
        cd gcc-4.8.2
        ./contrib/download_prerequisites
        cd ..
        mkdir gcc-4.8.2-obj
        cd gcc-4.8.2-obj/
        $PWD/../gcc-4.8.2/configure --prefix=/tools/gcc-4.8.2 --enable-languages=c++ --disable-nls --disable-multilib --disable-libgcj --without-headers --disable-static
        --[ WARNING: can take several hours on single procs, and just around 20min on i7-like procs, can be quicker to generate at home and upload ]--
        make -j6
        make -j6 install
    useradd starbound
    mkdir /starbound
    mkdir -p /tools/steamcmd_linux
    mkdir -p /var/run/starbound
      --[ Installing Starbound Dedicated Server ]--
        cd /tools/steamcmd_linux
        yum -y install glibc.i686 libstdc++.i686
        wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
        tar -xzvf steamcmd_linux.tar.gz
        ./steamcmd.sh +login login password +force_install_dir /starbound/ +app_update 211820 validate +quit
      --[ Linking the newer c++ lib to Starbound ]--
        ln -s /tools/gcc-4.8.2/lib*/libstdc++.so.6 /starbound/linux$(getconf LONG_BIT)/libstdc++.so.6
        ln -s /tools/gcc-4.8.2/lib*/libgcc_s.so.1 /starbound/linux$(getconf LONG_BIT)/libgcc_s.so.1
    chown starbound:starbound /starbound -R
    chown starbound:starbound /var/run/starbound -R
    chmod 774 /starbound -R
    find /starbound -type d -exec chmod g+s {} \;
    chmod g+s /var/run/starbound
    su starbound /starbound/linux$(getconf LONG_BIT)/launch_starbound_server.sh
    
    

    (See the guide section 2. for more details) New
    Code:
    #!/bin/sh
    
    cd "$(dirname "$0")"
    
    LD_LIBRARY_PATH=./ ./starbound_server
    
    

    (See the guide section 3. for more details)
    Code:
    #!/bin/bash
    # chkconfig: 345 70 30
    # description: Start/stop Starbound server
    # tip: Ctrl-A + D (to detach from an interactive screen window)
    
    NAME="starbound_server"
    USERID=starbound
    BINDIR=/starbound/linux$(getconf LONG_BIT)
    SCREENDAEMON=/usr/bin/screen
    DAEMON=launch_starbound_server.sh
    PIDFILE=/var/run/starbound/sb.pid
    
    # All important args
    DAEMONARGS=""
    
    # Command sent to server to exit, try just "exit" to save world before exit. You WILL need to increase EXIT_TIMEOUT (try 30+)
    EXIT_COMMAND="exit"
    # wait X seconds for the server to exit
    EXIT_TIMEOUT=30
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Exit if screen cant be found
    [ -x "${SCREENDAEMON}" ] || exit 0
    # Exit if daemon cant be found
    [ -r "${BINDIR}/${DAEMON}" ] || exit 0
    # Exit if bin folder cant be found
    [ -d "${BINDIR}" ] || exit 0
    
    checkScreen() {
        doPID
        # Wipe the screen session marked as 'Dead' for false-positives checkScreen
        su ${USERID} -c "${SCREENDAEMON} -wipe" > /dev/null 2>&1
        if [ -e /var/run/screen/S-${USERID}/*.${NAME} ]; then return 0; fi
        return 1
    }
    
    checkPID() {
        doPID
        if [ -e ${PIDFILE} ] && kill -0 $(cat ${PIDFILE} 2>/dev/null) > /dev/null 2>&1; then return 0; fi
        return 1
    }
    
    doPID() {
        pidof -c starbound_server > ${PIDFILE}
        return 0
    }
    
    start() {
        echo -n $"Starting $NAME: "
        RETVAL=1
        if checkScreen || checkPID; then
            echo -n "(already running)";
        else
            su ${USERID} -c "${SCREENDAEMON} -dmS ${NAME} ${BINDIR}/${DAEMON} ${DAEMONARGS}";
            # Wait up to 10 seconds for it to start
            for i in {0..10}; do
                if checkPID; then RETVAL=0; break; fi # found running PID
                sleep 1
            done
        fi
        if [ $RETVAL = 0 ]; then
            success
        else
            failure
        fi;
        echo
        return $RETVAL
    }
    
    stop() {
        echo -n $"Stopping $NAME: "
        RETVAL=1
        if ! checkScreen || ! checkPID; then
            echo -n "(not running, or stale pidfile)"
        else
            kill -INT $(cat ${PIDFILE} 2>/dev/null) > /dev/null 2>&1;
            n=${EXIT_TIMEOUT}
            for (( i=0; i<n; i++ )); do
                if ! checkScreen; then RETVAL=0; break; fi;
                sleep 1;
            done
        fi
        if [ $RETVAL = 0 ]; then
            success
        else
            failure
        fi;
        echo
        return $RETVAL
    }
    
    cd ${BINDIR}
    case "$1" in
        start)
            start
        ;;
        stop)
            stop
        ;;
        restart)
            $0 stop
            $0 start
        ;;
        connect)
            if checkScreen; then
                # Use script to bypass TTY issues
                su ${USERID} -c "script -qc \"${SCREENDAEMON} -dr ${NAME}\" /dev/null"
            else
                echo "${NAME}: Connect failed. (screen not running)"
            fi
        ;;
        *)
            echo "Usage: ${NAME} {start|stop|restart|connect}" 2>&1
        ;;
    esac

    (See the guide section 4. for more details)
    Code:
    #!/bin/bash
    #
    # chroot_env      Start/Stop chroot env daemons
    #
    # chkconfig: 345 55 25
    # description:  Start/Stop chroot env daemons
    
    start() {
        chroot /chroot-starbound /etc/init.d/starbound start
    }
    
    stop() {
        chroot /chroot-starbound /etc/init.d/starbound stop
    }
    
    case "$1" in
        start)
            start
        ;;
        stop)
            stop
        ;;
        restart)
            stop
            start
        ;;
        *)
            echo "Usage: chroot_env {start|stop|restart}"
            exit 1
        ;;
    esac



    [​IMG]

    The block below will create a new chroot environment in /chroot-starbound:
    (The rpm link at http://mirror.centos.org/centos/6/os/ may change after each major CentOS update, I will do my best to update the link, feel free to contact else)
    Code:
    cd /
    mkdir -p /chroot-starbound/
    mkdir -p /chroot-starbound/var/lib/rpm
    rpm --rebuilddb --root=/chroot-starbound/
    # CentOS 7.1 ?
    # rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/7/os/$(uname -i)/Packages/centos-release-7-1.1503.el7.centos.2.8.$(uname -m).rpm
    rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/6/os/$(uname -i)/Packages/centos-release-6-7.el6.centos.12.3.$(uname -m).rpm
    yum --installroot=/chroot-starbound install -y rpm-build yum
    cp /etc/resolv.conf /chroot-starbound/etc/resolv.conf
    cp /etc/sysconfig/network /chroot-starbound/etc/sysconfig/network
    cp /etc/rc.d/init.d/functions /chroot-starbound/etc/rc.d/init.d/functions
    echo "/dev /chroot-starbound/dev none bind 0 0" >> /etc/fstab
    echo "/dev/pts /chroot-starbound/dev/pts none bind 0 0" >> /etc/fstab
    echo "/proc /chroot-starbound/proc proc defaults,noatime 0 0" >> /etc/fstab
    echo "/sys /chroot-starbound/sys sysfs defaults,noatime 0 0" >> /etc/fstab
    mount -a
    cp /chroot-starbound/etc/skel/.??* /chroot-starbound/root
    
    

    We can now switch to this new chroot with:
    Code:
    chroot /chroot-starbound
    
    

    Ensure now the new chroot is up to date and has the tools we need to install:
    Code:
    yum -y install screen wget gcc gcc-c++ make zip tar glibc procps vi nano initscripts SDL libvorbis libogg libpng freetype openssl
    yum -y update
    
    

    We will now compile the latest libstdc++.so.6 for the game server only. This is because by default CentOS 6.x ships with an older libstdc++ version and is not compatible with most modern game servers, this could be a very long step on older systems:
    (Tip: On single processors , use -j1 instead of -j6)
    Code:
    mkdir -p /tools/installers_to_delete/
    cd /tools/installers_to_delete/
    wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
    tar -xzvf gcc-4.8.2.tar.gz
    cd gcc-4.8.2
    ./contrib/download_prerequisites
    cd ..
    mkdir gcc-4.8.2-obj
    cd gcc-4.8.2-obj/
    $PWD/../gcc-4.8.2/configure --prefix=/tools/gcc-4.8.2 --enable-languages=c++ --disable-nls --disable-multilib --disable-libgcj --without-headers --disable-static
    make -j6
    make -j6 install
    
    

    The Valve developers provide a way to download Steam games directly from the command line:
    Code:
    useradd starbound
    mkdir /starbound
    mkdir -p /tools/steamcmd_linux
    mkdir -p /var/run/starbound
    cd /tools/steamcmd_linux
    yum -y install glibc.i686 libstdc++.i686
    wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
    tar -xzvf steamcmd_linux.tar.gz
    
    

    In the command line below replace login and password with yours:
    (Tip: You may need to use the escape character \ with special characters)
    ./steamcmd.sh +login login password +force_install_dir /starbound/ +app_update 211820 validate +quit


    The command line below supports both 32-bit and 64-bit version:
    Code:
    ln -s /tools/gcc-4.8.2/lib*/libstdc++.so.6 /starbound/linux$(getconf LONG_BIT)/libstdc++.so.6
    ln -s /tools/gcc-4.8.2/lib*/libgcc_s.so.1 /starbound/linux$(getconf LONG_BIT)/libgcc_s.so.1
    
    

    New Since Furious Koala update, you need to create manually once the launch_starbound_server.sh script
    Type nano /starbound/linux$(getconf LONG_BIT)/launch_starbound_server.sh and paste the following code
    Code:
    #!/bin/sh
    
    cd "$(dirname "$0")"
    
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./ ./starbound_server
    
    

    Set the game folder permissions more permissive to the starbound user:
    Code:
    chown starbound:starbound /starbound -R
    chown starbound:starbound /var/run/starbound -R
    chmod 774 /starbound -R
    find /starbound -type d -exec chmod g+s {} \;
    chmod g+s /var/run/starbound
    
    

    Test now it runs fine under the user starbound:
    Code:
    su starbound /starbound/linux$(getconf LONG_BIT)/launch_starbound_server.sh
    
    

    Congratulations ! You made it !

    Now you just need to put this as a service to have it running at computer start, to do so, follow the next section.​



    [​IMG]

    • If you followed the previous steps, the server should be running, hit Ctrl-C to close it now
    • Copy the block below in a new file and name it starbound, for this you can execute nano starbound
      Code:
      #!/bin/bash
      # chkconfig: 345 70 30
      # description: Start/stop Starbound server
      # tip: Ctrl-A + D (to detach from an interactive screen window)
      
      NAME="starbound_server"
      USERID=starbound
      BINDIR=/starbound/linux$(getconf LONG_BIT)
      SCREENDAEMON=/usr/bin/screen
      DAEMON=launch_starbound_server.sh
      PIDFILE=/var/run/starbound/sb.pid
      
      # All important args
      DAEMONARGS=""
      
      # Command sent to server to exit, try just "exit" to save world before exit. You WILL need to increase EXIT_TIMEOUT (try 30+)
      EXIT_COMMAND="exit"
      # wait X seconds for the server to exit
      EXIT_TIMEOUT=30
      
      # Source function library.
      . /etc/rc.d/init.d/functions
      
      # Exit if screen cant be found
      [ -x "${SCREENDAEMON}" ] || exit 0
      # Exit if daemon cant be found
      [ -r "${BINDIR}/${DAEMON}" ] || exit 0
      # Exit if bin folder cant be found
      [ -d "${BINDIR}" ] || exit 0
      
      checkScreen() {
          doPID
          # Wipe the screen session marked as 'Dead' for false-positives checkScreen
          su ${USERID} -c "${SCREENDAEMON} -wipe" > /dev/null 2>&1
          if [ -e /var/run/screen/S-${USERID}/*.${NAME} ]; then return 0; fi
          return 1
      }
      
      checkPID() {
          doPID
          if [ -e ${PIDFILE} ] && kill -0 $(cat ${PIDFILE} 2>/dev/null) > /dev/null 2>&1; then return 0; fi
          return 1
      }
      
      doPID() {
          pidof -c starbound_server > ${PIDFILE}
          return 0
      }
      
      start() {
          echo -n $"Starting $NAME: "
          RETVAL=1
          if checkScreen || checkPID; then
              echo -n "(already running)";
          else
              su ${USERID} -c "${SCREENDAEMON} -dmS ${NAME} ${BINDIR}/${DAEMON} ${DAEMONARGS}";
              # Wait up to 10 seconds for it to start
              for i in {0..10}; do
                  if checkPID; then RETVAL=0; break; fi # found running PID
                  sleep 1
              done
          fi
          if [ $RETVAL = 0 ]; then
              success
          else
              failure
          fi;
          echo
          return $RETVAL
      }
      
      stop() {
          echo -n $"Stopping $NAME: "
          RETVAL=1
          if ! checkScreen || ! checkPID; then
              echo -n "(not running, or stale pidfile)"
          else
              kill -INT $(cat ${PIDFILE} 2>/dev/null) > /dev/null 2>&1;
              n=${EXIT_TIMEOUT}
              for (( i=0; i<n; i++ )); do
                  if ! checkScreen; then RETVAL=0; break; fi;
                  sleep 1;
              done
          fi
          if [ $RETVAL = 0 ]; then
              success
          else
              failure
          fi;
          echo
          return $RETVAL
      }
      
      cd ${BINDIR}
      case "$1" in
          start)
              start
          ;;
          stop)
              stop
          ;;
          restart)
              $0 stop
              $0 start
          ;;
          connect)
              if checkScreen; then
                  # Use script to bypass TTY issues
                  su ${USERID} -c "script -qc \"${SCREENDAEMON} -dr ${NAME}\" /dev/null"
              else
                  echo "${NAME}: Connect failed. (screen not running)"
              fi
          ;;
          *)
              echo "Usage: ${NAME} {start|stop|restart|connect}" 2>&1
          ;;
      esac
    • Save the file and execute mv starbound /etc/init.d/ to move it in /etc/init.d/
    • Execute chmod 755 /etc/init.d/starbound to make it executable
    Congratulations ! You can now use the startup script like that:

    Make sure you stand in the chroot:
    Code:
    chroot /chroot-starbound
    
    

    And:
    Code:
    /etc/init.d/starbound start
    /etc/init.d/starbound stop
    /etc/init.d/starbound connect
    /etc/init.d/starbound restart
    
    



    [​IMG]

    This time we will repeat what we have done in 3. but outside the chroot.
    • Important : If you followed the previous steps, execute exit to quit the chroot
    • Copy the block below in a new file and name it chroot_env, for this you can execute nano chroot_env
      (if you don't have nano installed, get it with yum install nano)
      Code:
      #!/bin/bash
      #
      # chroot_env      Start/Stop chroot env daemons
      #
      # chkconfig: 345 55 25
      # description:  Start/Stop chroot env daemons
      
      start() {
          chroot /chroot-starbound /etc/init.d/starbound start
      }
      
      stop() {
          chroot /chroot-starbound /etc/init.d/starbound stop
      }
      
      case "$1" in
          start)
              start
          ;;
          stop)
              stop
          ;;
          restart)
              stop
              start
          ;;
          *)
              echo "Usage: chroot_env {start|stop|restart}"
              exit 1
          ;;
      esac
    • Save the file and execute mv chroot_env /etc/init.d/ to move it in /etc/init.d/
    • Execute chmod 755 /etc/init.d/chroot_env to make it executable
    • Execute chkconfig --add chroot_env to install it as a new system service

    Congratulations ! The game server will now automatically start when the computer start

    You can now start, stop and restart the game server from outside the chroot:
    Code:
    service chroot_env start
    service chroot_env stop
    service chroot_env restart
    
    



    [​IMG]

    Q: Help, I'm getting the following error when creating the chroot
    Code:
    warning: /chroot-starbound/var/tmp/rpm-tmp.jcalRs: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    error: open of /chroot-starbound/var/tmp/rpm-tmp.jcalRs failed: No such file or directory
    A: You are not running an official image of CentOS, but a modified build provided by OVH. To know if you are running an official CentOS build, type uname -a you should see something similar to 2.6.32-431.1.2.0.1.el6.x86_64 and not 3.10.9-xxxx-grs-ipv6-64 or 3.2.13-grsec-xxxx-grs-ipv6-64. Unfortunately at this time no workaround is known (I hope you understand why in my opinion and in the opinion of many other admins OVH is a bad hosting company).

    Q: How do you copy/paste, this is very long to type everything manually
    A: It is not required to type every lines manually, get Kitty and connect your 22/SSH tcp and you will be able to copy paste. You can also get WinSCP, good tool for file transfer through the same ssh port.



    [​IMG]

    version 1.0.6 - CentOS 6.7/7.1 link update (August 26th 2015)
    version 1.0.5 - CentOS 6.6 link update (November 7th 2014)
    version 1.0.4 - Furious Koala changes, launch_starbound_server.sh creation (January 26th 2014)
    version 1.0.3 - Updated the FAQ for people not knowing Kitty/WinSCP (January 06th 2014)
    version 1.0.2 - Updated the FAQ with a common error seen on CentOS build by OVH (December 31th 2013)
    version 1.0.1 - Fixed starbound script to support multiple chrooted game servers (pidof -c) (December 15th 2013)
    version 1.0 - Initial guide creation (December 15th 2013)

    Below is my server if you want to visit ;)

    [​IMG][​IMG]
     
    Last edited: Aug 26, 2015
  2. Khalimerot

    Khalimerot Scruffy Nerf-Herder

    Thank you !
    it works fine !

    For the FAQ :

    is it possible to run multiple server on different port? (i don't even know if the software give this possibility it's the first server i'm installing)
     
    class101 likes this.
  3. Thanks will put this in the FAQ

    Of course you can, you just need to build a new chroot, for this you replace every /char-starbound occurrence in the guide by /chroot-starbound2 for example, and also make sure each server will use different ports in the settings
     
  4. Khalimerot

    Khalimerot Scruffy Nerf-Herder

    need to reinstall everything again? :'(

    I was hoping for a switch to give a new config file at the software with other port / world settings

    So i just had to change the init.d script.
     
  5. Hmmmm maybe too but you will have to deal with conflict bugs I guess

    Proper way to would be to create a new chroot without compiling gcc and without logging in to Steam to download it again as they are the two longest steps this should be quick

    you compress what you did in the first chroot

    chroot /chroot-starbound/ && cd / && tar -zcvf starbound.tar.gz starbound
    chroot /chroot-starbound/ && cd /tools && tar -zcvf gcc-4.8.2.tar.gz gcc-4.8.2

    Then next time you build the chroot, instead of compiling gcc you will do

    cd /tools
    tar -xzvf gcc-4.8.2.tar.gz

    And before login to Steam

    cd /
    tar -xzvf starbound.tar.gz

    then once you will login to steam it revalidates the files, no download

    //edit: Just tested it works fine, btw caught and fixed an issue in starbound init script when you are running 2 servers or more
     
    Last edited: Dec 15, 2013
  6. Shankles

    Shankles Space Hobo

    Hey class101,

    First off, thanks a ton for the guide!
    I'm new to Linux and just recently started renting a VPS and was going through the paces to get a server up and running. I'm encountering an error when I input
    The Error is:
    Any troubleshooting is appreciated!
     
    class101 likes this.
  7. Last edited: Dec 17, 2013
    Shankles likes this.
  8. Shankles

    Shankles Space Hobo

    Using the alternate link you provided the issue persisted and I arrived at the same error. I replaced (-i) with (-v) and was prompted with a full list of commands and their functions. Not too familiar with linux commands :v
     
  9. dont replace , just add -v at end of command , run it and show the log, will probably give more infos why it sends you on www.centos.org

    //EDIT:
    could you show also the results of

    cat /etc/resolv.conf
    cat /etc/sysconfig/network-scripts/ifcfg-eth0

    I suspect you have a strange nameserver error because if I do a google search of "http://www.centos.org/6/os/x86_64/" only this thread returns so I think you are the only one experiencing this around
     
    Last edited: Dec 17, 2013
    Shankles likes this.
  10. Shankles

    Shankles Space Hobo

    Last edited: Dec 17, 2013
  11. it is rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/6/os/$(uname -i)/Packages/centos-release-6-5.el6.centos.11.1.$(uname -m).rpm -v

    else try
    cat /etc/resolv.conf

    change or write the dns to the google one, edit resolv.conf like that:

    nameserver 8.8.8.8
    nameserver 8.8.4.4


    cat /etc/sysconfig/network-scripts/ifcfg-*

    and in the ifcfg of your card you put

    DNS1=8.8.8.8
    DNS2=8.8.4.4

    and service network restart
     
  12. Shankles

    Shankles Space Hobo

    You'll have to bare with me, I'm not sure how to edit or even navigate to the config files to change the dns unless I can do that from my vps panel.
     
  13. yeh better in pm
     
  14. Speedrookie

    Speedrookie Space Spelunker

    [root@ks4001906 steamcmd_linux]# su starbound /starbound/linux$(getconf LONG_BIT)/launch_starbound_server.sh
    ./starbound_server: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS32

    Help this is for its first run!
     
  15. what is your os and 32bit or 64bit, and how did you obtained libstdc++.so.6

    I think you are on CentOS 32-bit and you attempted to get the supplied gcc-4.8.2-x86_64-unknown-linux.tar.gz

    If thats the case delete the 64-bit folder of libstdc++ and relink so the 32bit lib is correctly linked this time:

    Code:
    rm /tools/gcc-4.8.2/lib64 -fr
    ln -sf /tools/gcc-4.8.2/lib*/libstdc++.so.6 /starbound/linux$(getconf LONG_BIT)/libstdc++.so.6
    ln -sf /tools/gcc-4.8.2/lib*/libgcc_s.so.1 /starbound/linux$(getconf LONG_BIT)/libgcc_s.so.1
    su starbound /starbound/linux$(getconf LONG_BIT)/launch_starbound_server.sh
     
    Last edited: Dec 19, 2013
  16. Speedrookie

    Speedrookie Space Spelunker

    I am running CentOS 6.5 64 Bit and i updated the libraries,
     
  17. You did not followed all the steps then I double checked several time the procedures on 32 & 64 bit it is ok

    The message you got means you are loading libstdc++ in 32 bit with 64-bit server and this could not happen if you follow the steps
     
    Last edited: Dec 19, 2013
  18. Speedrookie

    Speedrookie Space Spelunker

    Ok so i do part 2 the install part 1 and this is what i get:

    Code:
    echo "/dev /chroot-starbound/dev none bind 0 0" >> /etc/fstab
    [root@ks4001906 /]# rpm -i --root=/chroot-starbound --nodeps http://mirror.centos.org/centos/6/os/$(uname -i)/Packages/centos-release-6-5.el6.centos.11.1.$(uname -m).rpm
    echo "/dev/pts /chroot-starbound/dev/pts none bind 0 0" >> /etc/fstab
    echo "/proc /chroot-starbound/proc proc defaults,noatime 0 0" >> /etc/fstab
    echo "/sys /chroot-starbound/sys sysfs defaults,noatime 0 0" >> /etc/fstab
    mount -a
    cp /chroot-starbound/etc/skel/.??* /chroot-starbound/rootwarning: /chroot-starbound/var/tmp/rpm-tmp.FsSsTH: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    error: open of /chroot-starbound/var/tmp/rpm-tmp.FsSsTH failed: No such file or directory
    /chroot-starbound/var/lib/rpm: No such file or directory
    [root@ks4001906 /]# yum --installroot=/chroot-starbound install -y rpm-build yum
    Loaded plugins: fastestmirror
    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
    Eg. Invalid release/
    removing mirrorlist with no valid mirrors: /chroot-starbound/var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
    [root@ks4001906 /]# cp /etc/resolv.conf /chroot-starbound/etc/resolv.conf
    cp: cannot create regular file `/chroot-starbound/etc/resolv.conf': No such file or directory
    [root@ks4001906 /]# cp /etc/sysconfig/network /chroot-starbound/etc/sysconfig/network
    cp: cannot create regular file `/chroot-starbound/etc/sysconfig/network': No such file or directory
    [root@ks4001906 /]# cp /etc/rc.d/init.d/functions /chroot-starbound/etc/rc.d/init.d/functions
    cp: cannot create regular file `/chroot-starbound/etc/rc.d/init.d/functions': No such file or directory
    [root@ks4001906 /]# echo "/dev /chroot-starbound/dev none bind 0 0" >> /etc/fstab
    [root@ks4001906 /]# echo "/dev/pts /chroot-starbound/dev/pts none bind 0 0" >> /etc/fstab
    [root@ks4001906 /]# echo "/proc /chroot-starbound/proc proc defaults,noatime 0 0" >> /etc/fstab
    [root@ks4001906 /]# echo "/sys /chroot-starbound/sys sysfs defaults,noatime 0 0" >> /etc/fstab
    [root@ks4001906 /]# mount -a
    mount: sysfs already mounted or /sys busy
    mount: according to mtab, none is already mounted on /sys
    mount: mount point /chroot-starbound/dev does not exist
    mount: mount point /chroot-starbound/dev/pts does not exist
    mount: mount point /chroot-starbound/proc does not exist
    mount: mount point /chroot-starbound/sys does not exist
    mount: mount point /chroot-starbound/dev does not exist
    mount: mount point /chroot-starbound/dev/pts does not exist
    mount: mount point /chroot-starbound/proc does not exist
    mount: mount point /chroot-starbound/sys does not exist
    mount: mount point /chroot-starbound/dev does not exist
    mount: mount point /chroot-starbound/dev/pts does not exist
    mount: mount point /chroot-starbound/proc does not exist
    mount: mount point /chroot-starbound/sys does not exist
    [root@ks4001906 /]# cp /chroot-starbound/etc/skel/.??* /chroot-starbound/root
     
  19. Speedrookie

    Speedrookie Space Spelunker

    Nothing seems to be right the chroot creation says nothign exists (witch it does not because it has not been created and that is what the command does) but when i go to enter the chroot:
    Code:
    [root@ks4001906 /]# chroot /chroot-starbound
    chroot: failed to run command `/bin/bash': No such file or directory
    
    So i did "cd /chroot-starbound" and the install of gcc runs fine.

    Next Problem is that you say: (Tip2: Want to bypass compilation ? Download gcc-4.8.2-x86_64-unknown-linux.tar.gz, extract in/chroot-starbound/tools/ and proceed to the next step) There is no /chroot-starbound/tools/

    Those are just the few starting issues!
     
  20. then if you compiled gcc forget tip2 its just if you want to save time and not compile gcc but better to understand what you are doing with this tip, in short not recommended, always better to compile and let the make install do the thing for you

    //edit: I have removed tip2, was too confusing
     
    Last edited: Dec 19, 2013

Share This Page