README version 1.0beta
My Centralized Registration System - CTS Daemon
Introduction
The CTS Daemon or CTSD is the Server part of the My Centralized Timeregistration System, MyCTS, project. It will handle all the connections initiated by a client. This client can be the client we serve you with or a client coded by a third party. It will all work as long as the guidelines of the protocol are followed.
The CTS Daemon is a standard configurable daemon that will spawn a thread for every connection. This to stay on minimum CPU.
While developing the CTS Daemon there was no real database taken in thought but our preference goes out to MySQL because of its simplicity. For now on we only support the MySQL Database layer but you are free to code your own. You can read more about this in the developer documentation. In the future we might release other versions of the database layers and/or CTS Daemons.
In theory the daemon should be able to run on any system. But we cant assure it so far since we had no chance to compile it on various platforms.
Notice: if you encounter bugs we are willing to hear about them. See the Bug Report section for more details.
Notice: This Daemon is BETA! It is not tested for security leaks so know what you are using. God help us there will be none. The most effective way to minimize this security risk is easy. Dont run it as root (which you never should with anything actually)
Latest release
The latest release information can always be found on: http://mycts.sourceforge.net
To stay tuned with the latest modifications you can also browse our CVS repository.The address repository is cvs.mycts.sourceforge.net.
Requirements
- A MySQL Database
- libmysqclient library
- mysql-devel
- Enough memory
- A bit of bandwidth if you want to handle more clients
- GCC and Automake tools
Next of some common sense there are a few requirements to be able to use this piece of software.
The first dependency to compile is the need of libmysqlclient. This library is included with the mysql install so its most likely you have it. If you don't have it (or mysql-devel) you should get it from http://www.mysql.com. Or you could search http://www.rpmfind.net keyterm libmysql. For debian you have to install the package libmysqlclient10-dev.
Since the daemon is using some resources it is advised that you have some memory available for the CTS Daemon.
You need a MySQL database on a server allowing connections from your machine. Be aware that with the rise of clients on your daemon the pressure on the MySQL daemon will increase and the traffic between the CTS Daemon and the MySQL Daemon will significantly increase!
To avoid the traffic problem with MySQL we advise you to run the MySQL Daemon on your localhost and also have the database running there. This is not only to spare a lot of bandwidth, it is also another security measure. The connection is just pure localhost so its harder to sniff.
Further you need the general compile tools. This means you need GCC and Automake to build the binaries.
Installation
To install the ctsd Daemon you may do a:
$ ./configure
$ make
The you will find the binary in the 'ctsd' subdirectory. You will need to manually copy the ctsd.conf file in the sample-confs subdirectory to $HOME/.ctsd directory. There is however a more preffered way of installing the daemon, just by doing:
$ ./ctsd-install
This will configure the package so that the binary will be installed in the $HOME/ctsd directory and the sample configuration file will be installed to $HOME/.ctsd (be mindfull of the dot) for your editing pleasure. This method does not require you to be root. If you would like to install the daemon system wide, you will need root. Then you can simply do:
$ ./configure
$ make
After which each user (who wants to run a ctsd daemon) will need to make a ctsd.conf file in $HOME/.ctsd.
Configuration directives
The current list of supported configuration directives:
- ServerName
- ServerListenIP
- ServerPort 5137
- Motd
- User "nobody"
- Group "nobody"
- MaxInstance 50
- ClientTimeOut 3600
- LogFile "/home/trance/.ctsd/ctsd.log"
- DBServer "pheer"
- DBUsername "mycts"
- DBPassword "beng5137"
- DBDatabase "testdata"
ServerName is the name of the server shown when a client connects. The format of this is a string so use ServerName "yourname" if not set the default will be used.
ServerListenIP is the IP you want to listen on. If not set the CTS Daemon will listen at all IP's. The notation is ServerListenIP "1.2.3.4".
ServerPort is the Port you want the CTS Daemon to listen on. You can set it as ServerPort 1234.
Motd is the Message of The Day which is shown when a user connects. Noted as Motd "your MOTD".
The LogFile directive lets you specify where you want your logfiles to go to. By default this will be $HOME/.ctsd/ctsd.log. Here you can override that.
DBServer specifies the databaseserver. This must be an IP. DBServer "1.2.3.4"
DBUsername is your username. This is an string and must be specified as DBUsername "user".
DBPassword is your password. Write it down as DBPassword "mypassword".
DBDatabase is your database at the DBServer location. This must be written down as DBDatabase "databasename".
--- not implemented yet but future versions will support it ---
User toggle lets you specify another user it will run on. Group toggle does the same but for a group. Note both down as string so User "test123"
MaxInstance is the maximum amount of instances the process may create. Configure it as MaxInstance 1234
Bug reporting
If you think you have found a bug in this daemon you can contact us.
There are various ways to do so.
The prefered method is going to our SourceForge site located at:
http://sourceforge.net/projects/mycts/ and fill out a bug report in the bug
tracking system.
The NOT prefered way is going to our website and browse the contact page.
The address is: http://mycts.sourceforge.net/index.php?pagenm=contact
We dont prefer being emailed since we cant use the bug tracking system in
such cases.
Known issues
None so far. Its a beta after all.
Credits
Credits where credits are due.
