#### Beyond Linux® From Scratch (systemd Edition) - Version 10.1

### Chapter 22. Databases

- Prev

  PostgreSQL-13.2

- Next

  Other Server Software

- Up
- Home

# SQLite-3.34.1

## Introduction to SQLite

The SQLite package is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

This package is known to build and work properly using an LFS-10.1 platform.

### Package Information

- Download (HTTP): https://sqlite.org/2021/sqlite-autoconf-3340100.tar.gz

- Download MD5 sum: 14dca9d44fb6a57f6521c1ace4be5a68

- Download size: 2.8 MB

- Estimated disk space required: 89 MB

- Estimated build time: 0.3 SBU (Using parallelism=4)

### Additional Downloads

Optional Documentation

- Download (HTTP): https://sqlite.org/2021/sqlite-doc-3340100.zip

- Download MD5 sum: 9a6b9f9006bb8b7262b89114092a0983

- Download size: 9.7 MB

### SQLite Dependencies

#### Optional

libedit and UnZip-6.0 (required to unzip the documentation)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sqlite

## Installation of SQLite

If you downloaded the optional documentation, issue the following command to install the documentation into the source tree:

    unzip -q ../sqlite-doc-3340100.zip

Install SQLite by running the following commands:

    ./configure --prefix=/usr     \
                --disable-static  \
                --enable-fts5     \
                CFLAGS="-g -O2                    \
                -DSQLITE_ENABLE_FTS3=1            \
                -DSQLITE_ENABLE_FTS4=1            \
                -DSQLITE_ENABLE_COLUMN_METADATA=1 \
                -DSQLITE_ENABLE_UNLOCK_NOTIFY=1   \
                -DSQLITE_ENABLE_DBSTAT_VTAB=1     \
                -DSQLITE_SECURE_DELETE=1          \
                -DSQLITE_ENABLE_FTS3_TOKENIZER=1" &&
    make

This package does not come with a test suite.

Now, as the `root` user:

    make install

If you downloaded the optional documentation, issue the following commands as the `root` user to install it:

    install -v -m755 -d /usr/share/doc/sqlite-3.34.1 &&
    cp -v -R sqlite-doc-3340100/* /usr/share/doc/sqlite-3.34.1

## Command Explanations

`--disable-static`: This switch prevents installation of static versions of the libraries.

`--enable-fts5`: This switch enables support for version 5 of the full text search extension.

`CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"`: Applications such as SeaMonkey require these options to be turned on. The only way to do this is to include them in the CFLAGS. By default, these are set to `"-g -O2"` so we specify that to preserve those settings. You may, of course, wish to omit the `'-g'` if you do not wish to create debugging information. For further information on what can be specified see http://www.sqlite.org/compile.html.

## Contents

Installed Program: sqlite3
Installed Library: libsqlite3.so
Installed Directory: /usr/share/doc/sqlite-3.34.1

### Short Descriptions

sqlite3 | A terminal-based front-end to the SQLite library that can evaluate queries interactively and display the results
`libsqlite3.so` | contains the SQLite API functions

Last updated on 2021-02-19 22:13:48 -0800

- Prev

  PostgreSQL-13.2

- Next

  Other Server Software

- Up
- Home