高哲技术博客 高哲技术博客
首页
编程
爬虫
运维
硬件
收藏
归档
关于

嘉美伯爵

前途光明,无需畏惧
首页
编程
爬虫
运维
硬件
收藏
归档
关于
  • 方案

  • 数据库

    • mysql

    • es

    • redis

    • etcd

    • pg

      • PostgreSQL数据搭建和配置
      • pgvector向量数据库搭建和使用
        • 安装
        • 参考
  • 虚拟化

  • 自动化部署

  • 中间件

  • 可观测

  • 操作系统

  • 运维
  • 数据库
  • pg
fovegage
2023-07-19
目录

pgvector向量数据库搭建和使用

# 安装

# 官网
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql

# 在 postgres 用户下
# 进入数据库   postgres / postgres
sudo su - postgres
psql

# 初始化
create user biyao with password 'spider@biyao2013';
CREATE DATABASE vector_test;
GRANT ALL PRIVILEGES ON DATABASE vector_test to biyao;

# 远程连接
vim /etc/postgresql/15/main/postgresql.conf
listen_addresses = '*'
vim /etc/postgresql/15/main/pg_hba.conf
直接添加 host all all 0.0.0.0/0 trust

# 服务重启
service postgresql restart

# pgvector
git clone --branch v0.4.4 https://ghproxy.com/https://github.com/pgvector/pgvector.git
cd pgvector
# 需要先安装一下
sudo apt install postgresql-server-dev-15
sudo apt-get install gcc make
make & make install

# 教程
https://juejin.cn/post/7236541021121871928
https://hanggi.me/post/kubernetes/k8s-postgresql/
https://github.com/pgvector/pgvector
https://github.com/pgvector/pgvector#installation-notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 参考

  • Centos搭建 (opens new window)
上次更新: 2023-07-23 19:24:26
PostgreSQL数据搭建和配置
如何使用redroid打造云手机

← PostgreSQL数据搭建和配置 如何使用redroid打造云手机→

最近更新
01
token embed和postion embed
06-10
02
k8s pod日志排查问题
10-24
03
golang内部私服建设方案
10-21
更多文章>
Theme by Vdoing | Copyright © 2018-2025 嘉美伯爵 | 鲁ICP备20001560号-4
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式