> Open-IM relies on five open source high-performance components: **ETCD**, **MySQL**, **MongoDB**, **Redis**, **Kafka**. Before you deploy Open-IM-Server privately, please make sure that you have installed the above five components and **check the component connection parameters** in the configuration file. you must install the missing components first,If your server does not have the above components. **It is recommended to use it directly, if you have the above components, if not, Docker-compose is recommended, which you don't need to install dependenciesis and more convenient**.
> Open-IM relies on five open source high-performance components: **ETCD**, **MySQL**, **MongoDB**, **Redis**, **Kafka**. Before you deploy Open-IM-Server privately, please make sure that you have installed the above five components and **check the component connection parameters** in the configuration file. you must install the missing components first,If your server does not have the above components. **It is recommended to use it directly, if you have the above components, if not, Docker installation is recommended, which is faster and more convenient**.
#### Building from Source
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
@ -56,7 +56,7 @@ business data.
```
```
3. Open [config.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/config/config.yaml),then modify the
3. Open [config.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/config/config.yaml),then modify the
following parameters.
following parameters,**127.0.0.1 replace with your host IP**.
- Check or modify the Etcd connection parameters.
- Check or modify the Etcd connection parameters.
@ -70,9 +70,6 @@ business data.
```
```
mysql:
mysql:
dbAddress: [ 127.0.0.1:3306 ]
dbAddress: [ 127.0.0.1:3306 ]
dbUserName: xxx
dbPassword: xxx
dbDatabaseName: openIM
```
```
- Check or modify database(MongoDB) connection parameters are correct for your
- Check or modify database(MongoDB) connection parameters are correct for your
@ -81,8 +78,6 @@ business data.
```
```
mongo:
mongo:
dbAddress: [ 127.0.0.1:27017 ]
dbAddress: [ 127.0.0.1:27017 ]
dbUserName:
dbPassword:
```
```
- Check or modify Redis connection parameters.`No authentication mode if dbPassword is empty else authentication`
- Check or modify Redis connection parameters.`No authentication mode if dbPassword is empty else authentication`
@ -90,7 +85,6 @@ business data.
```
```
redis:
redis:
dbAddress: [ 127.0.0.1:6379 ]
dbAddress: [ 127.0.0.1:6379 ]
dbPassWord:
```
```
- Check or modify Kafka connection parameters.
- Check or modify Kafka connection parameters.
@ -103,70 +97,58 @@ business data.
addr: [ 127.0.0.1:9092 ]
addr: [ 127.0.0.1:9092 ]
```
```
4. Database initializer:
4. Build and start Service.
- **MySQL**
1. Shell authorization
1. Shell authorization
```
```
chmod +x *.sh
#cd Open-IM-server/scrip
```
2. Enter the script directory and execute `mysql_database_init.sh`
```
#1.Enter the directory
cd Open-IM-server/scrip
#2.execute the shell
chmod +x *.sh
./mysql_database_init.sh
```
```
5. Build and start Service.
2. Execute the build shell
1. Execute the build shell
```
```
./build_all_service.sh
./build_all_service.sh
```
```
2. Start service
3. Start service
```
```
./start_all.sh
./start_all.sh
```
```
#### Using Docker to run Open-IM-Server
#### Using Docker to run Open-IM-Server(One-click deployment)
> Open-IM relies on five open source high-performance components: **ETCD**, **MySQL**, **MongoDB**, **Redis**, **Kafka**. Before you deploy Open-IM-Server privately, please make sure that you have installed the above five components and **check the component connection parameters** in the configuration file. you must install the missing components first,If your server does not have the above components. **It is recommended to use it directly, if you have the above components, if not, Docker installation is recommended, which is faster and more convenient**.
All images are available at https://hub.docker.com/r/lyt1123/open_im_server
All images are available at https://hub.docker.com/r/lyt1123/open_im_server
1. [Install Docker](https://docs.docker.com/install/) 1.13 or above.
1. [Install Docker](https://docs.docker.com/install/) 1.13 or above.
3. Pull Open_IM_Server Image from docker
3. [Install Docker Compose](https://docs.docker.com/compose/install/) 1.22 or above.
3. [Download redis configuration](https://redis.io/topics/config) download the redis configuration file to **`/home/redis/config`**
- -p `10000:10000` The container port maps the host 10000 port, provides api service.
- -p `17778:17778` The container port maps the host 17778 port, provides message services.
- --name `open_im_server` Container service name
- -v `/home/open_im_server/logs:/home/open_im_server/logs` The container log directory maps the host directory
- -v `/home/open_im_server/config/config.yaml:/home/open_im_server/config/config.yaml` The container
configuration file maps the host configuration file
- --restart `always` Automatically start when the container is closed abnormally
- -d Running service in the background
### CONFIGURATION INSTRUCTIONS
### CONFIGURATION INSTRUCTIONS
>Open-IM configuration is divided into basic component configuration and business internal service configuration. Developers need to fill in the address of each component as the address of their server component when using the product, and ensure that the internal service port of the business is not occupied
>Open-IM configuration is divided into basic component configuration and business internal service configuration. Developers need to fill in the address of each component as the address of their server component when using the product, and ensure that the internal service port of the business is not occupied