Categorygithub.com/ryon-wen/own-utils
module
1.1.1
Repository: https://github.com/ryon-wen/own-utils.git
Documentation: pkg.go.dev

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

  1. 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
  1. 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
  1. Entering the kibana container
$ docker exec -u 0 -it kibana /bin/bash
  1. Install vim into the container
$ apt-get update
$ apt-get install vim
  1. Edit kibana.yml in the container
$ vi /opt/kibana/config/kibana.yml
  1. Press insert key then copy to the last row
$ i18n.locale: "zh-CN"
  1. Press ESC to exit edit then input :wq and Press Enter to save the change, at last input exit to exit the container

  2. Download elasticsearch-analysis-ik-7.17.6.zip

  3. Copy the downloaded file into the elasticsearch container (xxx is your file path)

$ docker cp xxx elasticsearch:/usr/share/elasticsearch/plugins
  1. Entering the elasticsearch container
$ docker exec -it elasticsearch bash
  1. Entering the plugins directory
$ cd plugins/
  1. Create new folder named ik
$ mkdir ik
  1. Move the elasticsearch-analysis-ik-7.17.6.zip file to the ik directory
$ mv elasticsearch-analysis-ik-7.17.6.zip ik/
  1. Entering the ik directory
$ cd ik/
  1. Unzip the zip file
$ unzip elasticsearch-analysis-ik-7.17.6.zip
  1. Delete the zip file
$ rm -rf elasticsearch-analysis-ik-7.17.6.zip
  1. Exit the container and restart elasticsearch and kibana
$ exit
$ docker restart elasticsearch
$ docker restart kibana

# Packages

No description provided by the author
No description provided by the author
No description provided by the author