unqlite安裝shell腳本
01
#! /bin/sh
02
03
# 下載源碼
04
wget -c http://up.2cto.com/2013/0709/20130709022156488.zip
05
06
# 解壓源碼
07
unzip unqlite-db-116.zip
08
09
# 編譯源碼
10
gcc -Wall -fPIC -c *.c
11
gcc -shared -Wl,-soname,libunqlite.so.1 -o libunqlite.so.1.0 *.o
12
13
# 建立軟鏈接
14
sudo cp `pwd`/libunqlite.so.1.0 /usr/local/lib/
15
sudo cp `pwd`/unqlite.h /usr/local/include/
16
sudo ln -sf /usr/local/lib/libunqlite.so.1.0 /usr/local/lib/libunqlite.so.1
17
sudo ln -sf /usr/local/lib/libunqlite.so.1 /usr/local/lib/libunqlite.so
18
19
# 建立共享
20
sudo ldconfig /usr/local/lib/libunqlite.so
21
22
# 下載golang unqlite驅動包
23
git clone
[email protected]:ceh/gounqlite.git