Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install SQLite 3.9.1 with JSON support on Ubuntu15.04

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

In this article Xiaobian introduces in detail "how to install SQLite 3.9.1 with JSON support on Ubuntu15.04" with detailed contents, clear steps and proper handling of details. I hope that this article "how to install SQLite 3.9.1 with JSON support on Ubuntu15.04" can help you solve your doubts.

SQLite is the most widely used SQL database engine today. Not only does it not require independent service processes and systems, but it is also a very small, lightweight SQL database engine.

1) basic requirements:

There are basically no complex requirements for installing SQLite on most platforms that support SQLite.

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

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

# apt-get update

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

To install wget, use the following command and, if prompted, type Y:

# apt-get install wget make gcc2) download SQLite

To download SQLite, it is best to download it from the SQLite website, as shown below

You can also directly copy the connection to the resource and download it using wget on the command line, as follows:

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

After the download is complete, extract the installation package, change the working directory to the unzipped SQLite directory, and use the following command.

# tar-zxvf sqlite-autoconf-3090100.tar.gz3) install SQLite

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

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

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

Root@ubuntu-15:~/sqlite-autoconf-3090100# makesource='sqlite3.c' object='sqlite3.lo' libtool=yes\ DEPDIR=.deps depmode=none / bin/bash. / depcomp\ / 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 above command, to complete the installation of SQLite on Ubuntu, run the following command.

# make install

4) Test SQLite installation

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

# sqlite3

The version of SQLite is displayed on the command line.

5) use SQLite

SQLite is easy to use. For more details on how to use it, enter the following command in the SQLite console.

Sqlite > .help

All available commands and detailed instructions are displayed here.

Now for the final part, use a little SQLite command to create the database.

To create a new database, 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, run the following command.

Sqlite > select * from memos;deliver project description | 15writing new artilces | 100

Or use the following command to leave.

Sqlite > .exit

After reading this, the article "how to install SQLite 3.9.1 with JSON support on Ubuntu15.04" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it to understand it. If you want to know more about the article, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report