English 中文(简体)
SQLite - Installation
  • 时间:2024-12-27

SQLite - Installation


Previous Page Next Page  

SQLite is famous for its great feature zero-configuration, which means no complex setup or administration is needed. This chapter will take you through the process of setting up SQLite on Windows, Linux and Mac OS X.

Install SQLite on Windows

    Step 1 − Go to SQLite download page, and download precompiled binaries from Windows section.

    Step 2 − Download sqpte-shell-win32-*.zip and sqpte-dll-win32-*.zip zipped files.

    Step 3 − Create a folder C:>sqpte and unzip above two zipped files in this folder, which will give you sqpte3.def, sqpte3.dll and sqpte3.exe files.

    Step 4 − Add C:>sqpte in your PATH environment variable and finally go to the command prompt and issue sqpte3 command, which should display the following result.

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

Install SQLite on Linux

Today, almost all the flavours of Linux OS are being shipped with SQLite. So you just issue the following command to check if you already have SQLite installed on your machine.

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

If you do not see the above result, then it means you do not have SQLite installed on your Linux machine. Following are the following steps to install SQLite −

    Step 1 − Go to SQLite download page and download sqpte-autoconf-*.tar.gz from source code section.

    Step 2 − Run the following command −

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

The above command will end with SQLite installation on your Linux machine. Which you can verify as explained above.

Install SQLite on Mac OS X

Though the latest version of Mac OS X comes pre-installed with SQLite but if you do not have installation available then just follow these following steps −

    Step 1 − Go to SQLite download page, and download sqpte-autoconf-*.tar.gz from source code section.

    Step 2 − Run the following command −

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

The above procedure will end with SQLite installation on your Mac OS X machine. Which you can verify by issuing the following command −

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

Finally, you have SQLite command prompt where you can issue SQLite commands for your exercises.

Advertisements