# 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

相关推荐
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
吃汤圆的抹香鲸1 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
甜于酸12 小时前
MuMu模拟器Pro for Mac 安卓手机平板模拟器
android·macos·智能手机
渔夫阿布13 小时前
在MAC上面通过HomeBrew安装node和npm@指定版本
前端·macos·npm
waicsdn_haha13 小时前
TeX Live 2025 最新版安装与中文环境配置全教程(Windows/Mac/Linux)
linux·windows·macos·论文笔记·sublime text·mdk·嵌入式开发工具
xinyu39118 小时前
iOS Framework代码中加载图片资源
macos·ios·cocoa
励志前端小黑哥20 小时前
brew search报错,xcrun:error:invalid active developer path CommandLineTools
macos
至天1 天前
MacPorts 创建自定义 Portfile 安装 RoadRunner
macos·安装·macports·roadrunner·portfile
南瓜胖胖2 天前
【如何提取现有seismic unix文件为头文件和道数据文件】
macos·unix·mac
南瓜胖胖3 天前
【关于seisimic unix中使用suedit指令无法保存问题】
macos·unix·seismic unix