# README
Thanks for using this project !
English | 简体中文
Installation
Use go get
to install SDK:
$ go get -u github.com/ryon-wen/own-utils@latest
Docker Run (example)
Attention: latest
tag is the image's version
MySQL: (xxx
is your password)
$ docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=xxx -d mysql:latest
Redis:
$ docker run --name redis -p 6379:6379 -d redis:latest
Nacos:
$ docker run --name nacos -e MODE=standalone -e JVM_XMS=512m -e JVM_XMX=512m -e JVM_XMN=256m -p 8848:8848 -p 9848:9848 -p 9849:9849 -d nacos/nacos-server:latest
Only for macOS (Apple Silicon)
$ docker run --name nacos -e MODE=standalone -e JVM_XMS=512m -e JVM_XMX=512m -e JVM_XMN=256m -p 8848:8848 -p 9848:9848 -p 9849:9849 -d nacos/nacos-server-m1:2.0.3
ElasticSearch:
- Install
elasticsearch:7.17.6
and run
$ docker run --name elasticsearch -d -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node" -p 9200:9200 -p 9300:9300 elasticsearch:7.17.6
- Install
kibana:7.17.6
and run
$ docker run -d --name kibana -p 5601:5601 --link elasticsearch -e "ELASTICSEARCH_URL=http://127.0.0.1:9200" kibana:7.17.6
- Entering the
kibana
container
$ docker exec -u 0 -it kibana /bin/bash
- Install
vim
into the container
$ apt-get update
$ apt-get install vim
- Edit
kibana.yml
in the container
$ vi /opt/kibana/config/kibana.yml
- Press
insert
key then copy to the last row
$ i18n.locale: "zh-CN"
-
Press
ESC
to exit edit then input:wq
and PressEnter
to save the change, at last inputexit
to exit the container -
Download elasticsearch-analysis-ik-7.17.6.zip
-
Copy the downloaded file into the elasticsearch container (
xxx
is your file path)
$ docker cp xxx elasticsearch:/usr/share/elasticsearch/plugins
- Entering the
elasticsearch
container
$ docker exec -it elasticsearch bash
- Entering the
plugins
directory
$ cd plugins/
- Create new folder named
ik
$ mkdir ik
- Move the
elasticsearch-analysis-ik-7.17.6.zip
file to theik
directory
$ mv elasticsearch-analysis-ik-7.17.6.zip ik/
- Entering the
ik
directory
$ cd ik/
- Unzip the zip file
$ unzip elasticsearch-analysis-ik-7.17.6.zip
- Delete the zip file
$ rm -rf elasticsearch-analysis-ik-7.17.6.zip
- Exit the container and restart
elasticsearch
andkibana
$ exit
$ docker restart elasticsearch
$ docker restart kibana