Feeds, issues, packages and code source about emulation and pograming, of VENENUX proyects, Debian related distros and massenkoh!

GIT GOGS AND GOLANG UP TO DAY for DEVUAN/DEBIAN

|

There's no Debian or Devuan package for gogs, and golang packages in debian are outdated.
This document will compile and install Gogs and Golang 1.8, in a right way due we want a system wide integration!
  1. Setup backported golang 1.8 due are not available normally in some Debian/Devuan releases.
  2. Setup gogs, compile, prepare and putting in the system, in right place with right places.
  3. Not need git or git-daemon, neither http web server, are not mandatory, golang can handle it all.
NEW!: 20170915: Devuan/Debian/Venenux packages ready to install: https://groups.google.com/forum/m/#!topic/venenuxsarisari/40sQFm1pcRY

* requirements: packages and backports

cat << EOF > /etc/apt/preferences.d/prioritygolang

Package: *
Pin: release l=home:vegnuli,c=
Pin-Priority: 901

EOF

* requirements: backported golang packages

wget -nv http://download.opensuse.org/repositories/home:vegnuli/Debian_7.0/Release.key -O Release.key
apt-key add - < Release.key
echo 'deb http://download.opensuse.org/repositories/home:/vegnuli/Debian_7.0/ /' > /etc/apt/sources.list.d/golang.list 
apt-get update
apt-get install golang-1.8-go golang

ALTERNATE INSTALL WAY Alternativelly can download all the 1.8 version packages of golang and install from the download directory:
No matter where you download, the golang depends are very lowest and works inclusively in debian etch, lenny, squeeze!
One all the “deb” files (those with 1.8 as version) are downloaded, then run in the place where all the files was downloaded:
dpkg -i *1.8*.deb

* preparing: setup default user

adduser --uid 998 --home /var/lib/gogs --shell /bin/false  --system   --group --disabled-login --gecos 'gogs' gogs
Añadiendo el usuario del sistema `gogs' (UID 998) ...
Añadiendo un nuevo grupo `gogs' (GID 998) ...
Añadiendo un nuevo usuario `gogs' (UID 998) con grupo `gogs' ...
Creando el directorio personal `/var/lib/gogs' ...

* preparing: use gogs and download sources

su -s /bin/bash - gogs
cd ~
wget https://github.com/gogits/gogs/archive/v0.11.29.tar.gz -O gogs-0.11.29.tar.gz

* requirements: install build-depends packages

aptitude install build-essential libpq-dev libpam0g-dev libsqlite3-dev libssl-dev

* preparing: unpack sources and setup a build

As gogs user, or use su gogs as:
 
su -s /bin/bash - gogs
cd ~
wget https://github.com/gogits/gogs/archive/v0.11.29.tar.gz -O gogs-0.11.29.tar.gz

tar -zxf gogs-0.11.29.tar.gz 
cd $HOME
rm -rf build
mkdir -p build/go
cd build/go
export GOROOT="/usr/lib/go"
for f in $GOROOT/*; do ln -s $f;done;ls
rm pkg && mkdir pkg && cd pkg
for f in $GOROOT/pkg/*; do ln -s $f;done;ls
export GOROOT="$HOME/build/go"
export GOPATH="$HOME/build"
mkdir -p "$GOPATH/src/github.com/gogits/gogs"
cp -a $HOME/gogs-0.11.29/* $GOPATH/src/github.com/gogits/gogs/
cd $GOPATH/src/github.com/gogits/gogs

* preparing: need changes in sources to build

As gogs user:
  • cmd/web.go : con sed conf/custom/app.ini a /etc/gogs/app.ini
  • conf.app.ini : cambiar ruta repos,
    • RUN_USER de git a gogs
    • RUN_MODE de dev a prod
    • ROOT_URL de DOMAIN a HTTP_URL
    • SSH_DOMAIN de DOMAIN a HTTP_URL
    • OFFLINE_MODE de false a true
    • CERT_FILE y KEY_FILE cambiar “custom/http” a /var/lib/gogs/cers
    • APP_DATA_PATH cambiar data a /var/lib/gogs/data
    • ENABLE_GZIP de false a true
    • ROOT = de vacio a /var/lib/git/gitrepos
    • MIRROR_QUEUE_LENGHT cambiar de 1000 a 2000
    • PULL_REQUEST_QUEUE_LENGHT cambiar de 1000 a 2000
    • ENABLE_LOCAL_PATH_MIGRATION cambiar de false a true
    • ENABLE_RAW_FILE_RENDER_MODE cambiar de false a true
    • TEMP_PATH cambiar de data/tmp/uploads a /var/lib/gogs/data/tmp/uploads
    • FILE_MAX_SIZE cambiar de 3 a 25
    • MAX_FILES cambiar de 3 a 1
    • PATH cambiar de data/attachments a /var/lib/gogs/data/attachments
    • MAX_FILES cambiar de 10 a 1
    • DB_TYPE cambiar lo que este a sqlite3
    • comentar HOST, USER, PASSWD, NAME, SSL_MODE
    • PATH cambiar de data/gogs.db a /var/lib/gogs/data/gogs.db
    • SECRET_KEY cambiar lo que esta por 123456790ASDFG este string al momento de isntalar se cambiara con sed por una llave autogenerada
    • REGISTER_EMAIL_CONFIRM esta en false, pero al tener el primer usuario (admin) hay que habilitarla
    • DISABLE_REGISTRATION esta en false, pero para intranets o faltas de correos, es mejor desabilitarla
    • SKIP_TLS_VERIFY cambiar de false a true si no tiene certificado pagado y es autofirmado
    • HOST esta en blanco o vacio, colocar localhost:25
    • DISABLE_HELO esta vacio colocarlo en true
    • SKIP_VERIFY esta en blanco colocar en true si el certificado de correo es autogenerado
    • USE_CERTIFICATE si cambia a false incrementa la seguridad pero es mucho mas lento por milisegundos (pensar para muchos usuarios)
    • CERT_FILE y KEY_FILE cambiar custom/mailer a /var/lib/gogs/cers se usara el mismo para el https
    • PROVIDER cambiar de memmory a file
    • PROVIDER_CONFIG cambiar de data/sessions a /var/lib/gogs/data/sessions
    • AVATAR_UPLOAD_PATH cambiar data/avatars a /var/lib/gogs/data/avatars
    • PATH cambiar de data/attachments a /var/lib/gogs/data/attachments
    • MAX_SIZE cambiar de 4 a 12
    • MAX_FILES cambiar de 5 a 3
    • MIGRATE cambiar de 600 a 900
    • MIRROR cambiar de 300 a 600
    • CLONE cambiar de 300 a 900
    • PULL cambiar de 300 a 900
    • GC cambiar de 60 a 90
    • SHOW_FOOTER_BRANDING cambiar de false a true
  • templates/home.tmpl es bueno remover tanta propaganda y dejarla limpia
  • templates/base/header.tmpl la ayuda sale de el hosting, mejor sustituir por usuarios y organizaciones
  • scripts/init/debian/gogs
    • WORKINGDIR cambiar lo que este a /var/lib/gogs
    • DAEMON cambiar lo que este a /usr/lig/gogs/gogs
    • USER cambiar a gogs
    • DAEMONARGS adicional despues de web –config /etc/gogs/app.ini
  • scripts/systemd
    • User y Gropus a gogs
    • Workingdirectory a /var/lib/gogs
    • Execstart a /usr/lib/gogs/gogs web
    • Environment USER=gogs HOME=/var/lib/gogs

* compiling: configuring and to build

As gogs user:

go fix
go build -x -ldflags="-s -w" -tags='sqlite pam cert'

* installation, user wide local install

As gogs user:

mkdir -p $HOME/install/usr/share/gogs
cp -r $HOME/build/src/github.com/gogits/gogs/conf $HOME/install/usr/share/gogs/
cp -r $HOME/build/src/github.com/gogits/gogs/public $HOME/install/usr/share/gogs/
cp -r $HOME/build/src/github.com/gogits/gogs/templates $HOME/install/usr/share/gogs/
mkdir -p $HOME/install/etc/gogs
mv -f $HOME/install/usr/share/gogs/conf/app.ini $HOME/install/etc/gogs/app.ini
ln -s $HOME/install/etc/gogs/app.ini $HOME/install/usr/share/gogs/conf/app.ini
mkdir -p $HOME/install/usr/lib/gogs
ln -s $HOME/install/usr/share/gogs/conf $HOME/install/usr/lib/gogs/conf
ln -s $HOME/install/usr/share/gogs/public $HOME/install/usr/lib/gogs/public
ln -s $HOME/install/usr/share/gogs/templates $HOME/install/usr/lib/gogs/templates
install -Dm0755 $HOME/build/src/github.com/gogits/gogs/gogs $HOME/install/usr/lib/gogs/gogs
install -Dm0755 $HOME/build/src/github.com/gogits/gogs/scripts/init/debian/gogs $HOME/install/etc/init.d/gogs
mkdir -p $HOME/install/var/run/gogs/
mkdir -p $HOME/install/var/log/gogs/
mkdir -p $HOME/install/var/lib/gogs/certs/
mkdir -p $HOME/install/var/lib/gogs/data/avatars
mkdir -p $HOME/install/var/lib/gogs/data/sessions
mkdir -p $HOME/install/var/lib/gogs/data/attachments
mkdir -p $HOME/install/var/lib/gogs/data/attachments
mkdir -p $HOME/install/var/lib/gogs/data/tmp/uploads
exit

As root now:
 
chown -R gogs:www-data /var/lib/gogs/install/var/run/gogs
chown -R gogs:www-data /var/lib/gogs/install/var/log/gogs
chown -R gogs:www-data /var/lib/gogs/install/var/lib/gogs
cat << EOF > gogslauncher
#!/bin/bash
exec /usr/lib/gogs/gogs \$@
EOF
install -Dm0755 gogslauncher /var/lib/gogs/install/usr/bin/gogs
servicios, sysvinit: (devuan > 7 o debian « 7)
install -Dm0755 $HOME/build/src/github.com/gogits/gogs//scripts/init/debian/gogs $HOME/install/etc/init.d/gogs
servicios systemd (debian » 7 solamente)
install -Dm0644 $HOME/build/src/github.com/gogits/gogs//scripts/systemd/gogs.service $HOME/install/usr/lib/systemd/system/gogs.service

* instalando: now system wide root install

As root now:

cp -a /var/lib/gogs/install/* /

* installation: required runtime packages

apt-get install -y git git-svn git-email httpd-server lighttpd apache2 mariadb-server sqlite3 postgresql postgresql-client

NOTE remove package depending of usage, by example if setup database with sqlite, remove mariadb-server and postgresql related

* finetuning: configuring the installation

FALTA AJUSTAR EL SCRIPT EN DAEMON Y EN DIRECTORIOS POR DEFECTO
CERTIFICADO:
$/usr/bin/gogs  cert --host "10.10.34.21,37.10.252.99,10.10.34.20,200.82.144.73,200.46.191.70" --rsa-bits 4096 --start-date "Jan 1 15:04:05 2017" --duration 17280h0m0s  --ca
2017/09/01 10:33:32 Written cert.pem
2017/09/01 10:33:32 Written key.pem
$ls *.pem
cert.pem  key.pem
$ mkdir /var/lib/gogs/cert/;mv *.pem /var/lib/gogs/cert/
CONFIGURACION:
APP_NAME = GogsVenenuX
RUN_USER = gogs
RUN_MODE = prod
 
[server]
PROTOCOL = http
DOMAIN = localhost
ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 3000
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
DISABLE_SSH = true
 
[repository]
ROOT = /var/lib/gogs/gitrepos
SCRIPT_TYPE = dash
DISABLE_HTTP_GIT = false
 
[database]
DB_TYPE = sqlite3
PATH = /var/lib/gogs/gogs.db
 
[session]
PROVIDER = file
 
[security]
INSTALL_LOCK = true
SECRET_KEY = ThisIsNotMySecretKey

* testing: running directly the service

/usr/bin/gogs web --config /etc/gogs/app.ini 
2017/09/01 11:09:38 [TRACE] Custom path: /usr/bin/custom
2017/09/01 11:09:38 [TRACE] Log path: /var/log/gogs
2017/09/01 11:09:38 [TRACE] Log Mode: Console (Trace)
2017/09/01 11:09:38 [ INFO] GogsVenenuX 0.11.29.0727
2017/09/01 11:09:38 [ INFO] Cache Service Enabled
2017/09/01 11:09:38 [ INFO] Session Service Enabled
2017/09/01 11:09:38 [ INFO] Git Version: 2.1.4
2017/09/01 11:09:38 [ INFO] SQLite3 Supported
2017/09/01 11:09:38 [ INFO] Run Mode: Production
2017/09/01 11:09:38 [ INFO] Listen: http://0.0.0.0:3000

* testing: browse the running tested service

sensible-browser http://127.0.0.1:3000
para evitar el “3000” hay que reversar el proxy ya que gogs es en si su propio webserver

Debian vs Devuan - the complete guide to choose

|
Debian its the mother of most famous distros, including Devuan!
Devuan project aims to made a complete linux distribution, but the fact its that tracks 90% of the Debian work..
The idea of this page is for those users very close to Debian, but that are not experts, can be oriented within the world of Devuan/Debian resources with respect to what they already know, in this way facilitating their inclusion in the world of Devuan/Debian bifurcation. Devuan except for systemd related, its just a Debian system without systemd. But Devuan its recomended for mid-to-advanced Debian users and server targets, have great performance.
We have wo parts, overall differences, very vage and not so much, and more deep technical differences, recomended for those that will be used more thant only to see movies or browser the internet!


1) Overall differences

There's no great differences at the user level, due Devuan its just a Debian without systemd, all the rest of packages its a Debian copy/proxy and a different theme color (that does not have contrast).
AspectDebianDevuanObservations
Web pagewww.debian.orgwww.devuan.orgDebians have a too heavy landing page, but really improve the web organization, user now have clear vision to do..
Easy of useMediumHardDevuan or Debian are base/universal distros, after install you must know what to do
Novice RecomendationMint Debian edition, AVLinuxExe GNU/LinuxWithout ExeGNU users dont have a easy Devuan derived work
Venenux recomendationsVenenux 0.5 to 0.9Venenux 1.0Venenux was based on Debian, now on Devuan
Theme colorred, white base, great contrastiris, aluminium base, vage contrastDevuan colors does not make contrast, very vage for readers, unconfortable.
Main desktopGnomeXFceThe choice of Devuan was a perfect! due the Debian gnome are very limited in CD/Live
User documentationToo much extended, but there's many on the web!very fractured and inconsistentAll Debian non-systemd documentation are valid for Devuan!
Recomended forLinux usersServers and/or Linux users, programersDevuan its Recomended for server and programing/development but with tracking of Debian support
Overall supportA huge organized and workingvery weak and have lack of manpowersWell Debian has too much bureau and politic in structure!

Official Equivalent Resources

It should be noted that it is not an exact copy of, because it is an independent project where only its birth is a fork of the original debian. So not all the resources must have and exact equivalent of course.
Resource typeDebianDevuanObservations
Main oficial sitehttp://debian.org/http://devuan.org/Debian site its more simple and easy to navigate, simple colors
Packages info sitehttp://packages.debian.org/Not yetIts a pain fault for Devuan not have a package info site
Bug and reportshttp://bugs.debian.orghttps://bugs.devuan.org/Both uses reportbug system, same subsystem, Devuan only tracks debian system.
Release pageshttps://www.debian.org/releases/does not haveDevuan releass doe not offer detail info, only have
 https://devuan.org/os/releases 
Projects and developinghttps://alioth.debian.org/https://git.devuan.orgComplete different systems
Package previews&reviewshttp://mentors.debian.orghttps://git.devuan.org/devuanOnly similarity, no equal
All derived workshttps://www.debian.org/misc/children-distroshttps://devuan.org/index.html#distributions-based-on-devuanDevuan are a derived work of Debian!

Release equivalents

Devuan Jessie tracks Debian Jessie, ascii is tracking stretch, and ceres will always track sid. While stretch has reached stable, ascii still requires some work. Right now, debian buster is in testing and devuan beowulf, which will track buster, does not yet exist. Info at 2017:
Debian linux baseoldstablestabletestingunstableexperimental
DebianjessieStretchbustersidexperimental
DevuanN/AjeesieasciiceresN/A
WinbuntuxenialyakkettyzestyartfulN/A
MintnadyaSarahsonyaN/AN/A

Distro repository equivalents

Due Devuan tracks most of the packages from Debian, the same rules applies when experts users want to mix/use repositories:
Release cycleDebianDevuanWinbuntuMint
2014/2015→2018jessiejessietrusty/utopicQiana/rebecca
2016/2017→2023strechasciixenial/yakketySarah
As you can understand, get Debian repositories (except for systemd depends) may will work as same; if you should need some software be packaged please consult the forums at Dev Galaxy forums.
Type of repositoryDebianDevuanObservations
Multimedia focusedhttps://deb-multimedia.orghttps://deb-multimedia.orgAll 99% packs works without problems
High Avalibility basedhttp://debian-ha.alioth.debian.org/None yet!
Debian ports/archshttp://ftp.ports.debian.org/debian-ports/None related or not appliedDevuan only have i386 and AMD64...
Google Chrome (amd64)http://dl.google.com/linux/chrome/deb/http://dl.google.com/linux/chrome/deb/Works only amd64 arch

2) Devuan vs Debian: Tecnical differences

There two main technical differences: the init system, that gives to Devuan more performance; and the release cycle modernity, always behind; the rest its just copy/proxy of the Debian packages.
Tech itemDebianDevuanObservations
Init systemsystemdsys-v-inityou know what systemd are! a shit!
Support period5 years5 yearsDevuan support are behind Debian release cycle!
Code names releaseBased on toy story namesBased on minor planets solar systemTheres no unstable name
technological modernitymostly over 12 to 18 months12 to 18 months behind DebianDevuan are based on Debian work, so its more older respect fashion packages!
InstallerDebian-installera mix of refracta and Debian-installerThe refractra seem back to the old days of linux, involution?
Media installCD/DVD/USB/FTP/NETCD/DVD/USB/NETDevuan does not distrribute complete system, always must use network/internet
Architectures163 or 4 ?Devuan seems only have IBM-pc and ARM based/compatible

Devuan vs Debian: special and derived works

Debian it's known as the “Mother of all distributions” as we know, like winbuntu Devuan was born from Debian, so that said a lot:
Derived workDebianDevuanObservations
Novice and starter userLMDE, Winbuntu,XandrosnoneDevuan does not have a starter recommendation based work.
End userLMDE, WinbuntuExe GNU/Linux,GnuinosDevuan does not have a good end user focused work.
Mid-end UserElive,KANOTIXExe GNU/Linux,Gnuinos,NevlumAlmost all the derived in Devuan are miduser oriented
Avanced usersUnivention,KNOPPIX,DSL,AntiX,Crunchbang++,Crunchbang##All Devuan derivatesDevuan its perfect for avanced Debian users
Derived special workDebianDevuanObservations
Education - generalSkolelinuxnoDevuan does not have any in general normal users for education, only track debian packages
Multimedia - generalVenenuX,AVLinuxnoDevuan does not have any in general normal users for multimedia
Multimedia - audio focusedVenenuX,AVlinuxEterTICs,DynebolicEterTICs and Dynebolic change to Devuan base
Multimedia - video focusedVenunuX,AVLinuxnoEterTICs and Dynebolic are limited in video multimedia
Multimedia - native GAMESVenenuX,SteamOS,SparkyLinuxnoDevuan does not have any for games, only track debian packages
Multimedia - emulators/gamesVenenuX,SteamOS,SparkyLinuxnoDevuan does not have any for games, only track debian packages
Multimedia - emulators/consolesVenenuX,SteamOS,SparkyLinuxnoDevuan does not have any for games, only track debian packages
Networking - penetrationKalinonedevuan only tracks debian packages
Networking - securityKalinonedevuan only tracks debian packages
Electronic - generalnonenoneall the work was embebed into debian
Ingeniering - generalnonenoneall the work was embebed into debian
Programing - generalCrunchbang,VenenuX,KANOTIXAnyDevuan its perfect and recomended for programing
Programing - LAMP (php,web)Crunchbang,VenenuX,KANOTIXAnyDevuan its perfect and recomended for programing
Programing - JAVACrunchbang,VenenuX,KANOTIXAnyDevuan its perfect and recomended for programing
EmbebedMaemonone

Devuan vs Debian: Unofficial Minimal images

There's few projects but the most close and similar are two only. In this apart, Debian has a advanced, due in it world, the Kenshi Muto images made a refresh of the current stable and integrate more recent kernels, on Devuan there's still not that feature.
NotesDebian b-i ImagesDevuan Minimal Images
The url sitehttp://kmuto.jp/debian/d-i/http://devuan.kalos.mine.nu/
AuthorKenshi MutoKatolaZ
Resource providedMinimal ISO for installMinimal ISO for live
Set of packagesRecent kernel, backportedsSame of official none especial
Type of ISOMinimal ISO for installMinimal ISO for live
FeaturedRefresh with backportedOnly few more rather than standars

ODBC Devuan and Debian complete how to and docu

|
This documentation has two parts, and overall ODBC documentation and a specific Devuan ODBC documentation. The firs part are provided due most administrators and developers must understand the ODBC infrastructure to property debug problems. This documentation starts on the "friendofdevuan" wiki due ODBC information was very poor inclusivelly in oficial Debian wiki, and now this content under the following CC Attribution-Share Alike 3.0 Unported license.


ODBC Documentation

The firs part are provided due most administrators and developers must understand the ODBC infrastructure to property debug problems.Second part of documentation describe Devuan packages, references and status of, also install howto's and usage tests.

Overall ODBC

Open Database Connectivity, commonly ODBC, is an open specification for providing application developers with a predictable API with which to access Data Sources, transferring SQL and meta-data queries to the database and conveying the results back. An ODBC engine needs driver modules to be able to interact with specific database types.
From the end-user perspective, one application can be used quickly, easily and uniformly against many different backend sources of data.
From the programmer's perspective, ODBC is a C-based API that saves time and effort writing applications. Instead of writing using native access methods for Oracle, Sybase, PostgreSQL etc, you write once against ODBC and point the data-source wherever you desire at run-time.
From the system administrator's perspective, it's just another small package to maintain.

About ODBC installations

The Linux and Unix ODBC are divided into two types of software, the base driver manager software that provide API and manage the connectivity; and the driver modules that implements and provide specific API connectivity bridge to each DBMS.
In Unix and Linux there are packages for install it manually. For example, in the Debian distribution, the unixODBC package is divided into two parts, the basic unixodbc packages that provides base software manager, and the driver modules packages that contains specific connectivity depending of the DBMS.
The base manager defines and provide the API manager to use and connect to each DBMS using a common interface. If you prefer to compile the package yourself you can download the source code web site, and follow the compilation and installation instructions that come with the respective package.
The driver modules are the necessary UnixODBC components to connect to each different DataBase types, and are not included or provided by the main unixODBC package in any Linux distribution. By example the mysql-odbc-connector related driver module permits to the main UnixODBC infraestructure connects to a MySQL DBMS, are so called libmyodbc in Debian based Linux distributions. For manually compile those driver modules, will need the development header files of the UnixODBC installation.   (Back to top index here Overall ODBC )

About ODBC Configurations

Any ODBC component relies on the configuration made in the ODBC driver modules configurations. The ODBC specification uses a so called Data Source Names definitios or DSN's to connect to differents DBMS.
UnixODBC uses the so called “ini” files. UnixODBC distinguishes between two types of ini files. System ini files (designed to be accessible but not modifiable by any user), and user ini file (that are private to a particular user, and may be modified by that user).
System ini files: There two, system file odbcinst.ini contains information about ODBC driver modules available to all users, and the odbc.ini file contains information about DSN's definitions to connect to databases, available to all users. These “System DSN's” are useful for application such as web servers that may not be running as a real user and so will not have a home directory to contain a .odbc.ini file.
User ini file: there only one, the .odbc.ini with a “dot” before the name, here there are the definitions for use only by the user and are located in the root home of the owner user.
The type of connection are defined by the odbcinst.ini configuration file, each driver module define a driver module type name, and then this definition are used by the DSN's connection definitions. The second configuration file odbc.ini usage are optional, can be used to DSN's database connection properties like the user name, and password for access. (Back to top index here Overall ODBC )

About DSN types and ODBC usage way

The Data Source Names or DSN are connections strings, can be defined in the odbc.ini file or used directly in any ODBC implementation. The two types of odbc.ini files: System DSN's and User DSN's differ only in who can access them on the system.
In UnixODBC or iODBC there's two way of use a DSN, a selfcomplete DSN have all the necesary configurations in their definition, and a described DSN have only specific database configurations due the driver module are only referenced to the odbcinst.ini file. Generally those selfcomplete DSN are in a form of “connection strings”. File DSN always contains connection strings.
The ODBC are used by calling these connection strings, a connection string its all the properties separated by a semi-colon, while in the odbc.ini file connection properties are grouped by section names separated by new lines, each group represents a DSN connection and those groups are “ini file sections”. (Back to top index here Overall ODBC )

File DNS notes

ODBC v3 specification also has a third sort of DSN, a File DSN, is not really a datasource. It is a file that contains a connection string or all the connection parameters used to connect directly to an ODBC driver.
They are useful things but of less use to UNIX's than NT. Its a mocosoft-like implementation, assumed that everyone should have Win32 on their desk; File DSN's are a fix to allow the information to be stored in a central server that is accessable to all the workstations by remote registry access.

UnixODBC vs iODBC

Apparently is more widely supported UnixODBC due the iODBC need header sections to understand the definitions on each configurations. UnixODBC have better 64bit support, are more widely maintained (less activity but more stability solutions).
iODBC was need in Debian past due UnixODBC qt GUI in the past need a ODBC lib to build against. So Who is first, the egg or the chicken?, this problem are called circular dependency problem between packages: the main reason for not killing iODBC off in the past was indeed the wretched circular build-dep with Qt need for the tools, but today the qt GUI tool are packaged separately and each project has their own manager GUI interface. (Back to top index here Overall ODBC )
FeatureUnixODBCiODBC
Unicode supportSQLWCHARs as 2 bytes UCS-2wchar_t UCS-2, UTF-8, UCS-4
cursor libraryyesyes (today)
thread safetyyesyes
specification2.0, 3.0, 3.5, 3.82.0, 3.0, 3.5
32 vs 64 bit supeither 32-bit or 64-bit SQLLEN/SQLULEN types(3.5+) 64-bit SQLLEN/SQLULEN types
gui managerODBCManageDataSourcesQ4iodbcadm-gtk
application widelyalmost allfew and included in MacOS
system operatin widelyalmost allsome distributions does not offer
LicensingGPL+LGPLBSD+LGPL
So UnixODBC has the most secure choice, but iODBC was the firs implementation and also the started work for, the Licensing indefinitios let door opens to the UnixODBC and today are API compatible in most cases. (Back to top index here Overall ODBC )

UnixODBC Connection Configuration

The extents of the ODBC its as far of their driver modules are available for. The list of more available driver modules are in http://www.unixodbc.org/drivers.html, by example for connect to a DB2 DBMS a EasySoft driver module must be installed and configured in the UnixODBC installation system.

Configurations for driver module

The UnixODBC driver modules are registered in the odbcinst.ini file, their files are library extensions that are also defined in same file. Here a example of a Sybase driver module support for an ODBC sybase connection.
Mostly these configuration files are only for organization purposes respect upgrades. Driver modules can be used directly in any DSN configuration.
[FreeTDS]
Description = FreeTDS Driver for Linux using guindosers DBs
Driver  = /usr/lib/odbc/libtdsodbc.so
Setup  = /usr/lib/odbc/libtdsS.so
UsageCount = 1
NOTE1: On Devuan only ODBC driver modules for mysql and postgres at install, register automatically in the odbcinst.ini file. VenenuX packages are complete automatically register all  modules.
NOTE2: On Devuan modules does not use absolute path, if fails set manually, path depends of multiarch installs. VenenuX packages are absolute path and not multiarch modules.

Configurations for DSN connection

Once registered the driver module want to use, have to define a Data Source Name event by definition or by full ODBC connection string. Remenber that diver module can be reference by registration of directly by the install path, see example below.
In the Data Source Name definition file odbc.ini you can also specify all the parameters needed to connect to the database. All the parameters are driver module database specific and may vary from database to database.
As you can see, in the following example, the configuration of the two first DSN are different because the parameters needed are database specific. The first is for a MySQL database (that is running locally), the second is for a Sybase running on a remote server. The tirth are same as the first, but used directly the driver module that bypass usage by reference name registered, this way its more directly but less flexible when operating system upgrades are performed.
[odbcmysql1]
Driver  = MySQL
Database = mysql
Server  = localhost
Port  = 2638
ReadOnly = No

[odbcsybase1]
Driver  = FreeTDS
Database = sybasedemo
Server  = 10.10.200.10
Port  = 2638
ReadOnly = No
TDS_Version = 5.0

[odbcmysql2]
Driver  = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
Database = mysql
Server  = localhost
Port  = 2638
ReadOnly = No
You must have one Database driver configured for each Database type, and one Data Source for each Database you want to use. For example, if you have two MySQL Databases, where the first is running on remote system A and the second on remote system B, you will have only one Database driver module configured (MySQL odbc connector), but two different Data Sources, one Data source will describe the connection (and all the relative parameters) to system A and one Data source will describe the connection (and all the relative parameters) for system B. (Back to top index here Overall ODBC )

unixODBC Configuration Examples

There here are some ODBC setups for Linux. Those assumed the odbcinst.ini are in /etc and odbc.ini are also in /etc, for user asumed .odbc.ini in respective home directory and a normal user. (Back to top index here Overall ODBC )

Example of /etc/odbcinst.ini file system wide definition

Example of the odbcinst.ini located in the /etc directory. This file contains all the driver module configurations and their options, are used by reference their names registered:
[ODBC]
Trace   = Yes
TraceFile  = /tmp/odbcsql.log
ForceTrace  = No
Pooling   = No

[MySQL]
Description  =
Driver   = /usr/lib/odbc/libmyodbc.so
Setup   = /usr/lib/odbc/libodbcdrvcfg1S.so
UsageCount  = 1

[FreeTDS]
Description  = TDS driver Sybase SQL
Driver   = /usr/lib/odbc/libtdsodbc.so
Setup   = /usr/lib/odbc/libtdsS.so
CPTimeout  = 
CPReuse   = 
UsageCount  = 1

[PostgreSQL]
Description  = PostgreSQL ODBC driver (Unicode version)
Driver   = /usr/lib/odbc/psqlodbcw.so
Setup   = /usr/lib/odbc/libodbcpsqlS.so
Debug   = 0
CommLog   = 1
UsageCount  = 1

Example of /etc/odbc.ini file system wide

System wide odbc.ini located in the /etc directory using optionally the previous odbcinst.ini definition. The odbc.ini file permits passwords, but remember that the system wide odbc.ini file are readable by any loged user.
[mysqlodbc-kinderdb]
Description  = MySQL kinderdb access
Driver   = /usr/lib/odbc/libmyodbc.so
Host   = 10.10.200.10
Database  = kinderdb
Port   = 3369
ReadOnly  = No
Trace   = Yes
TraceFile  = /tmp/errc.log

[ejabberd-postgres]
Description  = PostgreSQL ejabberdb conection
Driver   = PostgreSQL
Trace   = No
Database  = ejabberdnode
Server   = 127.0.0.1 # if use Servername, must be equal of the node host ejabberd name
Port   = 5432
ReadOnly  = No
RowVersioning  = No
ShowSystemTables = Yes
ShowOidColumn  = No

[sainthacking]
Description  = Conecion a saint to hack and crack
Driver   = FreeTDS
Database  = saintnonmina
Server   = 192.168.1.100
Port   = 1723
ReadOnly  = No
TDS_Version  = 8.0
Trace   = No

Example of \~/.odbc.ini file user wide

User wide .odbc.ini are located in the /home/ directory using the system wide odbcinst.ini definition. The user .odbc.ini file permits passwords, and that file must be “chown” to able readable by owner home user:
[saintuseraccess]
Description  = Conecion a saint with auto user and password
Driver   = FreeTDS
Trace   = Yes
TraceFile  = /tmp/errc.log
Database  = saintnonmina
Server   = 192.168.1.100
UserName  = dba
Password  = sql
Port   = 1723
ReadOnly  = Yes
TDS_Version  = 8.0

[kinderdb-useronly]
Description  = MySQL
Driver   = MySQL
Host   = 10.10.200.10
Database  = kinderdb
UserName  = root
Password  = mysql.secret
Port   = 3369
ReadOnly  = No

[ejabberd-useronly]
Description  = PostgreSQL ejabberdb conection
Driver   = PostgreSQL
Trace   = No
Database  = ejabberdnode
Server   = 127.0.0.1 # if use Servername, must be equal of the node host ejabberd name
UserName  = root
Password  = postgres.secret
Port   = 5432
ReadOnly  = No
RowVersioning  = No
ShowSystemTables = Yes
ShowOidColumn  = No

Connecting and testing the ODBC DSN definitions

The access can be tested if the UnixODBC package are complete installed with the isql utility.
Depending of the ambit of the odbc.ini file, system wide DSN of the system wide odbc.ini files can be tested and used by any users logged; user wide DSN from user wide .odbc.ini files only can be used and tested by their users owners.
The format of the command are easy as: isql , the username and password are optional, but in some driver modules such as FreeTDS those are mandatory.
/bin/bash

% isql ejabberd-useronly username secretpassword.123
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>select * from users

ODBC Connection Checks

Due ODBC setups are complex, Driver module Data Source Checks must be made for do not lost in the process, this its general recommended way of for discard any bad made step:
  1. Valid and resolvable hostname in case of the access its a remote DBMS service.
  2. Valid port number for the DBMS service to access in case of the access its a remote DBMS service.
  3. Valid and existing database/file name.
  4. Valid user name in case of such those like Sybase, PostgreSQL or MySQL/MariaDB.
  5. Valid password for the specified user in case of such those like Sybase, PostgreSQL or MySQL/MariaDB.
  6. Server DBMS service must be running in case of such those like Sybase, PostgreSQL or MySQL/MariaDB.
  7. Server DBMS service must allow remote connections in case of the access its a remote DBMS service.
  8. Server user/access must be right grated for the current setup connection.
(Back to top index here Overall ODBC )

About Devuan/Debian ODBC packages

VenenuX ODBC related module drivers are complete revised and build agains UnixODBC. VenenuX packages cannot be used in others Debian related or derived systems due incompatibilities.
Some Debian packages such like SQLite related can be used in Devuan, due the odbc packages does not are related or close to the internal system or hierarchy, neither cause systemd/sysvinit conflicts.

Deb's ODBC managers Packages

There are the list of the current ODBC packages software, with some Debian reference search:
ODBC softwarestatusDevuan package namesDebian reference search
iODBCgoodlibiodbc2, libiodbc2-devhttps://packages.debian.org/source/sid/libiodbc2
UnixODBCmadurelibodbc1,odbcinst,unixodbc,unixodbc-devhttps://packages.debian.org/source/sid/unixodbc
There are the list of Devuan GUI ODBC managers, with some Debian reference search:
GUI softwarestatusDevuan package namesDebian reference search
QtGUIgoodunixodbc-gui-qthttps://packages.debian.org/source/sid/unixodbc-gui-qt
GTKGUImadureiodbchttps://packages.debian.org/source/sid/iodbc
(Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

Deb's ODBC driver modules packages

All the Devuan or Debian derived packages are build agains UnixODBC, due some does not compile agains iODBC.
There are the list of the current Devuan ODBC driver modules packages, with some Debian reference search:
driver modulestatusDevuan package namesDebian reference search
mysql-connector-odbcmadurelibmyodbchttps://packages.debian.org/source/sid/myodbc
postgresql-odbcmadureodbc-postgresqlhttps://packages.debian.org/source/sid/psqlodbc
tds-odbc freetdsgoodtdsodbchttps://packages.debian.org/source/sid/freetds
mdbtools-odbclimitedlibmdbodbc1https://packages.debian.org/source/sid/mdbtools
(Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )
There are the list of some extra debian ODBC driver modules packages, with some Debian reference search:
driver modulestatusDevuan package namesDebian reference search
sqliteodbcmadurelibsqlite3-mod-csvtable,libsqliteodbchttps://packages.debian.org/source/sid/sqliteodbc
IMPORTANT NOTES:
  • the sqlite odbc related package are not showed in Devuan repository but compatible
  • the libmyodbc odbc related package works same for MariaDB or MySQL DBMS
  • the freetds odbc related package are out of date and have lack of nvarchar, nchar and ntext right support
(Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

Debian and Devuan UnixODBC how to's

All the ODBC Devuan packages are compatible and same as those on Debian, is due there's no systemd depends or any system differences between packages, inclusively for any other Debian based should work this document.
This documentation are focused on UnixODBC as its more compatible with most used libraries and software.

1) install and prepare UnixODBC

The libraries need for most programs and the setup driver module programs for module registrering:
apt-get install  libodbc1 odbcinst odbcinst1debian2
For isql test tool that permits consult and run querys in console:
apt-get install unixodbc
All the steps here are using command line tool, the GUI parts make the same, but its less controlled, specially the iODBC GTK gui that always make a general “ODBC” hader section on the ini files.
(Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

2) install and prepare sqlite odbc

First install the odbc driver module, unfortunately by some strange reason the SQLite ODBC packages are not in default in first Devuan repositories for some reason does not auto mirror, so until Devuan administrator fixed or include it must setup and added a Debian repository temporally and then later remove it for install respective missing packages.
apt-get install unixodbc odbcinst odbcinst1debian2
While the Debian repository are temporally active, install the missing packages, the package will register a driver module named SQlite3 and another named SQlite for sqlite versions 3 and 2 respectively:
apt-get install libsqliteodbc sqlite3 sqlite
If all are good, will registered automatically the SQLite and SQLite3 driver modules for usage and console will outputs:
SQLite has been deleted (if it existed at all) because its usage count became zero
SQLite3 has been deleted (if it existed at all) because its usage count became zero
odbcinst: Driver installed. Usage count increased to 1. 
    Target directory is /etc
odbcinst: Driver installed. Usage count increased to 1. 
    Target directory is /etc
Now remove the Debian repositories and proceed with proper ODBC task and SQLite related.
Create a testdb.sqlite database, then create a table “tabla1” with one column “col1” and then type “.quit” to exit:
mkdir -p /tmp/workingdb/
sqlite3 /tmp/workingdb/testdb.sqlite
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table tabla1 ( col1 TEXT );
sqlite> .quit
Create a ODBC DSN access entry point named “odbcsqlite” in the system wide odbc.ini file for the newer testdb.sqlite database file:
[odbcsqlite]
Description=Sqlite v3 odbc access to testdb
Driver=SQLite3
Database=/tmp/workingdb/testdb.sqlite
Timeout=2000
Now lest try to test the odbc DSN access with isql command line tool:
isql odbcsqlite -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from tabla1
+-----------+
| count(*)  |
+-----------+
| 0         |
+-----------+
SQLRowCount returns 0
1 rows fetched
NOTE there a more package that extends the features of the odbc sqlite funtionality: libsqlite3-mod-blobtoxy, libsqlite3-mod-csvtable, libsqlite3-mod-impexp, libsqlite3-mod-xpath, libsqlite3-mod-zipfile; but its only to work with sqlite version 3.
IMPORTANT CONSIDERATIONS
  • The Sqlite3 module driver reference for usage was SQLite3 and that string are used in second line of the odbc.ini DSN definition, specificaly in the Driver parameter, must be same and are case senditive.
  • The Database name must be reference as absolute path in the odbc.ini DSN definition, specificaly in the Database parameter, must be exact as do a pwd + file (/tmp/workingdb/ + testdb.sqlite) and are case sensitive.
  • The isql command line invocation its just only for test or DSN odbc access using the DSN odbc name, the ODBC DSN name are odbcsqlite and its defined at the odbc.ini section of the DSN overall for specific database.
  • (Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

3) install and prepare postgres odbc

The PostgreSQL ODBC connector in Devuan are derived from Debian and are stable and up to date. The PostgreSQL ODBC connector was a MS only project to gran access to linux PostgreSQL database to win32 like systems.
PostgreSQL have two flavors: PostgreSQL Unicode is a Unicode enabled driver that will work well with huge range of languages such databases encoded as 'UTF-8'. PostgreSQL ANSI is an ANSI driver which is also able to handle some multibyte character sets such as EUC_JP, BIG5 and Shift-JIS, used with databases encoded using any of the LATIN character sets.
First install the odbc driver module and the postgresql minimal packages, unfortunately the postgresql installation are to complex to cover in this document so sill assumed defaul instalation with minimal setup:
apt-get install unixodbc odbcinst odbcinst1debian2 odbc-postgresql
Of course if use optionally a local server as we do here for practice (the “postgresql” package), the setup of PostgreSQL are out of scope, so we will use the default postgres build in user and scheme to connect it.
apt-get install postgresql
If all are good, the console installation will show the usage count of registered driver module for each postgresql odbc flavor:
odbcinst: Driver installed. Usage count increased to 1. 
  Target directory is /etc
odbcinst: Driver installed. Usage count increased to 1. 
  Target directory is /etc
Now two driver modules are registered as PostgreSQL ANSI and PostgreSQL Unicode, due practical reasons now we can optionally create a PostgreSQL test table in the remote target DBMS (local if choose optionally the “postgresql” in install step), for this example we use default build-in scheme database postgres, created a root user and a table named “tabla1” with one column “col1” and then type /q to exit:
su -s /bin/bash postgres
psql -U root -d postgres -h 127.0.0.1
psql (9.4.12)
Type "help" for help.
postgres=# CREATE TABLE tabla1 (col1 TEXT);
CREATE TABLE
postgres=# CREATE ROLE root PASSWORD 'toor' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE ROLE
postgres=# \q
Create a ODBC DSN access entry point in the system wide odbc.ini file for the postgres scheme database access:
[odbcpgsql]
Driver         = PostgreSQL Unicode
Description    = PostgreSQL UTF8 odbc access to postgres db
Database       = postgres
ServerName     = 127.0.0.1
Port           = 5432
User           = root
Password       = toor
ReadOnly        = Yes
RowVersioning   = No
ShowSystemTables = No
ShowOidColumn   = No
FakeOidIndex    = No
ConnSettings    =
Here was only common minimal. The complete options for PostgreSQL ODBC must be reference: (https://odbc.postgresql.org/docs/config-opt.html) Take in consideration that the only common and same options in all odbc driver modules are the Driver parameter and the Database parameter, by example here ServerName are used and valid for PostgreSQL ODBC, but not for FreeTDS ODBC.
Now lest try to test the odbc DSN access with isql command line tool:
isql odbcpgsql root toor -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from tabla1
+-----------+
| count(*)  |
+-----------+
| 0         |
+-----------+
SQLRowCount returns 1
1 rows fetched
NOTE due practical reasons, we emulates the remote target DBMS here as local, that's why a extra step witch install the server part and setup a root user in the server DBMS, that choose optionally the “postgresql” package in install command step.
IMPORTANT CONSIDERATIONS
  • The PostgreSQL ODBC module driver reference usage was PostgreSQL Unicode a UTF-8 specific and that string are used in second line of the odbc.ini DSN definition section, specifically in the Driver parameter.
  • The Database name must be reference in the odbc.ini always, specificaly in the Database parameter, we use the default internal postgres scheme and are case sensitive.
  • The ServerName parameter are important, must be ip address of the target DBMS, here we emulate remote server as “localhost” or “127.0.0.1” for connected database, please never use Servername for all ODBC driver modules, by example the FreeTDS does not have same behaviour.
  • The isql command line invocation its just only for test or DSN odbc access using the DSN odbc name, the ODBC DSN name are odbcpgsql and its define at the odbc.ini section of the DSN overall for specific database type.
  • (Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

4) install and prepare mariadb/mysql odbc

The MySQL connector in Devuan are derived from Debian and are very stable but out of date, also more important, MariaDB and MySQL has own connector driver modules, but the provided in Debian or Devuan repositories work same for both DBMS.
First install the odbc driver module and the mysql/mariadb minimal packages, unfortunately Devuan or Debian package not will register the driver module so you must be done manually until Devuan mantainers made it on the package. The VenenuX package do the registration of driver module automatically. We here use the MariaDB as target DBMS for MySQL example installation:
apt-get install unixodbc odbcinst odbcinst1debian2 libmyodbc mariadb-client
Of course if use optionally a local server as we do here for practice (the “mariadb-server” package), the setup of mariadb/mysql are out of scope, provide a password for root user and the take care of the ODBC related output.
apt-get install mariadb-server
If all are good, and due the Devuan/Debian package not will register a driver module now we must registered the ODBC MySQL driver manager for MySQL manually, the process are based on the old made for any ODBC in the Debian older versions as in this based on Postgres ODBC setup old guide:
odbcinst -i -d -f /usr/share/libmyodbc/odbcinst.ini
odbcinst: Driver installed. Usage count increased to 1. 
    Target directory is /etc
Now a driver manager are registered as MySQL, now create a MySQL test table in the remote target DBMS (local if choose optionally the “mariadb-server” in install step), for this example we use default main scheme database mysql, the table will named “tabla1” with one column “col1” and then type “quit” to exit:
mysql --user=root --password=root --host=127.0.0.1 mysql 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 43
Server version: 5.3.13-1vnzsq1 (VenenuX)
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others
MariaDB [mysql]> create table tabla0 ( col1 TEXT );
Query OK, 0 rows affected (0.14 sec)
MariaDB [mysql]>quit
Create a ODBC DSN access entry point in the system wide odbc.ini file for the mysql scheme database access:
[odbcmysql]
Driver       = MySQL
Description  = MySQL v3 odbc access to mysql db
Database     = mysql
Server       = 127.0.0.1
Port         = 3306
User         = root
Password     = toor
Option       = 3
Socket       = 
Here was only common minimal. The complete options for MySQL ODBC connector must be reference: (https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters.html#codbc-dsn-config-options)
Now lest try to test the odbc DSN access with isql command line tool:
isql odbcmysql root toor -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from tabla1
+-----------+
| count(*)  |
+-----------+
| 0         |
+-----------+
SQLRowCount returns 1
1 rows fetched
NOTE due practical reasons, we emulates the remote target DBMS here as local, that's why a extra step witch install the server part, that choose optionally the “mariadb-server” package in install command step.
IMPORTANT CONSIDERATIONS
  • The MySQL/MariaDB module driver reference for usage was MySQL and that string are used in second line of the odbc.ini DSN definition, specifically in the Driver parameter, must be same and are case sensitive.
  • The Database name must be reference in the odbc.ini always, specifically in the Database parameter, we use the default internal mysql scheme and are case sensitive.
  • The Server parameter are important, must be ip address of the target DBMS, here we emulate remote server as “localhost” or “127.0.0.1” for connected database, please never use “Servername” parameter in a Mysql ODBC DSN definition.
  • The isql command line invocation its just only for test or DSN odbc access using the DSN odbc name, the ODBC DSN name are odbcmysql and its define at the odbc.ini section of the DSN overall for specific database type.
  • (Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

5) install and prepare freetds odbc

Freetds Debian/Devuan package are very out of date, but enough stable and working, FreeTDS up to date added corrected support for nvarcharnchar and ntext sql types, very important for Sybase proxy tables and Unicode support due the size of the variables there's a implicit conversion size.
First install the odbc driver module and the FreeTDS minimal packages, unfortunately Devuan or Debian package not will register the driver module so you must be done manually until Devuan mantainers made it on the package. The VenenuX package do the registration of driver module automatically. We here use a Sybase as target DBMS but both MSSQL and Sybase are supported.
apt-get install freetds-bin tdsodbc
The MSSQL or Sybase related are out of scope of this document, but a special case must be take in when choose the type of the DBMS server to connect to, due TDS protocol must be defined: (http://www.freetds.org/userguide/choosingtdsprotocol.htm), by default FreeTDS has experimental support for iteratively trying protocol connections until it finds one the server accepts. IF doub use the 5.0 for Sybase DBMS servers and 7.1 for MsSQL DBMS servers.
If all are good, and due the package not will register a driver module now we must registered the ODBC FreeTDS module driver manually, the process are based on the old made for any ODBC in the Debian older versions as in this based on Postgres ODBC setup old guide:
odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini  
odbcinst: Driver installed. Usage count increased to 1. 
  Target directory is /etc
Now a driver manager are registered as FreeTDS, create a Sybase/MsSQL test table in the remote target DBMS (there's native support for Sybase Linux since version 12), for this example we use default demodb file database demodb, the table will named “tabla1” with one column “col1” and then exit from sybase command line, the scope of that are out of this documentation, you can install the VenenuX anywhere package for that, note that isql tool are also provided by Sybase, the invocation can be done as:
syisql -Sdemodb -Udba -Psql
Create a ODBC DSN access entry point in the system wide odbc.ini file for the mysql scheme database access:
[odbcsybase]
Driver       = FreeTDS
Description  = FreeTDS odbc access to sybase or mssql db
Database     = demodb
Server       = 127.0.0.1
Port         = 2638
User         = dba
Password     = sql
TDS_Version  = 5.0
Here was only minimal most important, here we including the TDS_Version parameter that must be always 5.0 for Sybase. The complete options for FreeTDS ODBC must be reference: (http://www.freetds.org/userguide/odbcconnattr.htm)
Now lest try to test the odbc DSN access with isql command line tool:
isql odbcsybase dba sql -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from tabla1
+-----------+
| count(*)  |
+-----------+
| 0         |
+-----------+
SQLRowCount returns 1
1 rows fetched
NOTE IMPORTANT FreeTDS ODBC has severall connection parameters that must be refered to configure: (http://www.freetds.org/userguide/odbcconnattr.htm).
IMPORTANT CONSIDERATIONS
  • The FreeTDS module driver reference for usage was FreeTDS and that string are used in second line of the odbc.ini DSN definition, specifically in the Driver parameter, must be same and are case sensitive.
  • The Database name must be reference in the odbc.ini always, specifically in the Database parameter, we use the default internal demodb scheme with default dba user.
  • The Server parameter are important, must be ip address of the target DBMS, here we emulate remote server as “localhost” or “127.0.0.1” for connected database, please never use “Servername” parameter, the expected behaviour of ServerName its to combine with the FreeTDS specific settings and not usefull, confuses the odbc driver module behaviour.
  • The isql command line invocation its just only for test or DSN odbc access using the DSN odbc name, the ODBC DSN name are odbcsybase and its define at the odbc.ini section of the DSN overall for specific database type.
  • (Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

6) install and prepare mdbtools odbc

The MDBTools project provide and ODBC driver module.. but are poor documented and Devuan package does not offer any improvement over documentation.. currently supports mdbaccdb and mdt file types and SQL support are very basic and limited.
First install the odbc driver module and the mdbtools manager packages, to provide the odbc driver module library:
apt-get install unixodbc odbcinst odbcinst1debian2 libmdbodbc1 mdbtools
If all are good, will registered automatically the MDBTools driver module for usage, console does not will show any output, due driver module are registered silently, and re-registering will show that count increase raised to 2 as:
odbcinst: Driver installed. Usage count increased to 2. 
  Target directory is /etc
There's no way to create mdb files for linux, so we must have a mdb test file for that, we assumed have a mdb/accdb file prepared with a table named table1 with at least one column named columna1 of type TEXT inside, localled at the /tmp/workingdb directory, the mdb-tool from mdbtools package can be used for testing:
mdb-sql /tmp/workingdb/testdb.mdb 
1 => SELECT * FROM tabla1
2 => go
+--------------------------------------------------------------------------+
|columna1                                                                  |
+--------------------------------------------------------------------------+
|asdasd                                                                    |
+--------------------------------------------------------------------------+
1 Row retrieved
1 => quit
Create a ODBC DSN access entry point named odbcsmdb in the system wide odbc.ini file for the testdb.mdb database file:
[odbcsmdb]
Description=MDB limited odbc access to testdb.mdb
Driver = MDBTools
Database =/tmp/workingdb/testdb.mdb
Now lest try to test the odbc DSN access with isql command line tool:
isql odbcmdb -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select * from tabla1
+--------------------------------------------------------------------------+
|columna1                                                                  |
+--------------------------------------------------------------------------+
|asdasd                                                                    |
+--------------------------------------------------------------------------+
SQLRowCount returns 1
1 rows fetched
SQL> quit
NOTE on MDBTools library the supported SQL syntax is a very limited subset and deficient in several ways.
IMPORTANT CONSIDERATIONS
  • The MDB module driver reference for usage was MDBTools and that string are used in second line of the odbc.ini DSN definition, specificaly in the Driver parameter, must be same and are case senditive.
  • The Database name must be reference as absolute path in the odbc.ini DSN definition, specificaly in the Database parameter, must be exact as do a pwd + file (/tmp/workingdb/ + testdb.mdb) and are case sensitive.
  • The isql command line invocation its just only for test or DSN odbc access using the DSN odbc name, the ODBC DSN name are odbcmdband its define at the odbc.ini section of the DSN overall for specific database.
  • (Back to Debian/Devuan ODBC index here About Debian and Devuan ODBC packages )

Previous version of this document started by me in the "friend of devuan" wiki site.
Except where otherwise noted, content on this is licensed under the following license: CC Attribution-Share Alike 3.0 Unported