- 服务端安装:
apt install redis-server
- 下载C/C++开发库:https://github.com/redis/hiredis/releases
- 编译C/C++开发库:
make && make install
- 编译运用程序:
gcc -o example example.c $(pkg-config --libs --cflags hiredis)
- 服务端安装:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
- 下载C/C++开发库:https://github.com/mongodb/mongo-c-driver/releases
- 编译C/C++开发库:
./configure && make && make install
- 编译运用程序:
gcc -o hello_mongoc hello_mongoc.c $(pkg-config --libs --cflags libmongoc-1.0)
- 服务端安装:https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna
- 安装相关库:
apt install mariadb-server mariadb-client libmariadbclient-dev libmariadbd-dev phpmyadmin
- 下载C/C++开发库:https://github.com/MariaDB/mariadb-connector-c/releases
- 编译C/C++开发库:
cmake . && make && make install
- 编译运用程序:
gcc main.c -o main $(mysql_config --libs --cflags)