1、yum remove sqlite3(基本可以不用,后面是直接覆盖的方式)
2、下载安装包
sqlite3下载地址:https://www.sqlite.org/download.html
wget下载:
wget -O sqlite-autoconf-3280000.tar.gz https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
3、解压并安装(依次执行下面命令):
tar zxvf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
./configure
make
make install
对于centos7以上版本,如果版本还是默认的低的版本,需要把解压目录中的sqlite3 覆盖 /usr/bin/sqlite3
cp sqlite3 /usr/bin/sqlite3
检查版本:
[root]# sqlite3 -version
3.28.0 2019-04-16 19:49:53 884b4b7e502b4e991677b53971277adfaf0a04a284f8e483e2553d0f83156b50
或者直接输入sqlite3也行,输入“.quit”退出sqlite3:
[root]# sqlite3
SQLite version 3.28.0 2019-04-16 19:49:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .quit