Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

SQLite installation


May 16, 2021 SQLite


Table of contents


SQLite installation

An important feature of SQLite is zero configuration, which means that complex installation or management is not required. This chapter explains installation settings on Windows, Linux, and Mac OS X.

Install SQLite on Windows

  • Visit the SQLite download page to download precompiled binary files from the Windows area.

  • You need to download sqlite-shell-win32-.zip and sqlite-dll-win32-.zip compressed files.

  • Create a folder, C:\gt;sqlite, and unzip the two compressed files between them, and you'll get sqlite3.def, sqlite3.dll and sqlite3 .exe files.

  • Add the C:\gt;sqlite to the PATH environment variable, and finally, at the command prompt, use the sqlite3 command to display the following results.

C:\>sqlite3
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

Install SQLite on Linux

Currently, almost all versions of linux operating systems come with SQLite. So just use the following command to check if SQLite is installed on your machine.

$sqlite3
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

If you don't see the results above, it means that SQLite is not installed on a Linux machine. So let's follow these steps to install SQLite:

$tar xvfz sqlite-autoconf-3071502.tar.gz
$cd sqlite-autoconf-3071502
$./configure --prefix=/usr/local
$make
$make install

The above steps will install SQLite on the Linux machine, which you can verify by following the instructions above.

Install SQLite on Mac OS X

The latest version of Mac OS X pre-installs SQLite, but if no installation is available, simply follow these steps:

$tar xvfz sqlite-autoconf-3071502.tar.gz
$cd sqlite-autoconf-3071502
$./configure --prefix=/usr/local
$make
$make install

The above steps will install SQLite on the Mac OS X machine, which you can verify using the following commands:

$sqlite3
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

Finally, under the SQLite command prompt, use the SQLite command for practice.