Registration Server Software Installation¶
Enabling the TeamDrive Registration 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.5”
repository, which you can check by running yum repolist
afterwards:
[root@regserver ~]# yum repolist Loaded plugins: security repo id repo name status td-regserver-3.5 TeamDrive Registration Server Version 3.5 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 the Yvva Runtime Environment. Yvva is a development platform for the production of client-server and web applications and replaces the PrimeBase Application Server that was used in previous versions of the Registration Server (up to and including 3.0.018).
The td-regserver
package has a dependency on the yvva
RPM package that
provides the Yvva Runtime Environment — the yum
package manager will
automatically take care of installing it.
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 as well as the Registration Server’s and Host Server’s API URLs.
To install the Administration 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
/var/www/html/tdlibs/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.
Installing the Registration Server HTML Documentation (optional)¶
Beginning with Registration Server version 3.0.018.5, the documentation (in HTML format) can be installed locally, so you can access it directly from the Registration Server (or any other host running an Apache HTTP Server).
To install the HTML Documentation, install the following package via yum
from the “TeamDrive Registration Server” repository:
[root@regserver ~]# yum install td-regserver-doc-html
The HTML documents will be installed in directory
/var/www/html/td-regserver-doc
. From your web browser, open the following URL
to access the documentation:
Note
This step is optional. If you leave the documentation installed when the
Registration Server goes into production and is accessible from the public
Internet, you should ensure to restrict access to this URL to trusted hosts
or networks only. This can be achieved by adding the appropriate access
control rules to the file /etc/httpd/conf.d/td-regserver-doc.conf
.
Installing the Registration Server External Authentication (optional)¶
To install the External Authentication example files, install the following
package via yum
from the “TeamDrive Registration Server” repository:
[root@regserver ~]# yum install td-regserver-ext-auth
The example files will be installed in directory
/var/www/html/authservice
.
Note
This step is optional. See the chapter “Configuring External Authentication using Microsoft Active Directory / LDAP” in the TeamDrive Registration Server Administration Guide for details.
Installing the Registration Server client log upload (optional)¶
To install the client log upload script, install the following
package via yum
from the “TeamDrive Registration Server” repository:
[root@regserver ~]# yum install td-regserver-logupload
The php upload script will be installed in directory
/var/www/html/upload
.
Note
This step is optional. See the chapter about the client upload configuration as described in Client Log Files.
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 MySQLroot
account) - Create and populate the required Registration Server MySQL databases
- Modify the local Registration Server configuration files
/etc/td-regserver.my.cnf
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.5.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
/etc/td-regserver.my.cnf 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 10162) is running...
Stopping mysqld: [ OK ]
Changing local MySQL Server configuration...
Backing up existing configuration file /etc/my.cnf...
`/etc/my.cnf' -> `/etc/my.cnf-2015-04-20-11:59.bak'
Removing old InnoDB log files...
`/var/lib/mysql/ib_logfile0' -> `/var/lib/mysql/ib_logfile0-2015-04-20-11:59.bak'
`/var/lib/mysql/ib_logfile1' -> `/var/lib/mysql/ib_logfile1-2015-04-20-11:59.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 /etc/td-regserver.my.cnf...
Backing up existing configuration file ...
`/etc/td-regserver.my.cnf' -> `/ext/td-regserver.my.cnf-2015-04-20-12:01.bak'
Setting up /var/www/html/tdlibs/globals.php...
`/var/www/html/tdlibs/globals.php' -> `/var/www/html/tdlibs/globals.php-2015-04-20-12:01.bak'
Finished!
The MySQL configuration for TeamDrive Registration Server
version 3.5.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. Also, the size of the InnoDB
log files defined in innodb_log_file_size
might be worth reviewing.
Warning
Changing the value of innodb_log_file_size
after MySQL has already
been started will lead to InnoDB error messages when the MySQL server
restarts, e.g.:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
In order to avoid these, you need to shut down the MySQL Server
cleanly, move away the current InnoDB log files (named ib_logfile0
,
ib_logfile1
and so on), and restart MySQL, so InnoDB can re-create these
logs with the correct size.
See http://www.percona.com/blog/2011/07/09/how-to-change-innodb_log_file_size-safely/ for more details.
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.