Community Forums Today's Posts     Member List     Archive    
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2009
    Location
    Oklahoma City
    Posts
    31

    Linux + MySQL HOWTO with sys init script

    Edit by mod
    Please don't use this outdated script anymore! The script got an overhaul long time ago.
    Please use the minimal or startscript instead


    Plan on where to put the installation
    Code:
    cd /usr/local/bin
    and download it
    (32bit)
    Code:
    wget http://ftp.4players.de/pub/hosted/ts3/releases/beta-2/teamspeak3-server_linux-x86-3.0.0-beta2.tar.gz
    (64bit)
    Code:
    wget http://ftp.4players.de/pub/hosted/ts3/releases/beta-2/teamspeak3-server_linux-amd64-3.0.0-beta2.tar.gz
    Unpack it
    Code:
    tar -xvf teamspeak3-server_linux-x86-3.0.0-beta2.tar.gz
    For simplicity's sake I renamed the folder to tss3 (I have a tss2 folder as well)
    Code:
     mv teamspeak3-server_linux-x86 tss3
    If you want, you can link your logs to the /var/log folder
    Code:
    cd tss3
    rm -rf logs
    ln -s /var/logs/tss3 logs
    Go into mysql console, create your TeamSpeak database and grant access to it. I called mine Teamspeak3. In this instance I used a user called teamspeak. Note this is not a Linux user, just a database access user. Read the MySQL manual on setting up users. If you're already using TS2, you probably have this user setup already.
    Code:
    create database teamspeak3;
    use teamspeak3;
    GRANT ALL PRIVILEGES ON *.* to teamspeak;
    GRANT ALL PRIVILEGES ON *.* to root;
    exit
    There is NO NEED FOR A SERVER.INI
    However, you'll need a ts3db_mysql.ini
    Code:
    [config]
    host=localhost
    port=3306
    username=teamspeak
    password=thepassword
    database=teamspeak3
    You do not need to specify ts3db_mysql.ini in the command line parameters. It looks for it automatically if you are using the parameter "dbplugin=ts3db_mysql".

    For personal reasons I renamed to binary to "ts3server_linux". Start it up for the 1st time and check the server messages for any errors.
    Code:
    mv ts3server_linux_x86 ts3server_linux
    ./ts3server_linux dbplugin=ts3db_mysql dbsqlcreatepath=create_mysql/
    If the MySQL server or user isn't set up correctly, you might see some error messages like "Access denied for user 'root'@'localhost'" (database user not setup or ts3db_mysql.ini not setup) or this (no CREATE permissions for database user):
    Code:
    2009-12-20 09:35:37.243938|INFO    |ServerLibPriv |   | Server Version: 3.0.0-beta1 [Build: 9366]
    2009-12-20 09:35:37.249919|INFO    |DatabaseQuery |   | dbPlugin name:    MySQL plugin, (c)TeamSpeak Systems GmbH
    2009-12-20 09:35:37.250366|INFO    |DatabaseQuery |   | dbPlugin version: 1
    2009-12-20 09:35:37.261568|ERROR   |DatabaseQuery |   | db_exec() CREATE TABLE channel_properties (  server_id int unsigned,  id     int error: CREATE command d
    enied to user 'teamspeak'@'localhost' for table 'channel_properties'
    2009-12-20 09:35:37.261997|CRITICAL|SQL           |   | db_CreateTables() unable to create tables
    If successful, you'll get something like this:
    Code:
    2009-12-20 10:06:38.609403|INFO    |ServerLibPriv |   | Server Version: 3.0.0-beta1 [Build: 9366]
    2009-12-20 10:06:38.615637|INFO    |DatabaseQuery |   | dbPlugin name:    MySQL plugin, (c)TeamSpeak Systems GmbH
    2009-12-20 10:06:38.616076|INFO    |DatabaseQuery |   | dbPlugin version: 1
    2009-12-20 10:06:39.469868|INFO    |SQL           |   | db_CreateTables() tables created
    2009-12-20 10:06:40.698683|WARNING |Accounting    |   | Unable to find valid license key, falling back to limited functionality
    2009-12-20 10:06:40.994918|INFO    |FileManager   |   | listening on 0.0.0.0:30033
    2009-12-20 10:06:42.050210|INFO    |VirtualServer |  1| listening on 0.0.0.0:9987
    2009-12-20 10:06:42.056708|INFO    |VirtualServer |  1| client 'server'(id:0) added token for servergroup 'Server Admin'(id:6)
    2009-12-20 10:06:42.058521|WARNING |VirtualServer |  1| --------------------------------------------------------
    2009-12-20 10:06:42.060373|WARNING |VirtualServer |  1| ServerAdmin token created, please use the line below
    2009-12-20 10:06:42.061824|WARNING |VirtualServer |  1| token=g257Vkg/TDQYdD3W/cuMYzE2QEedr1BwJfJ9Cuzl
    2009-12-20 10:06:42.073674|WARNING |VirtualServer |  1| --------------------------------------------------------
    2009-12-20 10:06:42.075202|INFO    |VirtualSvrMgr |   | dbLoadVirtualServers() VirtualServer(1) started (Default)
    2009-12-20 10:06:42.089856|INFO    |Query         |   | listening on 0.0.0.0:10011
    Take note of the token - you will need it when you launch your TS3 client and connect with the user you want to be admin with.

    Finally, a sysinit script. I have RedHat, so it goes into /etc/init.d and since I named the script teamspeak3, I add it to runlevel 3 by using the command
    Code:
    chkconfig --add teamspeak3
    My teamspeak3 sys init script for RH Fedora:
    Code:
    #! /bin/bash
    #
    # Author: Shad Hartley
    #
    # chkconfig: 2345 65 90
    # description:  This script starts/stops/restarts TeamSpeak voice chat server
    #
    #
    #=======================================================================
    #========               CONFIGURATION PARAMETERS                ========
    #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========
    #=======================================================================
    PROGRAM=ts3server_linux
    TS3_DIR=/usr/local/bin/tss3/
    OPTIONS=dbplugin=ts3db_mysql
    #=======================================================================
    
    
    . /etc/rc.d/init.d/functions
    
    case "$1" in
        start)
            cd $TS3_DIR
            echo -n $"Starting TeamSpeak3: "
            ./$PROGRAM $OPTIONS >/dev/null 2>&1 &
            [ $? -eq 0 ] && echo_success || echo_failure
          echo
            ;;
        stop)
           echo -n $"Stopping TeamSpeak3: "
            killall -s 9 $PROGRAM >/dev/null 2>&1
            [ $? -eq 0 ] && echo_success || echo_failure
            echo
            ;;
        restart)
            $0 stop && sleep 5 && $0 start || return=$rc_failed
            ;;
        *)
            echo "Usage: $0 {start|stop|restart}"
            exit 1
    esac
    exit 0
    Last edited by dante696; 24-02-2011 at 09:34.

  2. #2
    Join Date
    Feb 2008
    Location
    Wisconsin
    Posts
    54
    Can you give us a dummies how to on using the "startup applications" method in Ubuntu? It just will not work via the startup applications method (so TS3 server is started when machine reboots, automatically).

    I can get a server running well enough for my friends and I but this is day 1 for me and Linux and we are not getting along very well. Most documentation is written in langauge that intelligent people find confusing. I'm not a computer person like a Linux user is a computer person.

    The whole permissions thing is driving me batty.

  3. #3
    Join Date
    Dec 2009
    Location
    Oklahoma City
    Posts
    31
    The example was for a Linux system that has a system V like inits (RH, Debian, Suse). Not sure about Ubuntu. Found this link, but it seems simplistic for a setting up a server program. Perhaps somebody who knows how to package it specifically for Ubuntu might voluteer....

  4. #4
    Join Date
    Dec 2009
    Location
    Enid, Ok
    Posts
    10

    Unhappy

    Quote Originally Posted by SShaadd View Post
    The example was for a Linux system that has a system V like inits (RH, Debian, Suse). Not sure about Ubuntu. Found this link, but it seems simplistic for a setting up a server program. Perhaps somebody who knows how to package it specifically for Ubuntu might voluteer....
    Was working on this, however, TS3 server crashes have taken me away from my duties, lol

  5. #5
    Join Date
    Feb 2008
    Location
    Wisconsin
    Posts
    54

    tried that...

    I have tried the method indicated without success. I forget which folder all those shortcuts end up in, but one never shows up for TS3, even though the entry is clearly in the list of startup apps.

  6. #6
    Join Date
    Dec 2009
    Location
    Arizona
    Posts
    3
    resolved my own issue. thx
    Last edited by AZDiablo; 22-12-2009 at 23:08.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 17.Dez 2008 / Teamspeak with MYSQL 5.0/5.1 Dbexpress driver / HowTo'?
    By Demens in forum [TeamSpeak 2] Server Support
    Replies: 6
    Last Post: 22-12-2008, 13:10
  2. TS2 DB mysql -> server.dbs oder mysql support unter 64 bit linux
    By DarkSun in forum [TeamSpeak 2] Server Support
    Replies: 1
    Last Post: 18-07-2007, 09:35
  3. HowTo Team Speak 2 Linux 64 Bit mysql
    By socket in forum [TeamSpeak 2] Server Support
    Replies: 0
    Last Post: 23-09-2006, 17:24
  4. please help me run the TSserver in linux for mysql
    By m4yb3o in forum [TeamSpeak 2] Server Support
    Replies: 4
    Last Post: 27-08-2006, 09:21
  5. Linux With MySQL do not Work (screenshot)
    By GNN_Ricardo in forum [TeamSpeak 2] Server Support
    Replies: 1
    Last Post: 20-03-2006, 05:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •