# 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

相关推荐
BugShare7 小时前
轻量级原生 macOS 智能剪贴板管理器
macos·贴图
Fleshy数模7 小时前
从课堂视频到结构化教学数据:基于语音识别与 LLM 的智能处理方案
ide·macos·xcode
洛水如云10 小时前
系统还原全攻略:Win11/10/7/macOS详细操作指南
windows·macos·电脑
Andya_net10 小时前
MySQL | DBeaver Mac版下载、安装与使用指南
数据库·mysql·macos
2501_9160088913 小时前
Xcode功能、下载、反馈与版本支持详细解析
ide·vscode·macos·ios·个人开发·xcode·敏捷流程
扬帆破浪1 天前
免费开源AI软件.桌面单机版,可移动的AI知识库,察元 AI桌面版:macOS首次启动报无法验证 开发者签名与公证的现实做法
人工智能·macos·开源·知识图谱
irpywp1 天前
合盖断网打断后台计算,Modafinil:一款防休眠菜单栏工具,让 Mac 闭眼继续跑 Agent
macos·ios·开源·github
一只AI打工虾的自我修养1 天前
DeepSeek V4.1 vs Ollama vs LocalClaw:Mac本地AI工具横评
人工智能·windows·macos
拂晓 AI 编程1 天前
Mac 本地跑 GUI Agent:4B 模型实现云端效果
macos
薛定猫AI1 天前
【深度解析】Gemma Chat:基于 MLX 的 Mac 离线 Coding Agent 架构与实战
macos·架构