Tutorial Installing tShock / Mono (CentOS 6.5)

Discussion in 'Guides and Tutorials' started by atom0s, Jun 16, 2014.

  1. atom0s

    Plugin Developer

    Joined:
    Feb 9, 2012
    Messages:
    75
    This is a small guide on installing tShock and Mono on CentOS 6.5, I had some issues getting things going with this distro (and specific version) since the install of Mono is fairly scarce. But this will help those that are seeming to try and use it themselves too.

    Installing Mono
    To start, lets install Mono first. As of posting this guide, this will install Mono 3.4.0.
    • Open /etc/yum.repo.d/mono.repoin your favorite editor.
      • The file probably does not exist you need to create it!
    • Add the following text to the above file:
      • Code:
        [home_tpokorra_mono]
        name=mono and monodevelop (CentOS_CentOS-6)
        type=rpm-md
        baseurl=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/
        gpgcheck=1
        gpgkey=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/repodata/repomd.xml.key
        enabled=1
    • Save the file and exit your editor.
    • Run an update on yum first before we try to install anything via:
      • yum update
    • Next, lets install the needed Mono packages with:
      • yum install mono-*opt
    • Accept any downloads it requires and such, you should only need to say yes to 1 prompt.
    • Next we need to register executables to the binfmt via the following command:
      • echo ':CLR:M::MZ::/usr/local/bin/mono:' > /proc/sys/fs/binfmt_misc/register
    • Next we need to adjust our PATH variable. I personally edit the .bashrc file for this.
      • Open ~/.bashrc in your favorite editor.
      • Near the top (above the current alias' if any) add the following line:
        • export PATH=/opt/mono/bin:$PATH
    Mono should now be installed and working.
    You can type mono --version to print out the version info.


    Installing tShock
    Installing tShock is very straight forward.
    Done, tShock is installed.


    Running tShock
    Next, to run tShock we do the following:
    • cd /home/tshock
    • mono TerrariaServer.exe
    And that is it. tShock should start without issue. :)


    Help, my map does not show up! Players just fall endlessly!
    This is due to missing libs. Shutdown your server and run the following command:
    find / -name libMonoPosixHelper.so

    This should locate the library within 1 or more directories. For example like this:
    [[email protected] /]# find / -name libMonoPosixHelper.so
    /opt/mono/lib/libMonoPosixHelper.so
    /usr/local/src/mono-3.4.0/support/.libs/libMonoPosixHelper.so
    [[email protected] /]#

    We need to add the /opt/mono/lib folder to our environment variables library path.
    To do that, do the following:
    • Open ~/.bashrc in your favorite editor.
      • Locate were we added export PATH and under that add:
        • export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH
    Be sure to change the /opt/mono/lib to the folder that was found in your find results!
     
    • Like Like x 3
  2. Strinkor

    Plugin Developer Zero Day Plugin Author

    Joined:
    Jun 4, 2014
    Messages:
    65
    Good job. But i have VDS host with Windows 8 Server 2012 :p
     
  3. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,593
    Then you shouldn't need to follow this tutorial, as it's for Centos 6.5 with mono :p
     
  4. atom0s

    Plugin Developer

    Joined:
    Feb 9, 2012
    Messages:
    75
    Uh.. grats? Why bother responding at all if this has nothing to do with what you need then?
     
    • Like Like x 1
  5. theshadyonehd

    theshadyonehd Level 1

    Joined:
    May 28, 2015
    Messages:
    6
    Having the issue listed here: https://tshock.co/xf/index.php?threads/terrain-not-generating.3733/#post-39923

    I have followed all these steps and no luck,

    With this, do I just insert that export path straight in or do i need to modify it?
     
  6. Linthiel

    Linthiel Level 0

    Joined:
    Mar 24, 2016
    Messages:
    1
    Hello,

    Why are you installing mono to opt? It works without issue in its default install path. I see this alternate install path copy pasta to everywhere with no reason which causes you to edit your bash file needlessly.