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. Speedrookie

    Speedrookie Space Spelunker

    The very first time i did this i did not and i had the error that cant find library files or what ever.

    Could you add me on skype and instruct me through it because its pretty bad that my friend with a degree in system administration cant figure this out. Skype: Speedrookie
     
  2. not using skype and sorry going to bed 3am here,

    the very first time you did not do all the steps exactly , you will have to redo, and to redo properly

    nano /etc/fstab

    remove the lines with /chroot-starbound in

    umount /chroot-starbound/dev/pts
    umount /chroot-starbound/dev
    umount /chroot-starbound/proc
    umount /chroot-starbound/sys

    rm /chroot-starbound -fr

    And restart this time copy paste one line per line so you will not miss something. good luck
     
  3. kaedis

    kaedis Space Hobo

    Hello, my server CentOS x64.
    when i use:
    i get this error:
    Please help me(
     
  4. steam cmd issue, can't help you never got that one, try to get help in the Steam for Linux group maybe someone already solved this http://steamcommunity.com/app/221410 or if this should be fixed this is the place to report
     
  5. kaedis

    kaedis Space Hobo

    O_O
    i make reboot (init 6) and use "./steamcmd.sh +login login password +f...."
    my serv in start to download starbound!
     
  6. Speedrookie

    Speedrookie Space Spelunker

    I get here and I am lost:
    Code:
    # <file system> <mount point>  <type>  <options>      <dump>  <pass>
    /dev/sda2      /      ext3    errors=remount-ro      0      1
    /dev/sda3      swap    swap    defaults        0      0
    /dev/sda4      /home  ext3    defaults        1      2
    proc            /proc  proc    defaults                0      0
    sysfs          /sys    sysfs  defaults                0      0
    tmpfs          /dev/shm        tmpfs  defaults        0      0
    devpts          /dev/pts        devpts  defaults        0      0
    /dev /chroot-starbound/dev none bind 0 0
    /dev/pts /chroot-starbound/dev/pts none bind 0 0
    /proc /chroot-starbound/proc proc defaults,noatime 0 0
    /sys /chroot-starbound/sys sysfs defaults,noatime 0 0
    /dev /chroot-starbound/dev none bind 0 0
    /dev/pts /chroot-starbound/dev/pts none bind 0 0
    /proc /chroot-starbound/proc proc defaults,noatime 0 0
    /sys /chroot-starbound/sys sysfs defaults,noatime 0 0
    /dev /chroot-starbound/dev none bind 0 0
    /dev/pts /chroot-starbound/dev/pts none bind 0 0
    /proc /chroot-starbound/proc proc defaults,noatime 0 0
    /sys /chroot-starbound/sys sysfs defaults,noatime 0 0
    /dev /chroot-starbound/dev none bind 0 0
    /dev/pts /chroot-starbound/dev/pts none bind 0 0
    /proc /chroot-starbound/proc proc defaults,noatime 0 0
    /sys /chroot-starbound/sys sysfs defaults,noatime 0 0
    
     
  7. remove the lines with /chroot-starbound in
     
  8. Speedrookie

    Speedrookie Space Spelunker

  9. Im in Steam, add me but leave a message first on my profile page because I usually blind reject, hit the steam community link on the guide to find me
     
  10. Stadl0r

    Stadl0r Contact!

    Thanks for this great guide. One question I had is how might I enable a way to restart the starbound service if it crashes the service alone and not the server itself?

    I've setup a CRON job for the meantime but not sure if it's the bes tsolution
     
    Last edited: Dec 21, 2013
  11. I was thinking to setup this too but I think I fixed the main crash. Don't your server crash sometimes with TcpServer unable too work, too many open files ?
     
  12. Kingie

    Kingie Poptop Tamer

    I've installed alle the packages as described at the first post of this tutorial but I still can't start the starbound server. I've installed it with steam and successfully installed it through the steamcmd. I also completely compiled the C++ library etc. Anybody else got the following errors and knows how to solve them?

    Code:
    [root@srv02 linux64]# ./launch_starbound_server.sh
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./starbound_server)
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./starbound_server)
    ./starbound_server: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./starbound_server)
    
     
  13. My guess would be you missed the link in the steps because compiling+linking newer gcc will get ride of this error

    double check the links with

    ls -la /starbound/linux64/libstdc++.so.6
    ls -la /starbound/linux64/libgcc_s.so.1

    They must point to your

    /tools/gcc-4.8.2/lib64/libstdc++.so.6
    /tools/gcc-4.8.2/lib64/libgcc_s.so.1

    if not then rexecute the step

    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

    Remember each steps are dependent of each other, you do not choose what to run or what not, if you follow it you will get it
     
  14. Kingie

    Kingie Poptop Tamer

    I might've cheated a bit since I didn't want to create the chroot and everything. I compiled the whole gcc thing but without the "prefix" command. I figured it would install in the default libraries directories so I didn't need any links.

    Code:
    [root@srv02 linux64]# ls -lah /etc/starbound/linux64/libstdc++.so.6
    lrwxrwxrwx 1 root jeremy 25 Dec 23 00:17 /etc/starbound/linux64/libstdc++.so.6 -> /usr/lib64/libstdc++.so.6
    [root@srv02 linux64]# ls -lah /etc/starbound/linux64/libgcc_s.so.1
    lrwxrwxrwx 1 root jeremy 20 Dec 23 00:17 /etc/starbound/linux64/libgcc_s.so.1 -> /lib64/libgcc_s.so.1
    
    Edit: added results
     
    Last edited: Dec 22, 2013
  15. not recommended this way because you attempts to merge a newer gcc in centos and you may break your system because centos is not built for this library

    chroot is cool way to enclose everything into the subfolder, if a hacker compromise your server he will not have access to your base system and other services, stops most script kiddies and will not conflict with your base system
     
  16. Kingie

    Kingie Poptop Tamer

    I am not so much worried about security since my server is mainly closed to the outside world and I basically don't use any standard ports from the outside world to my system. Besides, I first tested it on a VM with a simular install instead of on the server itself. Will it also work when I compile only the GCC to a separate folder? And then link the libraries with #ln -s to the installation folder of the GCC?
     
  17. since u did not follow the guid u need to find where the gcc installed newest gcc libstdc++.so.6

    find / -name "libstdc++.so.6" -print

    then u link

    ln -s /<path> /starbound/linux64/libstdc++.so.6

    sure thats what Im doign in the guide I install in separate folder /tools/gcc-4.8.2 and they are linked to the starbound dir so only starbound can find it technically
     
  18. Kingie

    Kingie Poptop Tamer

    The ones in /usr/lib64 are the newer ones seeing this command:
    Code:
    [root@srv02 linux64]# find / -name "libstdc++.so.6" -exec ls -lah {} \;
    lrwxrwxrwx 1 root jeremy 25 Dec 23 00:17 /etc/starbound/linux64/libstdc++.so.6 -> /usr/lib64/libstdc++.so.6
    lrwxrwxrwx 1 root root 19 Dec 22 22:10 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.13
    lrwxrwxrwx 1 root jeremy 19 Dec 22 23:21 /usr/local/lib64/libstdc++.so.6 -> libstdc++.so.6.0.18
    lrwxrwxrwx 1 root root 19 Dec 22 23:45 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.13
    -rwxr-xr-x 1 root jeremy 3.6M Sep  4 21:17 /root/steam/linux32/libstdc++.so.6
    lrwxrwxrwx 1 root jeremy 19 Dec 22 22:32 /root/gcc-4.8.2/stage1-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6 -> libstdc++.so.6.0.18
    lrwxrwxrwx 1 root jeremy 19 Dec 22 23:16 /root/gcc-4.8.2/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6 -> libstdc++.so.6.0.18
    lrwxrwxrwx 1 root jeremy 19 Dec 22 23:04 /root/gcc-4.8.2/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6 -> libstdc++.so.6.0.18
    -r-xr-xr-x 1 1000 1000 3.7M Apr 22  2013 /root/linux32/libstdc++.so.6
    
    I think I am quickly going to recompile the GCC but in a separate folder to see if it will work after that. This machine isn't that imported, just want to know how to get it to work on a VM before installing it on my live "server" where there are other things I use...:geek:
     
  19. nop newest is at /usr/local/lib64/libstdc++.so.6
     
  20. djtyral

    djtyral Void-Bound Voyager

    @class101 I'm doing the steps exactly as shown. There's nothing in mounts, /proc/mounts, and I've started fresh.

    Code:
    [root@blastoise: /] # mount
    rootfs on / type rootfs (rw)
    /dev/root on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
    none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    none on /dev type devtmpfs (rw,relatime,size=4034776k,nr_inodes=1008694,mode=755)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    /dev/sda1 on /boot type ext3 (rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=writeback)
    /dev/sda4 on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
    /dev/sdb1 on /home2 type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
    tmpfs on /dev/shm type tmpfs (rw,relatime)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
    [root@blastoise: /] # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /dev/root / ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0
    none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
    none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
    none /dev devtmpfs rw,relatime,size=4034776k,nr_inodes=1008694,mode=755 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    /dev/sda1 /boot ext3 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=writeback 0 0
    /dev/sda4 /home ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
    /dev/sdb1 /home2 ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
    tmpfs /dev/shm tmpfs rw,relatime 0 0
    none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
    [root@blastoise: /] # mkdir -p /chroot-starbound/
    [root@blastoise: /] # mkdir -p /chroot-starbound/var/lib/rpm
    [root@blastoise: /] # rpm --rebuilddb --root=/chroot-starbound/
    [root@blastoise: /] # 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
    warning: /chroot-starbound/var/tmp/rpm-tmp.9z3bh8: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    error: open of /chroot-starbound/var/tmp/rpm-tmp.9z3bh8 failed: No such file or directory
    /chroot-starbound/var/lib/rpm: No such file or directory
    What am I missing here?

    [root@blastoise: /] # uname -i
    x86_64
    [root@blastoise: /] # uname -m
    x86_64
    [root@blastoise: /] # uname -a
    Linux blastoise.nanob.it 3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
     
    class101 likes this.

Share This Page