Installing BossTDS on recent distros, such as Centos 5 or newer, Ubuntu 10.04 or newer, Debian 6 or newer is very easy. It takes literally three steps to do this:

  1. Connect to your server/VPS by ssh as root
  2. Download the package for your Linux distribution
  3. Install it with the package manager of your distribution

  4. Important: please pay attention and choose the right package for your VPS. Most likely it should be the 64 bit one.

    If you upgrade your TDS from 2.x versions please read about incompatible changes in v. 3.x.

For Debian 7 or newer/Ubuntu 12.04 or newer, 64 bit: wget http://bosstds.com/static/distr/bosstds_4.9.4_amd64.deb
dpkg -i bosstds_4.9.4_amd64.deb

For Centos 5.11 or newer/Fedora 23 or newer, 64 bit: wget http://bosstds.com/static/distr/bosstds-4.9.4-1.x86_64.rpm
rpm -Uvh bosstds-4.9.4-1.x86_64.rpm

For Debian 7 or newer/Ubuntu 12.04 or newer, 32 bit: wget http://bosstds.com/static/distr/bosstds_4.9.4_i386.deb
dpkg -i bosstds_4.9.4_i386.deb

For Centos 5.11 or newer/Fedora 23 or newer, 32 bit: wget http://bosstds.com/static/distr/bosstds-4.9.4-1.i386.rpm
rpm -Uvh bosstds-4.9.4-1.i386.rpm

if you see an error like "wget: command not found" use "curl -O http://..." instead of "wget http://...".

To upgrade your TDS to new versions later perform exactly the same steps with the new versions of packages. If the TDS won't restart after the upgrade in 3-5 minutes or if it shows the old version, run /etc/init.d/bosstds restart command.

If everything went ok, after these steps you should have a working trial TDS listening on a default 18001 port. Point your domain to the IP of the server and navigate in your browser to http://yourtds.yourdomain.com:18001/ to test if your TDS actually works. You will be prompted to create an admin account for your TDS. Create the account and login to the control panel. Click 'Validate License' button. In a few seconds you will see if BossTDS can connect to license servers or not.

If you have more than one IP on your VPS, navigate to Tools->Settings menu and input one of these IPs into the 'Bind to IP' field.

If you have problems installing packages with bundled Erlang, or have a Linux distribution for which we haven't such packages yet or if you just want to use system or manually compiled Erlang refer to the advanced installation guide.

Run on 80 port

You can run BossTDS on standard 80 (http) port, so that instead of http://yourtds.yourdomain.com:18001/ you could use http://yourtds.yourdomain.com. It has its' own web server after all.
There are two ways to do this - Simple and Reverse Proxy.


You may use Simple mode if you 100% sure that there will be no other http servers such as Apache or Nginx which run on 80 port on this box.
If you're going to run Apache or Nginx on the same server where BossTDS is installed and run BossTDS on 80 port in the same time - skip to Reverse Proxy section.

  • Run on 80 port, simple
    1. Edit your boss.config file

      nano /opt/bosstds/boss.config

      Find {port, 18001} option and change 18001 to 80.
      Find {reverse_proxy, off} option and ensure that it is off. Default value is off.
      Save the file with 'Ctrl+X', 'Y', Enter

    2. Restart the BossTDS

      /etc/init.d/bosstds restart
  • Run on 80 port, Reverse Proxy mode behind Nginx or Apache2

    Nginx is the recommended server if you're going to run BossTDS in reverse proxy mode. You may want to use this mode even if you don't have any other services on the 80 port, just in case.

    Apache is not recomended as reverse proxy, under heavy load it will slow down your TDS and will eat lots of RAM. Still it is possible to use it if you really want to.

    Both Nginx and Apache require the same configuration of BossTDS.

    SSH to your server. Then perform the following procedure:

    1. Edit your boss.config file

      nano /opt/bosstds/boss.config

      Find {reverse_proxy, off} option and set it to on: {reverse_proxy, on}.
      Save the file with 'Ctrl+X', 'Y', Enter

    2. Restart the BossTDS

      /etc/init.d/bosstds restart
    Nginx server configuration (you can put it in the /etc/nginx/conf.d/bosstds.conf):
        upstream bosstds  {
              server 127.0.0.1:18001;
        }
        server {
                listen 80;
                server_name yourtds.yourdomain.com; #<- insert here your real domain name
                set_real_ip_from  127.0.0.1;
                access_log off;
                location /static/ {
                    root /opt/bosstds/priv/;
                }
                location / {
                        proxy_pass  http://bosstds;
                        proxy_redirect off;
                        proxy_buffering off;
                        proxy_set_header        Host            $host;
                        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    
                }
        }
    
    Apache2 Virtual host configuration:
    <VirtualHost *:80>
            ProxyPreserveHost       On
            ProxyRequests           off
            ProxyPass               /       http://127.0.0.1:18001/ keepalive=Off
            ProxyPassReverse        /       http://127.0.0.1:18001/
    
            #replace with your real domain
            ProxyPassReverseCookieDomain 127.0.0.1 yourtds.yourdomain.com
    
            #replace with your real domain
            ServerName yourtds.yourdomain.com
    </VirtualHost>
    

Useful commands/Troubleshooting

  • Open port 18001 on Centos 7

    SSH to the server

    firewall-cmd --zone=public --add-port=18001/tcp --permanent
    firewall-cmd --reload


  • Open port 18001 on Ubuntu with UFW firewall

    SSH to the server

    ufw allow 18001
    


  • Open port 18001 on Centos 6 (iptables)

    SSH to the server

    iptables -I INPUT -p tcp -m tcp --dport 18001 -j ACCEPT
    service iptables save


  • Open port 18001 on Centos 6 (iptables with apf)

    SSH to the server. Edit /etc/apf/conf.apf file.

    nano /etc/apf/conf.apf

    Find line that read as follows:

    IG_TCP_CPORTS

    Add port 18001 (keep all other ports):

    IG_TCP_CPORTS="18001,22,25,53,80,443,993,904,...." 

    Save with Ctrl+X, S

    Restart the APF

    /etc/init.d/apf restart


  • SELinux and nginx

    If you install the TDS on a distribution with SELinux enabled and want to use it in reverse proxy mode behind nginx you might need to run the following command from the shell:

    setsebool -P httpd_can_network_connect 1

    It is possible to detect that you need to do this if you have problems connecting to the TDS running behind nginx and in the /var/log/nginx/error.log you see errors such as

    connect() to 127.0.0.1:18001 failed (13: Permission denied) while connecting to upstream


  • OpenVZ virtualization and CPU count

    Sometimes when you have the TDS installed on an OpenVZ-based VPS, TDS runtime detects CPUs count in the virtualization container as equal to the number of the CPUs of the whole server box. This number is usually quite big, in low hundreds. As the runtime creates a scheduler thread for each CPU, this could quickly hit the system limitations and result in various failures, such as for example inability of the TDS to start or restart.
    To fix this, you need to explicitly instruct the TDS runtime to use exact CPUs count, usually 1 to 4, depending on your VPS plan.

    You can set this number in the /opt/bosstds/boss.config file using the {vm_args, "+S 1"} parameter - for 1 logical CPU. Change 1 to the actual number of CPUs in your VPS.

    nano /etc/bosstds/boss.config

    Find the line that read as follows:

    {compiler_options, [no_debug_info, inline_list_funcs, no_line_info]},

    add {vm_args, "+S 1"}, line prior to this line, so it would look like this:

    {vm_args, "+S 1"},
    {compiler_options, [no_debug_info, inline_list_funcs, no_line_info]},

    Save with Ctrl+X, S

    Restart the TDS

    /etc/init.d/bosstds restart

    If you cannot restart the TDS because you already hit the limits, do either reboot of the VPS or find the process ID of the BossTDS with command pgrep beam and then kill it with kill [process number]



  • Slowdown or packet loss on busy servers

    If you have 20M or more hits/day you may experience packet loss or slowdown. If you see the "nf_conntrack: table full, dropping packet" errors in the /var/log/messages you need to follow this guide.

If you have any problems you can always contact our support. We will help you to setup your server and install the TDS on it. It is free and with no obligations.

www.megastock.ru www.paypal.com www.paxum.com
Hide dock Show dock Back to top
Loading