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.

 

GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐