SQLite

SQLite is a public domain SQL database engine.

Installing SQLite

A version of the SQLite 3 shell is installed on all servers; however, you may want to install a newer version. To install a newer version of SQLite 3:

  1. Open an SSH session to your account.

  2. Switch to your ~/bin directory. Enter cd ~/bin and press Enter.

    Note

    If the directory does not already exist, create it. Enter mkdir ~/bin and press Enter.

  3. Download the latest SQLite 3 precompiled binary for Linux. Enter wget url, where url is the SQLite download URL found at the SQLite Download Page, and press Enter. An archive containing the binary is created in the current directory.

  4. Unzip the archive. Enter unzip archive, where archive is the name of the SQLite archive file, and press Enter. An executable file, sqlite, is created in the current directory.

  5. Add the ~/bin directory to your PATH.

    1. Open ~/.bashrc in a text editor.
    2. Insert export PATH=$HOME/bin/:$PATH on a new line.
    3. Save and close the file.

Now sqlite is the latest version of the SQLite 3 shell.

Installing SQLite from Source

To install a complete version of SQLite from source:

  1. Open an SSH session to your account.
  2. Download the latest SQLite source autoconf source. Enter wget url, where url is the SQLite download URL found at the SQLite Download Page, and press Enter. An archive containing the binary is created in the current directory.
  3. Extract the archive. Enter tar -xf sqlite-autoconf-version.tar.gz, where version is the version number, and press Enter. A new directory containing the source files, sqlite-autoconf-version, is created in the current directory.
  4. Switch to the source directory. Enter cd sqlite-autoconf-version and press Enter.
  5. Configure the compilation. Enter ./configure --prefix=$HOME and press Enter.
  6. Compile SQLite. Enter make and press Enter.
  7. Install SQLite. Enter make install and press Enter.
  8. Add the ~/bin directory to your PATH.
    1. Open ~/.bashrc in a text editor.
    2. Insert export PATH=$HOME/bin/:$PATH on a new line.
    3. Save and close the file.