### Install MaxKB with a Script Source: https://maxkb.cn/docs/v2/quick_start?q= Execute this bash script to quickly install MaxKB after uploading and extracting the installation package to your server. Ensure you are in the installation package directory. ```bash bash install.sh ``` -------------------------------- ### Execute MaxKB Installation Script Source: https://maxkb.cn/docs/v2/installation/offline_installtion?q= Navigate to the extracted installation directory and run the 'install.sh' script to begin the MaxKB installation process. This command should be executed after configuring 'install.conf'. ```bash # 进入安装包解压缩后目录 cd maxkb-v2.0.0-x86_64-offline-installer # 执行安装命令 bash install.sh ``` -------------------------------- ### Configure MaxKB Installation Settings Source: https://maxkb.cn/docs/v2/installation/offline_installtion?q= Edit the 'install.conf' file after extracting the installation package to customize installation directory, service ports, database, and Redis configurations. Changes made here apply to the initial installation. ```bash # 基础配置 ## 安装目录 MAXKB_BASE=/opt ## 服务端口 MAXKB_PORT=8080 ## docker 网段设置 MAXKB_DOCKER_SUBNET=172.31.250.192/26 # 数据库配置 ## 是否使用外部数据库 MAXKB_EXTERNAL_PGSQL=false ## 数据库地址 MAXKB_PGSQL_HOST=pgsql ## 数据库端口 MAXKB_PGSQL_PORT=5432 ## 数据库库名 MAXKB_PGSQL_DB=maxkb ## 数据库用户名 MAXKB_PGSQL_USER=root ## 数据库密码 MAXKB_PGSQL_PASSWORD=Password123@postgres # Redis配置 ## 是否使用外部Redis MAXKB_EXTERNAL_REDIS=false ## Redis地址 REDIS_HOST=redis ## Redis端口 REDIS_PORT=6379 ## Redis数据库 REDIS_DB=0 ## Redis密码 REDIS_PASSWORD=Password123@redis # 镜像配置 ## 镜像仓库 MAXKB_IMAGE_REPOSITORY=registry.fit2cloud.com/maxkb ## 镜像名称 MAXKB_IMAGE=maxkb ## 版本号 MAXKB_VERSION=v2.0.0 ``` -------------------------------- ### Install MaxKB with Bash Script Source: https://maxkb.cn/docs/v2/quick_start Execute this script after uploading and unzipping the offline installation package to quickly install MaxKB on your server. Ensure you are in the installation package directory. ```bash bash install.sh ``` -------------------------------- ### Install MaxKB on Linux Source: https://maxkb.cn/docs/v2/installation/online_installtion?q= Run this command on a Linux system with Docker installed to quickly deploy MaxKB. Ensure Docker is up-to-date. ```bash # Linux 操作系统 docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb ``` -------------------------------- ### Install MaxKB on Linux Source: https://maxkb.cn/docs/v2/installation/online_installtion Run this command on a Linux system with Docker installed to quickly deploy MaxKB. Ensure Docker is up-to-date. ```bash docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb ``` -------------------------------- ### Install MaxKB on Windows Source: https://maxkb.cn/docs/v2/installation/online_installtion Execute this command on a Windows system with Docker to deploy MaxKB. Verify Docker version compatibility. ```bash docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb ``` -------------------------------- ### Install MaxKB on Windows Source: https://maxkb.cn/docs/v2/installation/online_installtion?q= Execute this command on a Windows system with Docker to deploy MaxKB. Verify Docker version compatibility. ```bash # Windows 操作系统 docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb ``` -------------------------------- ### Install Third-Party Dependencies Source: https://maxkb.cn/docs/v2/faq/function_library?q= Install necessary Python libraries, such as pymysql, within the MaxKB container to resolve missing dependency errors. ```bash pip install pymysql ``` -------------------------------- ### Configure apt Source for NVIDIA Container Toolkit Source: https://maxkb.cn/docs/v2/faq/GPU_runOllama?q= Add the NVIDIA Container Toolkit repository to your system's apt sources. This is a prerequisite for installing the toolkit. ```bash curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list ``` -------------------------------- ### MCP Server Configuration Example Source: https://maxkb.cn/docs/v2/user_manual/app/workflow_app Provides a reference format for configuring MCP server connections, including URL and transport protocol. Adjust the 'transport' field for SSE or Streamable_HTTP. ```json { "amap-maps": { "url": "http://IP:端口/MCPserver名称", "transport":"sse" # 如果使用 Streamable_HTTP 协议,需将"sse"替换成"streamable_http" } } ``` -------------------------------- ### MCP Server Configuration Example Source: https://maxkb.cn/docs/v2/user_manual/app/workflow_app?q= Provides a reference format for configuring MCP server connection parameters, including URL and transport protocol. Adjust 'transport' to 'streamable_http' if using that protocol. ```json { "amap-maps": { "url": "http://IP:端口/MCPserver名称", "transport":"sse" # 如果使用 Streamable_HTTP 协议,需将"sse"替换成"streamable_http" } } ``` -------------------------------- ### Enter MaxKB Container Source: https://maxkb.cn/docs/v2/faq/system_management Use this command to enter the MaxKB container for database operations. For offline installations, enter the pgsql container instead. ```bash docker exec -it maxkb bash ``` -------------------------------- ### Configure NVIDIA Container Toolkit Apt Repository Source: https://maxkb.cn/docs/v2/faq/GPU_runOllama Adds the NVIDIA container toolkit GPG key and repository to your system's apt sources. This is a prerequisite for installing the toolkit. ```bash curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list ``` -------------------------------- ### Run New MaxKB Container After Upgrade Source: https://maxkb.cn/docs/v2/installation/online_installtion?q= Start a new MaxKB container with the updated image. It is critical to use the same data persistence volume mapping as identified in the inspection step to retain all existing data. ```bash docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb ``` -------------------------------- ### Extract MaxKB Installation Package Source: https://maxkb.cn/docs/v2/installation/offline_installtion?q= Use this command to extract the MaxKB offline installer package on the deployment server. Ensure you are logged in as the root user. ```bash tar -zxvf maxkb-v2.0.0-x86_64-offline-installer.tar.gz ``` -------------------------------- ### Install NVIDIA Container Toolkit Source: https://maxkb.cn/docs/v2/faq/GPU_runOllama Installs the NVIDIA container toolkit package, which enables Docker containers to access NVIDIA GPUs. This is essential for GPU acceleration. ```bash sudo apt-get install -y nvidia-container-toolkit ``` -------------------------------- ### Install Third-Party Dependencies in MaxKB Container Source: https://maxkb.cn/docs/v2/user_manual/tool/tool Use pip to install necessary Python packages within the MaxKB Docker container. This is required if your custom tools depend on external libraries. ```bash # Enter the MaxKB container docker exec -it maxkb bash # Install third-party dependencies, such as pymysql, by executing the following command pip install pymysql ``` -------------------------------- ### mkctl Command Usage and Help Source: https://maxkb.cn/docs/v2/installation/cli View available commands and their descriptions for the mkctl CLI tool. This command is only available in offline installations. ```bash Usage: mkctl [COMMAND] [ARGS...] mkctl --help Commands: status 查看 MaxKB 服务运行状态 start 启动 MaxKB 服务 stop 停止 MaxKB 服务 restart 重启 MaxKB 服务 reload 重新加载 MaxKB 服务 uninstall 卸载 MaxKB 服务(不会删除数据) version 查看 MaxKB 版本信息 clear-images 清理 MaxKB 旧版本的相关镜像 ``` -------------------------------- ### Enter MaxKB Container Source: https://maxkb.cn/docs/v2/faq/function_library?q= Access the MaxKB container to manage dependencies and configurations. ```bash docker exec -it maxkb bash ``` -------------------------------- ### mkctl Command Usage Source: https://maxkb.cn/docs/v2/installation/cli?q= View available commands and their descriptions for the mkctl tool. This command is available when MaxKB is installed via the offline package. ```bash Usage: mkctl [COMMAND] [ARGS...] mkctl --help Commands: status 查看 MaxKB 服务运行状态 start 启动 MaxKB 服务 stop 停止 MaxKB 服务 restart 重启 MaxKB 服务 reload 重新加载 MaxKB 服务 uninstall 卸载 MaxKB 服务(不会删除数据) version 查看 MaxKB 版本信息 clear-images 清理 MaxKB 旧版本的相关镜像 ``` -------------------------------- ### MaxKB Professional/Enterprise Edition Configuration (Token) Source: https://maxkb.cn/docs/v2/Skills/MaxKB_Skills?q= Configure environment variables for MaxKB Professional or Enterprise Edition using a Bearer Token for authentication. ```bash MAXKB_DOMAIN=<你的 MaxKB 服务地址> MAXKB_WORKSPACE_ID=default MAXKB_TOKEN= ``` -------------------------------- ### Remove Old MaxKB Container Source: https://maxkb.cn/docs/v2/installation/online_installtion?q= Stop and remove the currently running MaxKB container before starting the new version. This command forcefully removes the container. ```bash docker rm -f maxkb ``` -------------------------------- ### MaxKB Professional/Enterprise Edition Configuration (Username/Password) Source: https://maxkb.cn/docs/v2/Skills/MaxKB_Skills?q= Configure environment variables for MaxKB Professional or Enterprise Edition using username and password for authentication. ```bash MAXKB_DOMAIN=<你的 MaxKB 服务地址> MAXKB_WORKSPACE_ID=default MAXKB_USERNAME=<用户名> MAXKB_PASSWORD=<密码> ```