DEV Community

Cover image for How to install the Weaviate vector database on Debian 12
New Bing
New Bing

Posted on

How to install the Weaviate vector database on Debian 12

I've researched a variety of vector databases. Like Pinecone, Redis, Qdrant, Milvus, Weaviate, Chroma, pgvector. After comparing them, I chose Weaviate as my vector database.

How to install Weaviate on Debian 12

First, Download Weaviate

Go to github.com/weaviate/weaviate, then find the version that is suitable for your operating system.
I chose to download weaviate-v1.20.3-linux-amd64.tar.gz

mkdir vectordb
cd vectordb
wget https://github.com/weaviate/weaviate/releases/download/v1.20.3/weaviate-v1.20.3-linux-amd64.tar.gz
Enter fullscreen mode Exit fullscreen mode

Then install Weaviate

First unzip the file, then add the configuration file.

tar -zxvf weaviate-v1.20.3-linux-amd64.tar.gz
Enter fullscreen mode Exit fullscreen mode

You need to configure the authentication and data persistence environment as below. We use API authentication for test.

export AUTHENTICATION_APIKEY_ENABLED=true
export AUTHENTICATION_APIKEY_ALLOWED_KEYS=q8Z5HN4U2w8jUDRGeGxyKkqvwjPg7w4P
export AUTHENTICATION_APIKEY_USERS=newbing@example.com
export PERSISTENCE_DATA_PATH=/home/newbing/vectordb/data
Enter fullscreen mode Exit fullscreen mode

Launch Weaviate

After unzip file and set the environment, you can launch a instance of weaviate.

./weaviate --host=127.0.0.1 --port=8181 --scheme=http
Enter fullscreen mode Exit fullscreen mode

Launch with supervisor

If you don't want to start or stop by hand, you can use Supervisor to manage the Weaviate instance.
The supervisor config file:

[program:weaviate]
directory=/home/newbing/vectordb/
command=/home/newbing/vectordb/weaviate --host=127.0.0.1 --port=8181 --scheme=http
autostart=true
autorestart=true
user=www
environment=HOME="/home/www",AUTHENTICATION_APIKEY_ENABLED="true",AUTHENTICATION_APIKEY_ALLOWED_KEYS="q8Z5HN4U2w7jUDRGeGxyKkqvwjPg7w4P",AUTHENTICATION_APIKEY_USERS="newbing@example.com",PERSISTENCE_DATA_PATH="/home/newbing/vectordb/data"
numprocs=1
redirect_stderr=true
stdout_logfile=/var/log/supervisor/weaviate.log
Enter fullscreen mode Exit fullscreen mode

Finally, I'd like to introduce my new project: the GPT2API.

What is GPT2API?

Website: https://aicanvas.app/gpt
GPT2API is a platform to help you build API to make ChatGPT easier to use. You can build API and share it with the community, or you can call API from API.Hub, which is other API shared by the community.

Features:

  1. Build API with ChatGPT commands.
  2. Test API on the website.
  3. Share it with the community.
  4. Have the community extend the API.
  5. Sample code for your project.
  6. Cheap price for calling ChatGPT, $1 with 600K tokens.

If you have any questions about GPT2API or programming, you can contact me on the twitter. You are very welcome to experience GPT2API. I hope to get your comments.

Top comments (0)