Today I had to upgrade my environment and install a dedicated TeamDrive Server machine without a screen, only text mode operation.
While setting this env up, I imagined that multiple TDPS Users want to do the same, let the TDPS server running on a “little machine with just a huge amount of disk storage” behind.
This was the reason to create the following how-to.
So, let us start to setup our TeamDrive Personal Server as a Service:
Part 1: Download and Installation
First of all, logon to your server and - if not already done - open a command box (bash).
Time by time you can download a new version of TDPS from http://www.teamdrive.com/de/download_server.html so please take a look an update the following command:
- Code: Select all
wget http://s3download.teamdrive.net/TeamDrivePersonalServerLinux_10044.tar.gz
next we'll extract the file
- Code: Select all
tar xzf TeamDrivePersonalServerLinux_10044.tar.gz
after that, we will move the new directory tdpsd into /opt, you can also choose /var or /usr/bin or /usr/local/bin or ...
- Code: Select all
mv tdpsd /opt/tdpsd
Now, take a moment, create your MD5 Password Hash and configure the tdps.config, to finish the installation
Part 2: User and startscript
Next we will need a deamon user, "tdpsd", without a homedrive and without a shell. If you need to have a special UID add -u xyz to the command
- Code: Select all
sudo useradd -s /bin/false -d /bin/null tdpsd
now set a password
- Code: Select all
sudo passwd tdpsd
as we will start TDPS with that user account we should make it the owner of the directory and files
- Code: Select all
sudo chown -R tdpsd:tdpsd /opt/tdpsd/
next we will need the startup script, you can download it here: http://www.cuivienen.name/downloads/tdpsd or directly on your server
- Code: Select all
sudo wget http://www.cuivienen.name/downloads/tdpsd
The script should run out-of-the-box, the only parts you may need to edit are the User and/or the path of tdpsd.
DESC="TeamDrive 1.0.44 Server Linux"
NAME=tdpsd
USER=tdpsd
DIR=/opt/tdpsd
DAEMON=$DIR/tdpsd
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
now, let us move the script to /etc/init.d
- Code: Select all
sudo mv tdpsd /etc/init.d
...and set the required rights
- Code: Select all
sudo chmod 755 /etc/init.d/tdpsd
Part 3: start/stop and autostart
Now we are in the final phase
To start TDPSD we just need to run
- Code: Select all
sudo service tdpsd start
To stop it's just
- Code: Select all
sudo service tdpsd stop
So, let us set the last bit - autostart
- Code: Select all
sudo update-rc.d -f tdpsd defaults
FINISHED
Greeting
SFu