SQLite 安裝
sqlite 安裝
sqlite 是一個輕型數(shù)據(jù)庫系統(tǒng),零配置的,無需復雜的安裝或管理,支持主流操作系統(tǒng)。 我們主要講解 windows、linux 和 mac os x 上的安裝設置。
1. 在 windows 上安裝 sqlite
- 請訪問 sqlite 下載頁面,從 windows 區(qū)下載預編譯的二進制文件。
- 您需要下載 sqlite-tools-win32-*.zip 和 sqlite-dll-win32-*.zip 壓縮文件。
- 創(chuàng)建文件夾 c:\sqlite,并在此文件夾下解壓上面兩個壓縮文件,將得到 sqlite3.def、sqlite3.dll 和 sqlite3.exe 文件。
- 添加 c:\sqlite 到 path 環(huán)境變量,最后在命令提示符下,使用 sqlite3 命令,將顯示如下結果。
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>
2. 在 linux 上安裝 sqlite
目前,幾乎所有版本的 linux 操作系統(tǒng)都附帶 sqlite。所以,只要使用下面的命令來檢查您的機器上是否已經(jīng)安裝了 sqlite。
$ sqlite3 sqlite version 3.7.15.2 2013-01-09 11:53:05 enter ".help" for instructions enter sql statements terminated with a ";" sqlite>
如果沒有看到上面的結果,那么就意味著沒有在 linux 機器上安裝 sqlite。因此,讓我們按照下面的步驟安裝 sqlite:
- 請訪問 sqlite 下載頁面,從源代碼區(qū)下載 sqlite-autoconf-*.tar.gz。
- 步驟如下:
$ tar xvzf sqlite-autoconf-3071502.tar.gz $ cd sqlite-autoconf-3071502 $ ./configure --prefix=/usr/local $ make $ make install
上述步驟將在 linux 機器上安裝 sqlite,您可以按照上述講解的進行驗證。
3. 在 mac os x 上安裝 sqlite
最新版本的 mac os x 會預安裝 sqlite,但是如果沒有可用的安裝,只需按照如下步驟進行:
- 請訪問 sqlite 下載頁面,從源代碼區(qū)下載 sqlite-autoconf-*.tar.gz。
- 步驟如下:
$ tar xvzf sqlite-autoconf-3071502.tar.gz $ cd sqlite-autoconf-3071502 $ ./configure --prefix=/usr/local $ make $ make install
上述步驟將在 mac os x 機器上安裝 sqlite,您可以使用下列命令進行驗證:
$ sqlite3 sqlite version 3.7.15.2 2013-01-09 11:53:05 enter ".help" for instructions enter sql statements terminated with a ";" sqlite>
最后,在 sqlite 命令提示符下,使用 sqlite 命令做練習。
相關文章
- SQLite 命令
- SQLite 附加數(shù)據(jù)庫
- SQLite 分離數(shù)據(jù)庫
- SQLite 創(chuàng)建表
- SQLite Select 語句
- SQLite 運算符
- SQLite Where 子句
- SQLite Limit 子句
- SQLite Group By
- SQLite 觸發(fā)器
- SQLite Alter 命令
- SQLite 事務
- SQLite Autoincrement
- SQLite 注入
- SQLite Vacuum
- SQLite 日期 & 時間
- SQLite 常用函數(shù)
- SQLite C/C++ 編程接口
- SQLite PHP 編程接口
- SQLite Python 編程接口