OpenIM (Open-Source Instant Messaging) Mac Deployment Guide

OpenIM · · 174 次点击 · · 开始浏览    

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 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:-}:${KAFKA_PORT:-19094} ``` - With: ```jsx - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://${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/" -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 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 `` with ``. 5. **Start openim-chat**: ```jsx make start ``` 6. **Verification**: ```jsx make check ``` 7. **Web Interface Access**: Visit []( 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: Developer Documentation:![IMG_1065.png](


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

174 次点击  
加入收藏 微博
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传