How to install SQLite 3.9 with JSON support on Ubuntu 15.04

Source: Internet
Author: User
Tags sqlite sqlite download ruby on rails



Welcome to our article on SQLite, SQLite is the most widely used SQL database engine in the world today, it basically does not need to be configured, it can be run without setting or management. SQLite is a public domain (Public-domain) software that 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 handles complex query commands that may fetch data from multiple tables and then generate reports and data summaries.



SQLite is a very small, lightweight, non-stand-alone service process or system. It can run on Unix,linux,mac Os-x,android,ios and Windows and has been used by a number of software programs such as Opera, Ruby on Rails, Adobe System, Mozilla Firefox, Goo GLE Chrome and Skype.





1) Basic Requirements:


Installing SQLite on most SQLite-enabled platforms is basically not a complex requirement.



Let's log in to the Ubuntu server using sudo or root privileges on the CLI or Secure Shell. Then update the system so that it can update the operating system's software to the new version.



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


    1. #apt-get update


If you are deploying SQLite on a newly installed Ubuntu, then you need to install some basic system management tools such as wget, make, unzip, GCC.



To install wget, you can use the following command, and if prompted, enter Y:


    1. #apt-get install wgetmakegcc




2) Download SQLite


To download SQLite, it is best to download the SQLite website, as shown below #p# page title #e#






SQLite Download



You can also copy the connection of the resource directly and then use the wget download at the command line, as follows:


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





wget SQLite



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


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




3) Install SQLite


Now we're going to start installing and configuring SQLite that we just downloaded. Compile, install SQLite on Ubuntu and run the configuration script:


    1. [email protected]-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local


#p # pagination Title #e#



SQLite Installation



After configuring the installation location prefix (prefix) above, run the following command to compile the installation package.


  1. [email protected]-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=CompileGcc-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 /span>


After running the above command, to complete the SQLite installation on Ubuntu to run the following command. #p # pagination Title #e#


    1. #make install





SQLite make Install





4) Test SQLite installation


To ensure that the SQLite 3.9 installation succeeds, run the following command.


    1. # sqlite3


The version of SQLite is displayed on the command line.






Testing SQLite Installation





5) Using SQLite


SQLite is easy to get started with. For detailed usage, enter the following command in the SQLite console.


    1. sqlite>.help


All the available commands and detailed instructions are shown here.



#p # pagination Title #e#



SQLite Help



Now the last part, create the database with a little SQLite command.



To create a new database, you need to run the following command.


    1. # sqlite3 test.db


Then create a new table.


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


Then use the following command to insert the 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, you can 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 leave.


      #p # pagination Title #e#
    1. sqlite>.exit





Using SQLite3





Conclusion


With this article you can learn if installing the latest version of support for JSON1 Sqlite,sqlite from 3.9.0 to support JSON1. This is a great library that can be embedded into the application and can be used to manage resources efficiently and lightly. We hope you will find this article helpful, please feel free to give us feedback about your problems and difficulties.

Reproduced in: http://www.itxuexiwang.com/a/shujukujishu/2016/0302/203.html?1457018883



How to install SQLite 3.9 with JSON support on Ubuntu 15.04


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.