Centos7 升级 sqlite3


下载地址:https://www.sqlite.org/download.html

[root@djangoServer ~]# wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz
[root@djangoServer ~]# tar -zxvf sqlite-autoconf-3290000.tar.gz

#构建并安装
[root@djangoServer ~]# cd sqlite-autoconf-3270200
[root@djangoServer sqlite-autoconf-3290000]# ./configure --prefix=/usr/local/sqlite
[root@djangoServer sqlite-autoconf-3290000]# make && make install

#检查版本
## 最新安装的sqlite3版本
[root@djangoServer ~]# /usr/local/sqlite/bin/sqlite3 --version

# 备份旧的sqlite3
[root@djangoServer ~]# mv /usr/bin/sqlite3 /usr/bin/sqlite3_old

## 软链接将新的sqlite3设置到/usr/bin目录下
[root@djangoServer ~]# ln -s /usr/local/sqlite/bin/sqlite3 /usr/bin/sqlite3

## 查看当前全局sqlite3的版本
[root@djangoServer ~]# sqlite3 --version
3.29.0 2019-07-10 17:32:03 fc82b73eaac8b36950e527f12c4b5dc1e147e6f4ad2217ae43ad82882a88bfa6

#将路径传递给共享库
# 设置开机自启动执行,可以将下面的export语句写入 ~/.bashrc 文件中,如果如果你想立即生效,可以执行source 〜/.bashrc 将在每次启动终端时执行
[root@djangoServer ~]# export LD_LIBRARY_PATH=/usr/local/sqlite/lib


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM