# OpenIM (Open-Source Instant Messaging) Mac Deployment Guide

This guide provides step-by-step instructions for deploying OpenIM on a Mac, including both source code and Docker deployment methods.

Preliminary Environment Setup

Ensure a clean working environment:

  1. Create a New Directory: Start in a new directory to prevent conflicts.
  2. Check for Conflicting Processes : Run these commands:
    • ps -ef | grep openim
    • ps -ef | grep chat
  3. Check Docker Containers : Use docker ps to confirm no related containers are running.

Source Code Deployment

Deploying openim-server

Deploying from source requires adjusting Docker's network configurations for Mac.

  1. Clone and Prepare the Repository:

    jsx 复制代码
    git clone https://github.com/openimsdk/open-im-server
    cd open-im-server
    export OPENIM_IP="[Your External/Internal IP]"
    make init
  2. Configure Kafka in docker-compose.yml:

    • Replace:

      jsx 复制代码
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://${DOCKER_BRIDGE_GATEWAY:-172.28.0.1}:${KAFKA_PORT:-19094}
    • With:

      jsx 复制代码
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://127.0.0.1:${KAFKA_PORT:-19094}
  3. Start the Service:

    jsx 复制代码
    docker compose up -d
  4. Final Configurations:

    jsx 复制代码
    vim config/config.yaml -c "%s/172\.28\.0\.1/127.0.0.1/g" -c "wq"
  5. Launch openim-server:

    jsx 复制代码
    make start
  6. Verification:

    jsx 复制代码
    make check

    Wait five minutes before checking to ensure accuracy.

Deploying openim-chat

Deploy openim-chat using source code or Docker.

  1. Return to Parent Directory:

    jsx 复制代码
    cd ..
  2. Deploy from Source:

    jsx 复制代码
    git clone https://github.com/openimsdk/chat
    cd chat
    make init
  3. Set Up MySQL (if not already deployed):

    jsx 复制代码
    docker run -d \
      --name mysql \
      -p 13306:3306 \
      -p 23306:33060 \
      -v "$(pwd)/components/mysql/data:/var/lib/mysql" \
      -v "/etc/localtime:/etc/localtime" \
      -e MYSQL_ROOT_PASSWORD="openIM123" \
      --restart always \
      mariadb:10.6
  4. Configure openim-chat :

    Modify config/config.yaml, replacing 172.28.0.1 with 127.0.0.1.

  5. Start openim-chat:

    jsx 复制代码
    make start
  6. Verification:

    jsx 复制代码
    make check
  7. Web Interface Access :

    Visit http://127.0.0.1:11001. For validation, see this guide.

Docker Deployment

For Docker deployment on Mac, refer to OpenIM Docker Documentation.

About OpenIM

OpenIM is an open-source instant messaging component and solution that specializes in in-app communication. It is one of the most popular open-source IM projects currently. Developers can integrate the OpenIM component and deploy the server privately, quickly incorporating instant and real-time communication capabilities into their applications, ensuring the security and confidentiality of business data.

Repository address: https://github.com/openimsdk

Developer Documentation: https://docs.openim.io/guides/introduction

相关推荐
软件资深者30 分钟前
macOS Tahoe 26.3.1 ISO 虚拟机专用镜像:win系统/ESXi 服务器装苹果系统,改个后缀就能用
运维·服务器·macos·镜像·虚拟机
东方鲤鱼3 小时前
MAC部署openClaw 实现自动化助手实战
运维·macos·自动化
kishu_iOS&AI5 小时前
OpenClaw 版本升级 自动更新指令文档
macos·openclaw
AryShaw7 小时前
macOS 上搭建 RK3568 交叉编译环境
linux·macos
火星数据-Tina8 小时前
巨省Token:OpenClaw安装部署并接入数眼智能特价模型全流程(包含Windows和Mac)
windows·macos
facaixxx202418 小时前
OpenClaw在Mac电脑上部署安装教程:两种方法安装龙虾方法
macos
ITKEY_18 小时前
macOS安装fvm管理flutter版本
flutter·macos
刘一说20 小时前
告别“版本漂移”:彻底解决 macOS 上 NVM 默认 Node 版本失效的难题
macos·node·nvm
知智前沿1 天前
OpenClaw 本地部署详细教程(Windows+Mac 双系统)
windows·macos
想要AC的sjh1 天前
【硬核实战】Mac mini M4 部署 OpenClaw + Ollama 本地大模型:从零到一打通飞书机器人
macos·机器人·飞书