Linux下编译Sqlite源码

1.下载

wget https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz --no-check-certificate

2.解压

tar zxvf sqlite-autoconf-3410200.tar.gz

 

3.配置路径

cd sqlite-autoconf-3410200/

./configure --prefix=/data/sqlite #先建立该路径

 

4.编译

make && make install

 

5.运行

cd /data/sqlite/bin/

sqlite3 test.db

6.数据库操作

sqlite> create table test(id,name,age);
sqlite> .tables
test

sqlite> insert into test select 1,'zhangsan',18;
sqlite> select * from test;
1|zhangsan|18

 

posted @ 2023-04-01 17:30  石门口人  阅读(251)  评论(0)    收藏  举报