OpenIM (Open-Source Instant Messaging) Mac Deployment Guide

本文涉及的产品
对象存储 OSS,20GB 3个月
日志服务 SLS,月写入数据量 50GB 1个月
对象存储 OSS,恶意文件检测 1000次 1年
简介: 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:

    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:
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://${DOCKER_BRIDGE_GATEWAY:-172.28.0.1}:${KAFKA_PORT:-19094}
      
    • With:
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://127.0.0.1:${KAFKA_PORT:-19094}
      
  3. Start the Service:

    docker compose up -d
    
  4. Final Configurations:

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

    make start
    
  6. Verification:

    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:

    cd ..
    
  2. Deploy from Source:

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

    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:

    make start
    
  6. Verification:

    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![IMG_1065.png](https://ucc.alicdn.com/pic/developer-ecology/oex6afmylec3o_7c733dc02e694c00912072076962dcd7.png)

目录
相关文章
|
2月前
|
存储 关系型数据库 MySQL
mysql安装教程mac
【4月更文挑战第21天】
|
1月前
|
应用服务中间件 开发工具 nginx
Mac M1/M2/M3 芯片环境配置以及常用软件安装-前端
Mac M1/M2/M3 芯片环境配置以及常用软件安装-前端 最近换了台新 Mac,所有的配置和软件就重新安装下,顺便写个文章。
83 1
|
1月前
|
应用服务中间件 Shell nginx
mac m1笔记本docker 安装nginx
mac m1笔记本docker 安装nginx
87 4
|
16天前
|
存储 Java API
Mac安装jadx并配置环境
Mac安装jadx并配置环境
24 0
|
23天前
|
Java Maven
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
36 0
|
2月前
|
安全 Java iOS开发
MAC OS X 硬盘安装详细分解教程
MAC OS X 硬盘安装详细分解教程
48 1
|
2月前
|
编解码 Oracle iOS开发
VirtualBox虚拟机安装Mac OS X Lion系统详解
VirtualBox虚拟机安装Mac OS X Lion系统详解
77 1
|
2月前
|
前端开发 JavaScript 程序员
HBuilderX使用mac打包ios应用提示苹果根证书没有安装
HBuilderX使用mac打包ios应用提示苹果根证书没有安装
35 0
|
2月前
|
分布式计算 Hadoop 大数据
[大数据] mac 史上最简单 hadoop 安装过程
[大数据] mac 史上最简单 hadoop 安装过程