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](http://127.0.0.1:11001). For validation, see [this guide](https://docs.openim.io/guides/gettingStarted/quickTestServer).

## Docker Deployment

For Docker deployment on Mac, refer to [OpenIM Docker Documentation](https://docs.openim.io/zh-Hans/guides/gettingStarted/dockerCompose).

## 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

OpenIM (Open-Source Instant Messaging) Mac Deployment Guide的更多相关文章

  1. [ETL] Flume 理论与demo(Taildir Source & Hdfs Sink)

    一.Flume简介 1. Flume概述 Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据: ...

  2. 我的常用笔记(GetAndroid,ADBDemo,GetSJ,GetTB)

    一.授权相关格式(GetAndroid,ADBDemo,GetTB,GetSJ) [Mac]ID=0,     Mac=9918D2A363,    EndTime=2018-12-30 15:45: ...

  3. 在 Mac OS X 上创建的 .NET 命令行程序访问数据库 (使用Entity Framework 7 )

    var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...

  4. 一个映射到mac风格按键的AHK脚本(替换虚拟机键盘映射)

    Mac键位映射(部分) win+q 退出程序 win+w 关闭当前页面 win+h 隐藏当前窗口 win+shift+h 隐藏其他窗口 win+s 保存 win+o 打开 win+z 撤销 win+s ...

  5. 开源网络准入系统(open source Network Access Control system)

    开源网络准入系统(open source Network Access Control system) http://blog.csdn.net/achejq/article/details/5108 ...

  6. (转)Mac OS X中配置Apache

    我使用的Mac OS X版本是10.8.2,Mac自带了Apache环境. 启动Apache 设置虚拟主机 启动Apache 打开“终端(terminal)”,输入 sudo apachectl -v ...

  7. 使用GCM服务(Google Cloud Messaging)实现Android消息推送

    最近在网上查了关于很多Android消息推送的资料,其中主要有四种方法. 1) 使用GCM服务(Google Cloud Messaging) 2) 使用XMPP协议(Openfire + Spark ...

  8. iOS、mac开源项目及库(感谢原作者的分享)

    目录 模糊效果 富文本 表相关 HUD与Toast 其他UI 其他动画 网络测试 网络聊天 Model 数据库 PDF 摄像照相视频音频处理 消息相关 消息推送服务器端 版本新API的Demo 测试及 ...

  9. 与众不同 windows phone (33) - Communication(通信)之源特定组播 SSM(Source Specific Multicast)

    原文:与众不同 windows phone (33) - Communication(通信)之源特定组播 SSM(Source Specific Multicast) [索引页][源码下载] 与众不同 ...

  10. 与众不同 windows phone (32) - Communication(通信)之任意源组播 ASM(Any Source Multicast)

    原文:与众不同 windows phone (32) - Communication(通信)之任意源组播 ASM(Any Source Multicast) [索引页][源码下载] 与众不同 wind ...

随机推荐

  1. Centos7 怎么永久关闭防火墙

    1.连接到centos主机,然后输入命令"systemctl status firewalld.service"并按下回车键. 2.然后在下方可以查看得到 " activ ...

  2. web应用模式 api接口 接口测试工具postman restful规范

    目录 web应用模式 前后端混合开发 流程说明(重要) 前后端分离开发 流程说明(重要) api接口 接口测试工具postman 基本介绍 编码格式 restful规范(重要) 简介 主要内容 练习 ...

  3. 你真的了解token续期嘛?

    Spring Boot + Vue中的Token续签机制 在现代的全栈应用开发中,Spring Boot作为后端框架和Vue.js作为前端框架的组合非常流行.在这种架构中实现Token续签是保障应用安 ...

  4. C# 32位程序申请大内存

    VS2015 项目-->属性-->生成事件 在"后期生成事件命令行"中输入: cd /d $(DevEnvDir) cd.. cd.. cd VC\bin editbi ...

  5. ElasticSearch 精确查询统计

    ElasticSearch 精确查询统计 match_phrase:短语匹配,不分词 GET logback-2022-08/_search { "size": 1, //显示1条 ...

  6. POJ 3268 Silver Cow Party 题解 《挑战程序设计竞赛》

    POJ 3268 Silver Cow Party 奶牛派对:有分别来自 N 个农场的 N 头牛去农场 X 嗨皮,农场间由 M 条有向路径连接.每头牛来回都挑最短的路走,求它们走的路的最大长度? 们其 ...

  7. 使用屏幕捕捉API:一站式解决屏幕录制需求

    随着科技的发展,屏幕捕捉API技术逐渐成为一种热门的录屏方法.本文将详细介绍屏幕捕捉API技术的原理.应用场景以及如何利用这一技术为用户提供便捷.高效的录屏体验. 在线录屏 | 一个覆盖广泛主题工具的 ...

  8. SpringCloud Alibaba Security安全认证

    一. Security配置(auth认证中心) 代码地址 https://github.com/typ1805/blog-cloud Spring Security是一套安全框架,可以基于RBAC(基 ...

  9. sipp3.6 on centos7安装部署

    概述 在VOIP软交换的开发过程中,必然需要对软交换进行批量压测. SIP压测工具一般都是sipp,免费,开源,功能足够强大,配置灵活,优点多. 环境 centos7.9 cmake3.6 sipp ...

  10. Vue第五篇 Vue的生命周期

    Vue生命周期简介 生命周期的钩子函数 <!DOCTYPE html> <html lang="en"> <head> <meta cha ...