SQLite classic ...login
SQLite classic tutorial
author:php.cn  update time:2022-04-13 17:05:02

SQLite installation


An important feature of SQLite is that it is zero-configuration, which means no complex installation or administration is required. This chapter explains installation setup on Windows, Linux, and Mac OS X.

Installing SQLite on Windows

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

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

  • Create the folder C:\sqlite and decompress the above two compressed files in this folder. You will get the sqlite3.def, sqlite3.dll and sqlite3.exe files.

  • Add C:\sqlite to the PATH environment variable, and finally use the sqlite3 command at the command prompt. The following results will be displayed.

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>

Installing SQLite on Linux

Currently, almost all versions of Linux operating systems come with SQLite. So, just use the command below to check if SQLite is already 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 do not see the above results, it means that SQLite is not installed on the Linux machine. So, let us follow the steps below to install SQLite:

  • Please visit the SQLite download page and download sqlite-autoconf-*.tar.gz from the source code area.

  • The steps are as follows:

$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, you can follow Verify the above explanation.

Installing SQLite on Mac OS X

Latest versions of Mac OS

    Please visit the SQLite download page and download
  • sqlite-autoconf-*.tar.gz

    from the source code area.

  • The steps are as follows:
$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 a Mac OS :05

Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>


Finally, in the SQLite command prompt, use the SQLite command Do the exercises.