I recently saw that Lsky Pro had been updated to version 2.0, adding many new features, including support for multiple database drivers.

With the idea that simpler is better, since my image hosting service is currently only for personal use and won't have much data anyway, I decided to take this opportunity to switch it to SQLite.

According to the requirements in the documentation, it needs SQLite 3.8.8+, while the default SQLite version on CentOS 7 is quite old, so it needs to be upgraded.

Upgrade

Check the SQLite version

[root@localhost ~]# sqlite3 --version
3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668
[root@localhost ~]#

As expected, it is version 3.7.17, which is several years old. Open SQLite's official website to check the latest version, then begin compiling and installing it.

https://www.sqlite.org/download.html

Compile and install

wget https://www.sqlite.org/2022/sqlite-autoconf-3380100.tar.gz
tar -zxvf sqlite-autoconf-3380100.tar.gz
cd sqlite-autoconf-3380100
./configure --prefix=/usr/local/sqlite
make && make install

Replace the old SQLite3

mv /usr/bin/sqlite3 /usr/bin/sqlite3_old

Set up the new SQLite3

mv /usr/local/sqlite/bin/sqlite3 /usr/bin/sqlite3

Check the SQLite version

[root@localhost ~]# sqlite3 --version
3.38.1 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc
[root@localhost ~]#

At this point, SQLite has been upgraded successfully.