DemoSystem can be run on Linux, Windows or MacOS operating systems.
In case of 64 bit Linux operating system, 32 bit compatibility libraries might need to be installed. For example:
lib32z1on Ubuntuzlib.i686on Fedora
✅ Note:
Our test runs on 'fresh' installation of openSuse 12.3 worked without need for any additional packages.
Instructions in Lessons relay on checking data or status of kdb+ processes, therefore, IDE for kdb+ is required
(e.g. http://code.kx.com/wiki/StudioForKdb+). Connection might need to be established from localhost
(e.g. when both kdb+ studio and enterprise-components are deployed locally) or over TCP
(e.g. enterprise-components on workstation, kdb+ studio on user’s desktop).
DemoSystem package does not contain q binaries. There are following two options for the deployment:
-
Install
qbinaries in thebin/q/subdirectory [Recommended]It is recommended to install
qbinary intobin/q/subdirectory. In this case bin directory will contain entire software set required to run the system. It will be independent from other installations on the same server. Eachec-based system running on the same machine will have own, independent version ofq. -
Use
qthat is already installed on the systemSecond option is to use
qthat is already installed on the system and available on thePATH.QHOMEandPATHenvironmental variables have to be adjusted accordingly inenv.sh(env.baton Windows) file for each Lesson.
❗ Note:
Kdb+binaries can be downloaded from:
- current version of FREE 32bit of
KDB+binaries can be downloaded from http://kx.com/software-download.php- users with 64 bit
KDB+license can download binaries from http://downloads.kx.com/
-
Download and unpack package
ec_vX.X.X_DemoSystem_Linux32bit_Lessons_X-X.tgz> tar zxvf ec_vX.X.X_DemoSystem_Linux32bit_Lessons_X-X.tgzOn Windows download and unpack the package
ec_vX.X.X_DemoSystem_Win32_Lessons_X-X.zip> unzip ec_vX.X.X_DemoSystem_Windows32bit_Lessons_X-X.zip -
[Optional step] Download FREE 32bit
KDB+or LICENSED 64bitKDB+matching the operating system and unpack the package.On Linux download and unpack the package
linux.zipintoDemoSystem/bin/q/subdirectory.> cd DemoSystem DemoSystem> unzip linux.zip -d bin
On Windows download and unpack the package
windows.zipintoDemoSystem/bin/q/subdirectory.> cd DemoSystem DemoSystem> unzip windows.zip -d bin
❗ Note:
Downloaded
qpackage normally containsq/subdirectory. The result of unpacking should be as follows:DemoSystem> ls bin/q/ l32/ q.q q.k README.md README.txt [...]On Windows, use the
dircommand.❗ Note:
Alternatively use own, pre-installed
qexecutable that is available on thePATHwithQHOMEpointing toqinstallation location. -
Create link to configuration for LessonXX
> cd DemoSystem DemoSystem> ln -s bin/ec/tutorial/LessonXX/etc
The corresponding commands for Windows are
> cd DemoSystem DemoSystem> mklink /J etc bin\ec\tutorial\Lesson01\etc
-
Check if
etcfolder is linked to correct LessonDemoSystem> ls -l etc etc -> bin/ec/tutorial/LessonXX/etc
Use the
dircommand on Windows. -
After installation
DemoSystemdirectory should containbindirectory andetcsymbolic linkDemoSystem> ls -l bin etc -> bin/ec/tutorial/LessonXX/etc/ Installation.md README.md Troubleshooting_linux.md Troubleshooting_windows.md
Common installation problems with solutions for linux and for windows.
-
Source environment
DemoSystem> source etc/env.sh
On Windows one needs to run
DemoSystem> etc\env.bat -
Start all components in the system (restart command is used just in case the system was already running)
DemoSystem> yak restart \* Stopping components... core.gen Skipped core.tick Skipped core.rdb Skipped Starting components... core.gen OK core.tick OK core.rdb OK
-
Check if all components are running
DemoSystem> yak info \* uid pid port status started stopped ---------------------------------------------------------------------------------- core.gen 11235 17009 RUNNING 2014.05.08 07:36:18 core.rdb 11247 17011 RUNNING 2014.05.08 07:36:19 core.tick 11241 17010 RUNNING 2014.05.08 07:36:18
-
Check if
dataandlogdirectories were createdDemoSystem> ls -l bin data etc -> bin/ec/tutorial/LessonXX/etc/ log readme.txt troubleshooting.txt
On Windows, use the
dircommand.
Folder structure for data and log directories remains the same for all Lessons, therefore it is enough to change
configuration pointer (symbolic link) to change the Lesson.
If you would like to start with fresh set of data and log directories - these can be removed while the system is
stopped.
❗ Note:
Make sure that system is really stopped before deleting these directories, otherwise yak will lose its connection details resulting in error described in Issue 4.
-
Stop the system
DemoSystem> yak stop \* Stopping components... core.gen OK core.tick OK core.rdb OK
-
Remove link to configuration for LessonXX
DemoSystem> ls -l etc etc -> bin/ec/tutorial/LessonXX/etc/ DemoSystem> rm etc
On Windows, do
DemoSystem> rmdir etc
-
Create link to configuration for LessonYY
DemoSystem> ln -s bin/ec/tutorial/LessonYY/etc DemoSystem> ls -l etc etc -> bin/ec/tutorial/LessonYY/etc/
On Windows:
DemoSystem> mklink /J etc bin\ec\tutorial\LessonYY\etc
-
Start the system again
DemoSystem> yak start \* Starting components... core.gen OK core.tick OK core.rdb OK