-
Notifications
You must be signed in to change notification settings - Fork 190
/
server.sh
51 lines (46 loc) · 1.36 KB
/
server.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
## author by jackluo
## Email [email protected]
## wechat 13228191831
##### 启动mysql 服务
docker kill mysql
docker rm mysql
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=admin -v $(pwd)/mysql8:/var/lib/mysql -d mysql:8.0.21
##### 启动redis 服务
docker stop redis
docker rm redis
echo "Start Redis Service..."
docker run --name redis -d \
--publish 6379:6379 \
--env 'REDIS_PASSWORD=admin' \
--volume $(pwd)/redis:/var/lib/redis \
sameersbn/redis:latest
### 启动 etcd 服务
#!/bin/bash
rm -rf $(pwd)/etcd && mkdir -p $(pwd)/etcd && \
docker stop etcd && \
docker rm etcd || true && \
docker run -d \
-p 2379:2379 \
-p 2380:2380 \
--mount type=bind,source=$(pwd)/etcd,destination=/etcd-data \
--name etcd \
quay.io/coreos/etcd \
/usr/local/bin/etcd \
--name s1 \
--data-dir /etcd-data \
--listen-client-urls http://0.0.0.0:2379 \
--advertise-client-urls http://0.0.0.0:2379 \
--listen-peer-urls http://0.0.0.0:2380 \
--initial-advertise-peer-urls http://0.0.0.0:2380 \
--initial-cluster s1=http://0.0.0.0:2380 \
--initial-cluster-token tkn \
--initial-cluster-state new
#### 启动elasticsearch 服务
docker stop es
docker rm es
docker run -d --name es \
-p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-v $(pwd)/elasticsearch:/usr/share/elasticsearch/data \
spencezhou/elasticsearch:7.6.2