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.
- #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:
- #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:
- #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.
- #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:
- [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.
-
- [email protected]-15:~/sqlite-autoconf-3090100#make
-
- source=‘sqlite3.c‘ object=‘sqlite3.lo‘ libtool=yes \
-
- DEPDIR=.deps depmode=none /bin/bash./depcomp \
- /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#
- #make install
SQLite make Install
4) Test SQLite installation
To ensure that the SQLite 3.9 installation succeeds, run the following command.
- # 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.
- 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.
- # sqlite3 test.db
Then create a new table.
- sqlite> create table memos(text, priority INTEGER);
Then use the following command to insert the data.
- sqlite> insert into memos values(‘deliver project description‘,15);
- sqlite> insert into memos values(‘writing new artilces‘,100);
To view the inserted data, you can run the following command.
- sqlite> select *from memos;
- deliver project description|15
- writing new artilces|100
or use the following command to leave.
#p # pagination Title #e#
- 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