update readme.md

pull/4/head
away 4 years ago
parent 0f3098d9e0
commit d419983a36

@ -44,97 +44,102 @@ business data.
#### Building from Source
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
> 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**.
2. Open-IM relies on five open source high-performance components: **Etcd**, **MySQL**, **MongoDB**, **Redis**, **Kafka**. Before you deploy Open-IM privately, please make sure that you have installed the above five components and **check the component parameters ** in the configuration file. If your server does not have the above components, you must install the missing components first. **If you have the above components, it is recommended to use them directly, if not, Docker installation is recommended, which is faster and more convenient**.
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
3. Git clone Open-IM project
3. Git clone Open-IM project
```
git clone https://github.com/tinode/chat
https://github.com/OpenIMSDK/Open-IM-Server.git
```
4. Open [config.yaml](https://github.com/Open-IM-IM/opim_admin/blob/main/config/config.yaml),then modify the following parameters.
- Check that the Etcd connection parameters.
- Check that the ETCD connection parameters.
```
etcd:
etcdAddr: [ 127.0.0.1:2379]
```
```
etcd:
etcdAddr: [ 127.0.0.1:2379]
```
- Check or modify database(MySQL) connection parameters are correct for your database.
- Check or modify database(MySQL) connection parameters are correct for your database.
```
mysql:
dbAddress: [ 127.0.0.1:3306]
dbUserName: xxx
dbPassword: xxx
```
```
mysql:
dbAddress: [ 127.0.0.1:3306]
dbUserName: xxx
dbPassword: xxx
```
- Check or modify database(MongoDB) connection parameters are correct for your database.
- Check or modify database(MongoDB) connection parameters are correct for your database.
```
mongo:
dbAddress: [ 127.0.0.1:27017 ]
dbUserName:
dbPassword:
```
```
mongo:
dbAddress: [ 127.0.0.1:27017 ]
dbUserName:
dbPassword:
```
- Check or modify Redis connection parameters.
- Check or modify Redis connection parameters.
```
redis:
dbAddress: [ 127.0.0.1:6379]
dbPassWord:
```
```
redis:
dbAddress: [ 127.0.0.1:6379]
dbPassWord:
```
- Check or modify Kafka connection parameters.
- Check or modify Kafka connection parameters.
```
kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ]
ms2pschat:
addr: [ 127.0.0.1:9092 ]
```
```
kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ]
ms2pschat:
addr: [ 127.0.0.1:9092 ]
```
5. Build Open-IM server and database initializer:
- **MySQL**
```
```
- **MongoDB**
```
...
```
6. Enter the script directory and execute the script according to the steps。
1. Shell authorization
- **MySQL**
```
chmod +x *.sh
need to add
```
2. Execute build shell
- **MongoDB**
```
./auto_build_service_file.sh
need to add
```
3. Start service
6. Enter the script directory and execute the script according to the steps。
```
./auto_start_service.sh
```
1. Shell authorization
```
chmod +x *.sh
```
2. Execute build shell
```
./build_all_service.sh
```
3. Start service
```
./start_all.sh
```
#### Using Docker to run Open-IM-Server
All images are available at https://hub.docker.com/r/lyt1123/open_im_server
> 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**.
1. [Install Docker](https://docs.docker.com/install/) 1.13 or above.
All images are available at https://hub.docker.com/r/lyt1123/open_im_server
2. Open-IM relies on five open source high-performance components: **Etcd**, **MySQL**, **MongoDB**, **Redis**, **Kafka**. Before you deploy Open-IM privately, please make sure that you have installed the above five components and **check the component parameters ** in the configuration file. If your server does not have the above components, you must install the missing components first. **If you have the above components, it is recommended to use them directly, if not, Docker installation is recommended, which is faster and more convenient**.
1. [Install Docker](https://docs.docker.com/install/) 1.13 or above.
3. Pull Open_IM_Server Image from docker
@ -146,56 +151,56 @@ All images are available at https://hub.docker.com/r/lyt1123/open_im_server
4. External config file,the container comes with a built-in config file which can be customized with values from the environment variables .**If changes are extensive it may be more convenient to replace the built-in config file with a custom one**. In that case map the config file located on your host.
- Create configuration folder directory
- Create configuration folder directory
```
mkdir -p open_im_server/config
```
```
mkdir -p open_im_server/config
```
- Download the [config.yaml](https://github.com/Open-IM-IM/opim_admin/blob/main/config/config.yaml) file from github, then modify the following parameters
- Download the [config.yaml](https://github.com/Open-IM-IM/opim_admin/blob/main/config/config.yaml) file from github, then modify the following parameters
- Check or modify the Etcd connection parameters.
- Check or modify the Etcd connection parameters.
```
etcd:
etcdAddr: [ 127.0.0.1:2379]
```
```
etcd:
etcdAddr: [ 127.0.0.1:2379]
```
- Check or modify database(MySQL) connection parameters are correct for your database.
- Check or modify database(MySQL) connection parameters are correct for your database.
```
mysql:
dbAddress: [ 127.0.0.1:3306]
dbUserName: xxx
dbPassword: xxx
```
```
mysql:
dbAddress: [ 127.0.0.1:3306]
dbUserName: xxx
dbPassword: xxx
```
- Check or modify database(MongoDB) connection parameters are correct for your database.
- Check or modify database(MongoDB) connection parameters are correct for your database.
```
mongo:
dbAddress: [ 127.0.0.1:27017 ]
dbUserName:
dbPassword:
```
```
mongo:
dbAddress: [ 127.0.0.1:27017 ]
dbUserName:
dbPassword:
```
- Check or modify the Redis connection parameters.
- Check or modify the Redis connection parameters.
```
redis:
dbAddress: [ 127.0.0.1:6379]
dbPassWord:
```
```
redis:
dbAddress: [ 127.0.0.1:6379]
dbPassWord:
```
- Check or modify the Kafka connection parameters.
- Check or modify the Kafka connection parameters.
```
kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ]
ms2pschat:
addr: [ 127.0.0.1:9092 ]
```
```
kafka:
ws2mschat:
addr: [ 127.0.0.1:9092 ]
ms2pschat:
addr: [ 127.0.0.1:9092 ]
```
5. Start Open-IM-Server Service
@ -203,13 +208,13 @@ All images are available at https://hub.docker.com/r/lyt1123/open_im_server
docker run -p 10000:10000 -p 7777:7777 --name open_im_server -v /home/open_im_server/logs:/home/open_im_server/logs -v /home/open_im_server/config/config.yaml:/home/open_im_server/config/config.yaml --restart always -d docker.io/lyt1123/open_im_server:[tag]
```
- -p 10000:10000 The container port maps the host 10000 port, provides api service.
- -p 7777:7777 The container port maps the host 7777 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
- -p 10000:10000 The container port maps the host 10000 port, provides api service.
- -p 7777:7777 The container port maps the host 7777 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
>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

Loading…
Cancel
Save