---
title: 源码编译安装
description: "1. 获取FastDB源码。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/FastDB/openmind_fastdb376_03_0018.html
sourcePath: /source/zh/kunpengdbs/ecosystemEnable/FastDB/openmind_fastdb376_03_0018.html
indexId: e1e2882c58b961423f234a58e1430c9d432dc1f5d54c7092aa9f54cb7789836776
---
# 源码编译安装

1. 获取FastDB源码。

  a. 在本地浏览器下载    FastDB源码(http://www.garret.ru/fastdb-3.76.tar.gz)
。
  b. 将源码复制至服务器“/home”目录。
若服务器可以访问网络，则可以直接在服务器上使用wget命令下载源码。

```
cd /home
wget http://www.garret.ru/fastdb-3.76.tar.gz
```


2. 进入“/home”目录。
  1 cd /home/

3. 解压FastDB安装包。
  1 tar -xvf fastdb-3.76.tar.gz

4. 进入“fastdb”目录。
  1 cd fastdb

5. 执行以下命令执行编译。
  1 ./configure --prefix=/opt/fastdb --build=arm-linux

  PREFIX=PATH：指定FastDB的安装目录。

6. 执行以下命令执行编译安装。
  1 make -j64

  -j 64：充分利用CPU多核优势，加快编译速度。其中参数-j后数字为CPU核数，可用cat /proc/cpuinfo | grep processor | wc -l进行查看，此数值应小于等于CPU核数。 如果编译安装过程中出现testtimeseries.cpp:70:53: error: call of overloaded ‘fmin(float&, float&)’ is ambiguous报错信息，请参考make失败报错。

7. 执行安装。
  1 make install

8. 查看安装目录。
  1 2 ll /opt/fastdb ll /opt/fastdb/bin
