Registration Server Installation¶
Enabling the TeamDrive Host Server yum Repository¶
The TeamDrive Registration Server components are available in the form of RPM packages, hosted in a dedicated yum repository. This makes the installation and applying of future updates very easy — you can simply run yum update to keep your Registration Server software up to date.
To enable the repository, you need to download the td-regserver.repo file and place it into the directory /etc/yum.repos.d/, e.g. by using wget:
[root@regserver ~]# wget -O /etc/yum.repos.d/td-regserver.repo \ http://repo.teamdrive.net/td-regserver.repo
This will enable the “TeamDrive Registration Server Version 3.0.018” repository, which you can check by running yum repolist afterwards:
[root@hostserver ~]# yum repolist Loaded plugins: security repo id repo name status td-regserver-3.0.018 TeamDrive Registration Server Version 3.0.018 4 base CentOS-6 - Base 6.367 extras CentOS-6 - Extras 14 updates CentOS-6 - Updates 1.094 repolist: 7.477
Installing the Registration Server package¶
To install the Registration Server Software, install the following package via yum from the “TeamDrive Registration Server” repository:
[root@regserver ~]# yum install td-regserver
The TeamDrive Registration Server requires a custom version of the PrimeBase Application Environment to be installed. PrimeBase is a development platform for the production of client/server and web applications.
The td-regserver has a dependency on the PrimeBase_TD RPM package — the yum package manager will automatically take care to install it as well.
The PrimeBase package installs a system-wide profile file /etc/profile.d/teamdrive.sh that sets the environment variable PRIMEBASEHOME to /usr/local/primebase and adds the directory /usr/local/primebase/bin to the PATH environment variable.
Log out and log in to apply these changes. Alternatively, you can just source the profile file in your current shell:
[root@regserver ~]# source /etc/profile.d/teamdrive.sh
Installing the Administration Console¶
The PHP-based Administration Console can be installed on the same server where the Registration Server has been installed. Alternatively, it can be installed on any other web server that supports Apache and PHP. In this case, you need to ensure that the host running the Admin Console can access the Registration Server’s MySQL Database and API URL.
To install the Admin Console, install the following package via yum from the “TeamDrive Registration Server” repository:
[root@regserver ~]# yum install td-regserver-adminconsole
The installation package ships with an example configuration file globals-sample.php, which needs to be renamed to globals.php and configured to match your environment. If the Administration Console is installed on the same host, the mysql_install.sh script described in the following chapter will take care of this automatically.
Create MySQL Database User and the Databases¶
The TeamDrive Registration Server requires two MySQL databases td2reg and td2apilog, which will be accessed using a dedicated teamdrive MySQL user.
The Registration Server installation package ships with a script that performs the required configuration steps:
- Modify the local configuration file /etc/my.cnf, start and enable MySQL Server (only when using a local MySQL Server)
- Create the required MySQL user teamdrive, assign the provided password and the required database privileges (requires access to the MySQL root account)
- Create and populate the required Registration Server MySQL databases
- Modify the local Registration Server configuration files /usr/local/primebase/setup/connect.def and /var/www/html/tdlibs/globals.php (if installed).
The following example assumes that the MySQL database is located on the same system where the TeamDrive Registration Server instance is installed.
If the MySQL Database is hosted on a different system, replace the MySQL host name localhost with the host name or IP address that the MySQL instance is running on.
You need to have the following information available:
- The password of the MySQL root user account
- The password that you want to assign to the teamdrive user
The script is part of the td-regserver package and is installed in /opt/teamdrive/regserver/mysql/mysql_install.sh. Call it as the root user and follow the instructions:
[root@regserver ~]# /opt/teamdrive/regserver/mysql/mysql_install.sh TeamDrive Registration Server MySQL Database Install Script ----------------------------------------------------------- Configuring MySQL database for TeamDrive Registration Server version 3.0.018.0 This script will perform the following steps: - Modify the local configuration file /etc/my.cnf, start and enable MySQL Server (only when MySQL Server runs locally) - Create the required MySQL user "teamdrive", assign the provided password and the required database privileges (requires access to the MySQL root account) - Create and populate the required Registration Server MySQL databases - Modify the local Registration Server configuration files /usr/local/primebase/setup/connect.def and /var/www/html/tdlibs/globals.php (if installed) Enter MySQL hostname: localhost Enter MySQL root password for localhost: <root password> Enter MySQL password to be set for user teamdrive: <teamdrive password> mysqld (pid 3653) is running... Stopping mysqld: [ OK ] Changing local MySQL Server configuration... Backing up existing configuration file /etc/my.cnf... `/etc/my.cnf' -> `/etc/my.cnf-2014-09-12-09:38.bak' Starting and enabling MySQL Server... Starting mysqld: [ OK ] Trying to connect to the MySQL server as root... +---------------+ | MySQL Version | +---------------+ | 5.1.73 | +---------------+ Creating teamdrive MySQL user on localhost Trying to connect to the MySQL server as the teamdrive user... Creating Registration Server databases... ====================== CREATE DATABASE td2reg ====================== CREATE TABLE TD2User create table TD2UserBlob create table TD2FreeUserStorage create table TD2Device create table TD2Message create table TD2MessageSF create table TD2MessageFD create table TD2Ticket create table TD2Email create table TD2AutoTask create table TD2Owner create table TD2OwnerMeta create table TD2OwnerMetaSetting create table TD2TicketChanges create table TD2LicenceType create table TD2OwnerLicenceType create table TD2Product create table TD2OwnerProduct create table TD2Depots create table TD2RegServerList create table TD2Setting create table TD2UserPrivileges create table TD2UserPrivilegesSetting create table TDAddressRange create table TD2Parcel create table Keys ========================= CREATE DATABASE td2apilog ========================= create table TD2APIRequests Updating /usr/local/primebase/setup/connect.def... Backing up existing configuration file ... `/usr/local/primebase/setup/connect.def' -> `/usr/local/primebase/setup/connect.def-2014-09-12-09:38.bak' Setting up /var/www/html/tdlibs/globals.php... `/var/www/html/tdlibs/globals.php' -> `/var/www/html/tdlibs/globals.php-2014-09-12-09:38.bak' Finished! The MySQL configuration for TeamDrive Registration Server version 3.0.018.0 is now complete.
Among other things, the mysql_install.sh script modifies a few run-time parameters in the MySQL server configuration file /etc/my.cnf — review these carefully and adapt them to match your system configuration as outlined in the MySQL Reference Manual.
In particular, the value for innodb_buffer_pool_size should be adjusted to the amount of main memory (RAM) available in your system; typically this value should be set to about 80% of the total memory.
As a final test, try logging into the MySQL database from the Registration Server system, using the teamdrive user account and the password you defined — you should be able to see and access the TeamDrive Registration Server databases:
[root@regserver ~]# mysql -u teamdrive -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | td2apilog | | td2reg | +--------------------+ 3 rows in set (0.00 sec) mysql> QUIT Bye
The MySQL database has now been configured and populated with the required databases and tables. For more details on the content and structure of these tables, please refer to the TeamDrive Registration Server Reference Guide.