Deploying OpenIM involves multiple components and supports various methods, including source code, Docker, and Kubernetes. This requires ensuring compatibility between different deployment methods while effectively managing differences between versions. Indeed, these are complex issues involving in-depth technical details and precise system configurations. Our goal is to simplify the deployment process while maintaining the system’s flexibility and stability to suit different users’ needs. Currently, version 3.5 has simplified the deployment process, and this version will be maintained for a long time. We welcome everyone to use it.

1. Environment and Component Requirements

Environmental Requirements

NoteDetailed Description

OSLinux system

HardwareAt least 4GB of RAM

Golangv1.19 or higher

Dockerv24.0.5 or higher

Gitv2.17.1 or higher

Storage Component Requirements

Storage ComponentRecommended Version

MongoDBv6.0.2 or higher

Redisv7.0.0 or higher

Zookeeperv3.8

Kafkav3.5.1

MySQLv5.7 or higher

MinIOLatest version

2. Deploying OpenIM Server (IM)

2.1 Setting OPENIM_IP

# If the server has an external IPexportOPENIM_IP="external IP"# If only providing internal network servicesexportOPENIM_IP="internal IP"

2.2 ️ Deploying Components (mongodb/redis/zookeeper/kafka/MinIO, etc.)

gitclone https://github.com/OpenIMSDK/open-im-server&&cdopen-im-server# It's recommended to switch to release-v3.5 or later release branchesmakeinit&&docker compose up -d

2.3 ️ Compilation

makebuild

2.4 Starting/Stopping/Checking

# Startmakestart# Stopmakestop# Checkmakecheck

3. Deploying App Server (Chat)

3.1 ️ Deploying Components (mysql)

# Go back to the previous directorycd..# Clone the repository, recommended to switch to release-v1.5 or later release branchesgitclone https://github.com/OpenIMSDK/chat chat&&cdchat# Deploy mysqldocker run -d --name mysql2 -p13306:3306 -p33306:33060 -v"$(pwd)/components/mysql/data:/var/lib/mysql"-v"/etc/localtime:/etc/localtime"-eMYSQL_ROOT_PASSWORD="openIM123"--restart always mysql:5.7

3.2 ️ Compilation

makeinitmakebuild

3.3 Starting/Stopping/Checking

# Startmakestart# Stopmakestop# Checkmakecheck

4. Quick Validation

Open Ports

IM Ports

TCP PortDescriptionAction

TCP:10001ws protocol, messaging port, for client SDKAllow port

TCP:10002API port, like user, friend, group, message interfacesAllow port

TCP:10005Required when choosing MinIO storage (OpenIM defaults to MinIO storage)Allow port

Chat Ports

TCP PortDescriptionAction

TCP:10008Business system, like registration, login, etc.Allow port

TCP:10009Management backend, like statistics, account banning, etc.Allow port

PC Web and Management Backend Frontend Resource Ports

TCP PortDescriptionAction

TCP:11001PC Web frontend resourcesAllow port

TCP:11002Management backend frontend resourcesAllow port

Grafana Port

TCP PortDescriptionAction

TCP:13000Grafana portAllow port

Verification

PC Web Verification

Note: Enter http://ip:11001 in your browser to access the PC Web. This IP should be the server’s OPENIM_IP to ensure browser accessibility. For first-time use, please register using your mobile phone number, with the default verification code being 666666.

 

Image: PC Web Interface Example

App Verification

Scan the following QR code or click here to download.

Image: App Download QR Code

Note: Double-click on OpenIM and change the IP to the server’s OPENIM_IP then restart the App. Please ensure related ports are open, and restart the App after making changes. For first-time use, please register first through your mobile phone number, with the default verification code being 666666.

 

Image: Server Address Modification - Step 1

 

Image: Server Address Modification - Step 2

5. Modifying Configuration Items

5.1 ️ Modifying Shared Configuration Items

Configuration ItemFiles to be ModifiedAction

mongo/kafka/minio related.env, openim-server/config/config.yamlRestart components and IM

redis/zookeeper related.env, openim-server/config/config.yaml, chat/config/config.yamlRestart components, IM, and Chat

SECRETopenim-server/config/config.yaml, chat/config/config.yamlRestart IM and Chat

5.2 Modifying Special Configuration Items

Special configuration items: API_OPENIM_PORT/MINIO_PORT/OPENIM_IP/GRAFANA_PORT

Modify the special configuration items in the .env file

Modify the configuration in openim-server/config/config.yaml according to the rules

Modify the configuration in chat/config/config.yaml according to the rules

Restart IM and Chat

5.3 ️ Modifying Other Configuration Items

For other configuration items in .env, chat/config/config.yaml, and openim-server/config/config.yaml, you can modify these items directly in the respective files.

5.4 Modifying Ports

Note that for any modification of IM-related ports, it’s necessary to synchronize the changes in open-im-server/scripts/install/environment.sh.

6. Frequently Asked Questions

6.1 Viewing Logs

Runtime logs: logs/OpenIM.log.all.*

Startup logs: _output/logs/openim_*.log

6.2 Startup Order

The startup order is as follows:

Components IM depends on: mongo/redis/kafka/zookeeper/minio, etc.

IM

Components Chat depends on: mysql

Cha

t

6.3 Docker Version

The new version of Docker has integrated docker-compose.

Older versions of Docker might not support the gateway feature. It’s recommended to upgrade to a newer version, such as 23.0.1.

7. About OpenIM

Thanks to widespread developer support, OpenIM maintains a leading position in the open-source instant messaging (IM) field, with the number of stars on Github exceeding 12,000. In the current context of increasing attention to data and privacy security, the demand for IM private deployment is growing, which aligns with the rapid development trend of China’s software industry. Especially in government and enterprise sectors, with the rapid development of information technology and the widespread application of innovative

industries, the demand for IM solutions has surged. Further, the continuous expansion of the collaborative office software market has made “secure and controllable” a key attribute.

Repository address: https://github.com/openimsdk

 

🛠 Open Source Instant Messaging (IM) Project OpenIM Source Code的更多相关文章

  1. Instant Messaging for Business: Your 10 Best Options

    Instant Messaging for Business: Your 10 Best Options By Iaroslav Kudritskiy It's probably not a surp ...

  2. The source attachment does not contain the source for the file  ActionSupport.class 错误

    报错  Syntax error, insert ";" to complete FieldDeclaration 报错   The source attachment does ...

  3. debug网页时小问题The source attachment does not contain the source for the file

    第一次debug总是出现下图问题,提示我没加源码... The source attachment does not contain the source for the file ... 解决方法: ...

  4. ubuntu server激活即时通讯IM服务 Instant Messaging is not activated on this server

    转自:http://shine-it.net/index.php/topic,16469.msg28364.html ubuntu server 下 odoo激活及时通讯功能im OpenERP IM ...

  5. Instant Messaging for OpenERP v7

    This module is based on the socket.io real time implementation. It inherit Of the modules web_longpo ...

  6. Android Project from Existing Code 生成 R 文件错误、失败等问题解决办法 - 持续更新

    Android Project from Existing Code 生成 R 文件错误.失败等问题解决办法 - 持续更新 git  上的项目,pull下来之后用Android Project fro ...

  7. Source Insight 基本使用(1)-使用Source Insight查看Android Framework 源码

    一.下载framework源码: google已经把framework源码托管在了gitHub上: https://github.com/android/platform_frameworks_bas ...

  8. Source Insight 基本使用(2)-修改Source Insight 快捷键

    1. 首先,打开source insight主界面. 2. 选择"options->key assignments",进入快捷键设置界面. 3. 此时,可以看到快捷键设置对话 ...

  9. The source attachment does not contain the source for the file SignatureParser.class错误

    在myeclipse整合tomcat的完毕后,再启动tomcat的时候会出现这样的错误,呵呵,错误的大致意思是什么相关联错误,其实是myeclipse新加入的tomcat的模式出现错误了,myecli ...

  10. A tutorial that will show you how to build an instant messaging app with Sinch.

    http://stackoverflow.com/questions/26247986/unsatisfiedlinkerror-couldnt-load-sinch-android-rtc-from ...

随机推荐

  1. SpringBoot 配置 Swagger

    Profile Config 多环境不同配置 1.添加 Pom 文件 <dependency> <groupId>io.springfox</groupId> &l ...

  2. MB52增强

    一.在MB52报表中新增字段 实现如图效果 二.增强实现 MB52程序为RM07MLBS,在程序中找到定义的内表结构bestand,在最后创建隐式增强,加入增强字段,该内表为将来展示的ALV数据 设置 ...

  3. Tomcat 优雅关闭之路

    本文首发于 vivo互联网技术 微信公众号 链接:https://mp.weixin.qq.com/s/ZqkmoAR4JEYr0x0Suoq7QQ作者:马运杰 本文通过阅读Tomcat启动和关闭流程 ...

  4. 神秘又强大的@SpringBootApplication注解

    一.前言 大部分的配置都可以用Java类+注解来代替,而在SpringBoot项目中见的最多的莫过于@SpringBootApplication注解了,它在每个SpringBoot的启动类上都有标注. ...

  5. 红黑树是什么?红黑树 与 B+树区别和应用场景?

    红黑树是什么?怎么实现?应用场景? 红黑树(Red-Black Tree,简称R-B Tree),它一种特殊的二叉树. 意味着它满足二叉查找树的特征:任意一个节点所包含的键值,大于等于左孩子的键值,小 ...

  6. vue-awesome-swiper swiper/dist/css/swiper.css 报not found错误

    解决办法删除package-lock.json文件写死package.json版本号  "vue-awesome-swiper": "^3.1.3", 删除no ...

  7. Linux 系统安全加固经验总结

    本文为博主原创,转载请注明出处: 目录  1. 禁止root密码登录 2. linux 用户密钥复杂度及有效期设置 3. 检查sudo权限 4.关闭ftp 5.设置文件的属主并指定读写执行权限 6.管 ...

  8. 使用Amber计算单点能三步走

    技术背景 Amber是一个在分子动力学中非常常用的一个软件,可以用于进行分子动力学模拟计算,可以与一些软件配合进行增强采样.这里我们简单介绍一下如何使用Amber去计算一个分子构象的单点势能值,及其对 ...

  9. 【C++】static 静态成员

    静态成员 静态成员包括静态数据成员和静态成员函数,提供了同类对象间数据成员的共享机制 静态成员不是某个对象的成员,是类所有对象的共享成员,只建立一个成员副本 静态成员的定义与引用 定义格式:stati ...

  10. Jrebel与Xrebel教学

    简介 JRebel和XRebel是两个非常有用的工具,可以显著提升Java开发人员的生产力和应用程序性能. JRebel是一个强大的Java开发工具,它允许开发人员在不重新启动应用程序的情况下进行代码 ...