歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 怎樣在Linux下從源代碼安裝SQLite 3

怎樣在Linux下從源代碼安裝SQLite 3

日期:2017/2/28 16:06:39   编辑:Linux教程

SQLite3是一個極輕型的獨立的無服務器的SQL數據庫引擎。

你不需要做任何的配置來使其工作。所有你需要的就是安裝它並開始使用它。

既然是無服務器的,它被用在很多你所使用的著名的軟件中,甚至你可能並不知道那些軟件正在使用它。看看下面的例子所有的大公司正在使用SQLiete.PUP編程語言內嵌了SQLite數據庫於其中。

如果你從來沒有使用過SQLite,按照下面的文章中所提到的步驟安裝在Linux上,並且創建了一個例子數據庫。

下載SQLite3源代碼

去SQLite下載頁面,並點擊“sqlite-autoconf-3070603.tar.gz”(在源代碼部分),並下載到你的系統中。或者使用wget直接從服務器下載就像下面。

wget http://www.sqlite.org/sqlite-autoconf-3070603.tar.gz

安裝 SQLite3

Uncompress the tar.gz file and install SQLite3 as shown below.

解壓tar.gz文件並像下面所示安裝

tar xvfz sqlite-autoconf-3070603.tar.gz cd sqlite-autoconf-3070603 ./configure make make install

make安裝命令後會有以下的輸出。

test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin" ./libtool --mode=install /usr/bin/install -c sqlite3 /usr/local/bin/sqlite3 /usr/bin/install -c .libs/sqlite3 /usr/local/bin/sqlite3 test -z "/usr/local/include" || mkdir -p -- "/usr/local/include" /usr/bin/install -c -m 644 'sqlite3.h' '/usr/local/include/sqlite3.h' /usr/bin/install -c -m 644 'sqlite3ext.h' '/usr/local/include/sqlite3ext.h' test -z "/usr/local/share/man/man1" || mkdir -p -- "/usr/local/share/man/man1" /usr/bin/install -c -m 644 './sqlite3.1' '/usr/local/share/man/man1/sqlite3.1' test -z "/usr/local/lib/pkgconfig" || mkdir -p -- "/usr/local/lib/pkgconfig" /usr/bin/install -c -m 644 'sqlite3.pc' '/usr/local/lib/pkgconfig/sqlite3.pc'

提示:如果你對mysql數據庫有興趣,你也可以安裝在你的系統中。

原文:

SQLite3 is an extremely lightweight SQL database engine that is self-contained and serverless.

There is absolutely no configuration that you need to do to get it working. All you need to do is–install it, and start using it.

Since this is serverless, it is used in lot of the famous software that you are using, and you probably didn’t even know those software were using it. View this list to see all the big name companies who are using SQLite. PHP programming language has SQLite database built in.

If you’ve never used SQLite, follow the steps mentioned in this article to install it on Linux, and create a sample database.

Download SQLite3 Source

Go to the SQLite Download page, and click on “sqlite-autoconf-3070603.tar.gz” (Under Source Code section), and download it to your system. Or, use the wget to directly download it to your server as shown below.

wget http://www.sqlite.org/sqlite-autoconf-3070603.tar.gz

Install SQLite3 from Source

Uncompress the tar.gz file and install SQLite3 as shown below.

tar xvfz sqlite-autoconf-3070603.tar.gz cd sqlite-autoconf-3070603 ./configure make make install

make install command will displays the following output indicating that it is installing sqlite3 binaries under /usr/local/bin

test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin" ./libtool --mode=install /usr/bin/install -c sqlite3 /usr/local/bin/sqlite3 /usr/bin/install -c .libs/sqlite3 /usr/local/bin/sqlite3 test -z "/usr/local/include" || mkdir -p -- "/usr/local/include" /usr/bin/install -c -m 644 'sqlite3.h' '/usr/local/include/sqlite3.h' /usr/bin/install -c -m 644 'sqlite3ext.h' '/usr/local/include/sqlite3ext.h' test -z "/usr/local/share/man/man1" || mkdir -p -- "/usr/local/share/man/man1" /usr/bin/install -c -m 644 './sqlite3.1' '/usr/local/share/man/man1/sqlite3.1' test -z "/usr/local/lib/pkgconfig" || mkdir -p -- "/usr/local/lib/pkgconfig" /usr/bin/install -c -m 644 'sqlite3.pc' '/usr/local/lib/pkgconfig/sqlite3.pc'

Note: If you are interested in installing MySQL database on your system, you can either use yum groupinstall mysql, or install mysql from rpm.

Copyright © Linux教程網 All Rights Reserved