SQLite is already installed on all DreamHost servers, however the version is different depending on which version of Ubuntu your server is running (Trusty or Bionic). You can view those details here:
You can also install your own version locally under your username. This article walks you through this process.
- 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.
- Run the following to download it to your user's directory.
[server]$ wget https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
- Decompress the file.
[server]$ tar zxvf sqlite-autoconf-3280000.tar.gz
- Change into the new directory.
[server]$ cd sqlite-autoconf-3280000
- Run the following the 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 to your .bash_profile.
- Source your .bash_profile.
[server]$ source .bash_profile
- Finally, check the version to confirm it's now being used.
[server]$ which sqlite3 /home/user/opt/sqlite/bin/sqlite3 [server]$ sqlite3 SQLite version 3.28.0 2019-04-16 19:49:53