Configuring CSQL for unixODBC October 12, 2009
Posted by Prabakaran Thirumalai in asterisk, csqlcache.Tags: csql configuration, csql installation, csql unixodbc, unixODBC
2 comments
CSQL Installation
CSQL follows extract and use installation strategy. When CSQL needs to be accessed from any terminal without setting the necessary environment such as LD_LIBRARY_PATH, CSQL_CONFIG_FILE, etc, some extra settings are required. This blog provides step by step procedure for doing the same.
Download the latest CSQL Release from http://www.csqlcache.com
$tar zxvf csql2.7-linux-x86.tar.gz
Copy install directory to /usr/local
$cp -R csql2.7-linux-x86 /usr/local
Create soft link csql to point to the csql installation directory
$ln -s /usr/local/csql2.7-linux-x86 csql
Configuring CSQL
$cd /usr/local/csql
Add below line to sample/csql.conf file
DURABILITY=true
Copy the configuration file to /etc directory
$mkdir /etc/csql
$cp sample/csql.conf /etc/csql/csql.conf
Create file /etc/ld.so.conf.d/csql.conf with following content “/usr/local/csql/lib”
unixODBC Confguration for CSQL
Download and install unixODBC from http://www.unixodbc.org
Add the below lines to ~/.odbc.ini file
[mycsql]
Driver = /usr/local/csql/lib/libcsqlodbc.so
Starting CSQL Server
CSQL provides two scripts,
- setupenv.ksh – set the necessary environment variables such as PATH, LD_LIBRARY_PATH, CSQL_INSTALL_ROOT, etc.
- startup.sh – start csqlserver
Run the scripts as mentioned in the below sequence
$cd /usr/local/csql
$. ./setupenv.ksh
$scripts/startup.sh
Checking configuration and server status
Verify whether server started by checking /tmp/csql/log/csqlserver.log file
Connect with isql tool to check ODBC configuration
$isql mycsql root manager
If the above command gives you SQL prompt, then ODBC configuration for CSQL works fine
More Information on CSQL Configuration
http://www.wiki.csqldb.com/index.php/UserManual/CSQLInstallation












