Overview
This article walks you through the process of installing a custom version of SQLite.
Installing a custom version of SQLite
SQLite is already installed on all DreamHost servers but you can also install your own version locally under your username. To install a custom version:
- Log into your server via SSH.
- Make sure you're in your user's home directory:
[server]$ cd ~
- Visit the SQLite download page to download the most recent version.
- Download it to your user's directory using the wget command:
[server]$ wget https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
- Decompress the file:
[server]$ tar zxvf sqlite-autoconf-3330000.tar.gz
- Change into the new directory:
[server]$ cd sqlite-autoconf-3330000
- Run the following to configure it:
[server]$ ./configure --prefix=$HOME/opt/sqlite
- Run make and make install to complete the installation:
[server]$ make [server]$ make install
-
Add the following lines to your .bash_profile. This is a file located in your user's home directory:
export PATH=$HOME/opt/sqlite/bin:$PATH
export LD_LIBRARY_PATH=$HOME/opt/sqlite/lib
export LD_RUN_PATH=$HOME/opt/sqlite/lib - Run the source command on your .bash_profile file:
[server]$ source .bash_profile
- 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 2024-04-02 13:23:32
- Quit the SQLite shell by running the following:
sqlite> .quit