How to install JSON-supported SQLite 3.9.1 on Ubuntu 15.04

Source: Internet
Author: User
Tags sqlite download

How to install JSON-supported SQLite 3.9.1 on Ubuntu 15.04

Welcome to read our article on SQLite. SQLite is the most widely used SQL database engine in the world today. It can run without configuration or management. SQLite is a public-domain software. It is a relational database management system (RDBMS) used to store user-defined records in a large data table. For data storage and management, the database engine needs to process complex query commands that may obtain data from multiple tables and then generate reports and data summaries.

SQLite is a very small, lightweight, and does not require independent service processes or systems. It can run On UNIX, Linux, Mac OS-X, Android, iOS and Windows, has been used by a large number of software programs, such as Opera, Ruby On Rails, Adobe System, Mozilla Firefox, google Chrome and Skype.

 

1) basic requirements:

Installing SQLite on most platforms that support SQLite basically has no complicated requirements.

Let's log on to the Ubuntu server with sudo or root permissions on CLI or Secure Shell. Then update the system so that the software of the operating system can be updated to the new version.

On Ubuntu, use the following command to update the software source of the system.

  1. #apt-get update

If you want to deploy SQLite on the newly installed Ubuntu, you need to install some basic system management tools, such as wget, make, unzip, and gcc.

To install wget, run the following command. If the system prompts, enter Y:

  1. #apt-get install wgetmakegcc

 

2) download SQLite

Download SQLite from the official SQLite website, as shown below:

SQLite download

You can also directly copy the resource connection and use wget to download it on the command line, as shown below:

  1. #wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz

Wget SQLite

After the download is complete, decompress the installation package, switch the working directory to the decompressed SQLite directory, and use the following command.

  1. #tar-zxvf sqlite-autoconf-3090100.tar.gz

 

3) install SQLite

Now we need to start installing and configuring the downloaded SQLite. Compile and install SQLite on Ubuntu and run the configuration script:

  1. root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local

SQLite Installation

After the prefix is configured, run the following command to compile the installation package.

  1. root@ubuntu-15:~/sqlite-autoconf-3090100#make
  2. source='sqlite3.c' object='sqlite3.lo' libtool=yes \
  3. DEPDIR=.deps depmode=none /bin/bash./depcomp \
  4. /bin/bash./libtool --tag=CC --mode=compile gcc-DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c

After running the preceding command, install SQLite on Ubuntu and run the following command.

  1. #make install

SQLite Make Install

 

4) test SQLite Installation

To ensure that SQLite 3.9 is successfully installed, run the following command.

  1. # sqlite3

The SQLite version is displayed on the command line.

Testing SQLite Installation

 

5) Use SQLite

SQLite is easy to use. For detailed usage, enter the following command in the SQLite console.

  1. sqlite>.help

All available commands and detailed descriptions are displayed.

SQLite Help

Now, run the SQLite command to create a database.

To create a new database, run the following command.

  1. # sqlite3 test.db

Create a new table.

  1. sqlite> create table memos(text, priority INTEGER);

Use the following command to insert data.

  1. sqlite> insert into memos values('deliver project description',15);
  2. sqlite> insert into memos values('writing new artilces',100);

To view the inserted data, run the following command.

  1. sqlite> select *from memos;
  2. deliver project description|15
  3. writing new artilces|100

Or use the following command to exit.

  1. sqlite>.exit

Using SQLite3

 

Conclusion

This article describes how to install the latest version of SQLite that supports JSON1. SQLite supports JSON1 from 3.9.0. This is a great library that can be embedded into the application and can be used to effectively and easily manage resources. We hope you will find this article helpful. Please feel free to give us feedback on your problems and difficulties.

Analysis on the combination of storage and data types in SQLite3

SQLite3 installation and basic operations

Simple Application of SQLite databases in Ubuntu 12.04

How to install SQLite in Ubuntu 12.04

Basics of SQLite Database

SQLite details: click here
SQLite: click here

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.