Installing and running CoraDB on Linux and Windows
System requirements
Section titled “System requirements”| Item | Requirement |
|---|---|
| Operating system | 64-bit Linux (glibc 2.3.4 or later) or 64-bit Windows |
| Memory | 1 GB or more |
| Disk space | 500 MB for the software, plus the space of your databases (about 1.5 GB for a database created with the default volume sizes) |
| Java | A JRE or JDK, only for Java stored procedures |
On Linux, CoraDB also needs these libraries:
- ncurses (
rpm -q ncurses). CoraDB uses version 5 of the Curses library; on systems with a newer version, install thencurses-compat-libspackage. - libgcrypt (
rpm -q libgcrypt) - libstdc++ (
rpm -q libstdc++)
Check also that /etc/hosts maps the host name to the right IP address; otherwise the database server cannot start.
CoraDB and its drivers can be downloaded from https://www.coradb.ai/downloads.
Compatibility
Section titled “Compatibility”- Drivers: applications use the drivers of the same CoraDB version as the server, to have all the features of that version.
- Broker and server: when the broker and the database server run on different machines, they must have the same CoraDB version; only the patch level may differ. Different operating systems are fine (for example a Linux server and a Windows broker).
- Databases: a database created with another major or minor version must be migrated; see Upgrade.
Installing and running CoraDB on Linux
Section titled “Installing and running CoraDB on Linux”With the self-extracting installer (.sh)
Section titled “With the self-extracting installer (.sh)”Run the installer as the Linux user who will own CoraDB:
sh CoraDB-1.0.1.xxxx-Linux.x86_64.shThe installer shows the license and asks you to accept it, whether to install into a subdirectory named after the package or directly into the current directory, and to confirm that the broker and server versions will match. It then unpacks CoraDB and writes the environment script ~/.coradb.sh (and ~/.coradb.csh), which it adds to your shell profile. Load the environment and start CoraDB:
. ~/.coradb.shcoradb service startThe script sets CORADB, CORADB_DATABASES, PATH and LD_LIBRARY_PATH; see Environment variables. It is run automatically at your next login.
coradb service start starts the processes listed in the [service] section of coradb.conf: by default the master process, the brokers and the CoraDB Manager Server (CMS), plus the database servers listed there. Check the processes with:
ps -ef | grep cora_Among others you see cora_master, two cora_broker processes, and the CAS processes of each broker, named query_editor_cora_cas_N and broker1_cora_cas_N.
With RPM
Section titled “With RPM”rpm -Uvh coradb-1.0.1.xxxx-Linux.x86_64.rpmThe RPM installs CoraDB in /opt/coradb, creates the Linux group and user coradb, and installs the environment scripts coradb.sh and coradb.csh in /etc/profile.d. Log in as coradb and start CoraDB with coradb service start.
- Respect the RPM dependencies; a package installed with
--nodepsmay not run. - Removing the RPM does not remove the
coradbaccount or the databases created afterwards; remove them manually if needed.
With a tar.gz archive
Section titled “With a tar.gz archive”-
Extract the archive in the installation directory:
tar xvfz CoraDB-1.0.1.xxxx-Linux.x86_64.tar.gz -C /home/coradb -
Add the environment to your shell profile (for example
~/.bash_profile), and create the$CORADB_DATABASESdirectory:export CORADB=/home/coradb/CoraDBexport CORADB_DATABASES=$CORADB/databasesexport PATH=$CORADB/bin:$PATHexport LD_LIBRARY_PATH=$CORADB/lib:$LD_LIBRARY_PATHexport CLASSPATH=$CORADB/jdbc/coradb_jdbc.jar:$CLASSPATH -
Create a database:
mkdir -p $CORADB_DATABASES/testdbcd $CORADB_DATABASES/testdbcoradb createdb --db-volume-size=128M --log-volume-size=128M testdb en_US.utf8
Starting CoraDB at boot
Section titled “Starting CoraDB at boot”The init script coradb is in $CORADB/share/init.d (installed in /etc/init.d by the RPM). Set the variable CORADB_USER in the script to the Linux user who owns CoraDB, copy it to /etc/init.d if needed, and enable it with your system's service tools (chkconfig, systemctl enable, …).
To start database servers together with the service, list them in the [service] section of $CORADB/conf/coradb.conf:
[service]service=server,brokerserver=testdb,e-commerceservice lists the processes that coradb service start starts (any of server, broker, manager, javasp; the default is server,broker,manager), and server the databases. See service.
Upgrading an existing installation
Section titled “Upgrading an existing installation”When the target directory already contains CoraDB, the installer asks before overwriting it and its configuration files; overwritten configuration files are kept with the extension .bak. Stop CoraDB (coradb service stop) before installing. To move databases to a new version, see Upgrade.
Configuration
Section titled “Configuration”The configuration files are in $CORADB/conf:
coradb.conf: the database server parameters, such as memory, threads and the master portcoradb_port_id(default 1523). See System parameters.cm.conf: CMS; its portcm_portdefaults to 8001.coradb_broker.conf: the brokers, their ports (BROKER_PORT, default 30000 forquery_editorand 33000 forbroker1), number of CAS processes and SQL logs. See Broker configuration.
If a firewall is active, open the ports listed in Default ports for CoraDB.
Installing and running CoraDB on Windows
Section titled “Installing and running CoraDB on Windows”With the installer
Section titled “With the installer”Run the installer on 64-bit Windows, choose the installation directory, and finish the installation. The installer sets the environment variables (CORADB, CORADB_DATABASES, Path), registers the Windows service CORADBService, which starts CoraDB when Windows starts, and installs the CoraDB Service Tray, an icon in the notification area to start and stop CoraDB.
To keep CoraDB from starting with Windows, set the startup type of CORADBService to Manual in Control Panel > Administrative Tools > Services.
If the Service Tray does not start with Windows, check that the Task Scheduler service is running and that the Service Tray is in the Startup folder.
To install a new version, exit the Service Tray to stop CoraDB and uninstall the old version. When asked whether to delete the existing databases and configuration files, answer No. See Upgrade for migrating databases.
The configuration files are in %CORADB%\conf, as on Linux. On Windows, coradb_broker.conf also has APPL_SERVER_PORT, the first port used by the CAS processes of a broker; with APPL_SERVER_PORT=35000 and 50 CAS processes (MAX_NUM_APPL_SERVER), the CAS processes listen on ports 35000 to 35049. Without it, they use BROKER_PORT + 1 and up. See Parameter by broker.
With a zip archive
Section titled “With a zip archive”-
Extract the archive, for example to
C:\CoraDB, and create a directory for the databases. -
In System Properties > Advanced > Environment Variables, add the system variables:
CORADB = C:\CoraDBCORADB_DATABASES = %CORADB%\databasesand add
%CORADB%\binto Path and%CORADB%\jdbc\coradb_jdbc.jarto CLASSPATH. -
Open a command prompt and create a database:
cd C:\CoraDB\databasesmd testdbcd testdbcoradb createdb --db-volume-size=128M --log-volume-size=128M testdb en_US.utf8 -
Register CoraDB as a Windows service, so that it starts with Windows:
C:\CoraDB\bin\ctrlService.exe -i C:\CoraDB\binC:\CoraDB\bin\ctrlService.exe -startctrlService.exe -stopstops the service andctrlService.exe -uremoves it. -
List the databases to start with the service in the
[service]section ofC:\CoraDB\conf\coradb.conf, as on Linux.
To use the CoraDB Service Tray with a zip installation, put a shortcut to C:\CoraDB\bin\CoraDB_Service_Tray.exe in the Startup folder and create these registry string values (REG_SZ) under HKEY_LOCAL_MACHINE\SOFTWARE\CoraDB:
| Key | Name | Data |
|---|---|---|
CORADB |
ROOT_PATH |
C:\CoraDB |
cmserver |
ROOT_PATH |
C:\CoraDB |
The tray icon appears after the next restart of Windows.