forked from gurkanucar/mqtt-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.txt
112 lines (61 loc) · 2.81 KB
/
doc.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#broker.conf
listener 1883
password_file passFile
allow_anonymous false
#passFile
admin:password
mosquitto -v -c broker.conf
mosquitto_passwd -U passFile
mosquitto_sub -t myTopic -u admin -P 12345678
mosquitto_pub -t myTopic -m "hello world!" -u admin -P 12345678
mosquitto_pub -t myTopic -m "{\"deviceId\":\"device1\",\"lat\":\"41.63322\",\"lon\":\"26.62385\",\"message\":\"hifromapp!\",\"topic\":\"myTopic\"}" -u admin -P 12345678
mosquitto_pub -t myTopic -m "{\"message\":\"Hello,MQTTfromclient!\",\"topic\":\"myTopic\"}" -u admin -P 12345678
docker-compose -f docker-compose.yml up --build -d #run docker file
QoS (Quality of Service):
- QoS 0: At most once delivery - the message may not be delivered at all, or may be delivered more than once.
- QoS 1: At least once delivery - the message will be delivered at least once, but may be delivered more than once in some cases.
- QoS 2: Exactly once delivery - the message will be delivered exactly once, and there will be no duplicates. This level of QoS provides the highest level of reliability, but also requires the most overhead.
mvn clean install -DskipTests
mvn clean package -DskipTests
docker-compose build --no-cache
docker-compose up --force-recreate
sudo docker-compose up <service_name>
redis-cli flushall
docker-compose up -d --no-deps --build <service_name>
docker rmi $(docker images -q)
docker stop $(docker ps -qa)
find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
docker logs --tail=50 <service_name>
sudo service docker start
npm install -D react-scripts
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
git config remote.origin.url "https://github.com/gurkanucar/mqtt-example.git"
git remote set-url origin [email protected]:gurkanucar/mqtt-example.git
cat ~/.ssh/id_ed25519.pub | pbcopy
aws installitions:
sudo amazon-linux-extras install epel -y
sudo yum install xclip -y
sudo yum install git -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo systemctl start docker
sudo service docker status
sudo groupadd docker
sudo usermod -a -G docker ec2-user
newgrp docker
docker --version
sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 16.15.1
df -h
docker system prune -a --volumes