4

Installing a custom version of SQLite3

 3 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/360028047592-Installing-a-custom-version-of-SQLite3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Installing a custom version of SQLite3

Overview

SQLite is already installed on all DreamHost servers. You can also install your own version locally under your username. This article walks you through this process.

Installing

  1. Log into your server via SSH.
  2. Make sure you're in your user's home directory.
    [server]$ cd ~
  3. Visit the SQLite download page to download the most recent version.
  4. Run the following to download it to your user's directory.
    [server]$ wget https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
  5. Decompress the file.
    [server]$ tar zxvf sqlite-autoconf-3330000.tar.gz
  6. Change into the new directory.
    [server]$ cd sqlite-autoconf-3330000
  7. Run the following to configure it.
    [server]$ ./configure --prefix=$HOME/opt/sqlite
  8. Run make and make install to complete the installation.
    [server]$ make
    [server]$ make install
  9. Add the following to your .bash_profile.
    export PATH=$HOME/opt/sqlite/bin:$PATH
    export LD_LIBRARY_PATH=$HOME/opt/sqlite/lib
    export LD_RUN_PATH=$HOME/opt/sqlite/lib
  10. source your .bash_profile.
    [server]$ source .bash_profile
  11. Finally, check the version to confirm it's now being used.
    [server]$ which sqlite3
    /home/username/opt/sqlite/bin/sqlite3
    [server]$ sqlite3
    SQLite version 3.33.0 2020-08-14 13:23:32
  12. You can then quit the sqlite shell by running the following.
    sqlite> .quit

See also

Did this article answer your questions?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK