Wednesday, July 22, 2009

MySQL on TS101

There is a pre-compiled MySQL that can be downloaded from site1 or from site2.
I Guess both are the same, I personally tested the one from site2.

The installation procedure is well described in a README included in the delivery, but when you reboot your TS station, MySQL will not be launched.

This is due to some symbolic links not kept at restart, because written in a filesystem placed in the RAM.

Edit the autostart.sh file and add the following lines before the line added by MySQL installation script :
  • cd /share
  • ln -s /share/HDA_DATA/MySQL
  • export PATH=$PATH:/share/MySQL/bin
This will allow MySQL to work correctly after reboot, and thus to be launched automatically after reboot.

Blog list and links about TS101

Launch application at TS-101 startup : autostart.sh

On Turbo Station TS101, there is a hidden partition that one can mount to access a file (autorun.sh) that is launched and executed at each startup.

To mount this hidden partition :
1- Log to you TS station with administrator login
Note : To be able to do that you must have a updated firmware from QNAP.
The one you have when you receive the TS does not allow telnet services.
When the firmware is flashed, then telnet service is connected to port 13131.
When it is installed you access your QNAP with the following command (on windows console):
telnet ip_of_your_qnap 13131

2- execute the following to mount the hidden partition
mount -t ext2 /dev/mtdblock4 /tmp/config

3- Then edit the autorun.sh file :
vi /tmp/config/autorun.sh

4- If you are as paranoid as me, then sync and unmount your file system after modification:
sync
umount /dev/mtdblock4

Be careful, this file system is in the flash, so :
- do not put big files in it
- do not erase files in it
- use as much care as possible to not destroying it

Information on other TS can be found here