sqlite命行操作指南.docVIP

  • 4
  • 0
  • 约1.28万字
  • 约 6页
  • 2017-03-09 发布于贵州
  • 举报
sqlite命行操作指南

Compiling SQLite from Source Compiling SQLite from source on POSIX systems follows very closely the MinGW instructions given earlier for the Windows platform actually it is more the other way around; MinGW installation apes Linux source installation! . To build SQLite on POSIX systems, you need to ensure that you have the GNU Compiler Collection GCC installed, including Autoconf, Automake, and Libtool. Most of the systems already discussed include all of these by default. With this software in place, you can build SQLite by doing the following: 1. Download the Linux/Unix SQLite tarball source code from the SQLite website. At the time of this writing, the current version is sqlite-3.3.4.tar.gz. Place it in a directory e.g., /tmp . 2. Navigate to your build directory: cd /tmp 3. Unpack the SQLite tarball: tar -xzvf sqlite-3.3.4.tar.gz 4. Move into the unpacked directory: cd sqlite-3.3.4 5. Create the Makefile: ./configure 6. If you want to create a multithreaded shared library, run ./configure -–enable-threads –disable-tcl –prefix /home/temp 7. Other options, such as the installation directory, are also available. For a complete list of configure options, run ./configure --help 8. Build the source: make 9. As root, install: make install You now have a functional SQLite installation on your system that includes both the SQLite shared library and a dynamically linked CLP which uses the SQLite shared library . If you have GNU Readline installed on you system, the CLP should be compiled with Readline support. Test it out by running it from the command line: root@linux # sqlite3 This will invoke the CLP using an in-memory database. Type .help for a list of shell commands. Type .exit to close the application, or press Ctrl+D. You can just as easily type .h for short. Many of the commands can be similarly abbreviated, such as .e—short for .exit—to exit the shell. Let’s start by creating a database that we will call test.db. From the command line, open the CLP in shell

文档评论(0)

1亿VIP精品文档

相关文档