Linuxの下でソースコードからSQLite 3をインストールする方法

4194 ワード

SQLite 3は、極めて軽量で独立したサーバレスSQLデータベースエンジンです.
 
仕事をさせるための構成は必要ありません.必要なものはすべてインストールして使用します.
 
サーバがない以上、多くの有名なソフトウェアで使用されています.それらのソフトウェアが使用されていることを知らないかもしれません.次の例を見てください.すべての大手企業がSQLieteを使用しています.PUPプログラミング言語にはSQLiteデータベースが埋め込まれている.
 
SQLiteを使用したことがない場合は、次の手順に従ってLinuxにインストールし、サンプル・データベースを作成します.
 
SQLite 3ソースコードのダウンロード
SQLiteに行ってページをダウンロードし、「sqlite-autoconf-3070603.tar.gz」(ソースコードセクション)をクリックしてシステムにダウンロードします.またはwgetを使用してサーバから直接ダウンロードすると次のようになります.
wget http://www.sqlite.org/sqlite-autoconf-3070603.tar.gz

 
SQLite 3のインストール
 
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.