-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhosting.sh
361 lines (361 loc) · 7.36 KB
/
hosting.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
dir
ls -a
clear
dir
ls
ls -a
mkdir jackpot
dir
cd jackpot/
clear
nvm
node -v
sudo yum update
sudo yum install –y nodejsCopied!
sudo yum install –y nodejs
node -v
git -v
apache -v
httpd
which http
which httpd
sysctl stop httpd
sysctl status httpd
sysctl status httpd2
ls -la /etc/systemd/system/
which apache2
which apache
lsof -i :80
sudo yum install nginx
cd /etc/nginx/
ls -la
nano nginx.conf
dig slowrug.io
exit
ls --la
ls -la
cd /etc/nginx/
ls -la
nano nginx.conf
mkdir sites-enabled
mkdir sites-available
cd sites-available/
ls -la
nano slowrug.io
nginx -t
cd ~
cd /etc/nginx/sites-available/
ls -la
mv slowrug.io api.slowrug.io
cpd api.slowrug.io slowrug.io
cp api.slowrug.io slowrug.io
nano slowrug.io
cd ~
ls l-a
ls -la
cd jackpot/
ls -la
cd Jackpot_Game_Frontend/
ls -la
cd jackport-frontend/
ls -la
npm i
yarn
npm
sudo yum install yarn
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
sudo yum install yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
sudo yum install yarn
yarn --version
yarn
nano /etc/systemd/system/slowrug.io.service
ls -la
pwd
yarn build
ls
ls -la
ls .next/
pwd
nano ~/run_front.sh
bash ~/run_front.sh
nano /etc/systemd/system/slowrug.io.service
ls la ~
ls ~
ls -la
cd #
ls -la
pwd
nano /etc/systemd/system/slowrug.io.service
cp /etc/systemd/system/slowrug.io.service /etc/systemd/system/api.slowrug.io.service
nano /etc/systemd/system/api.slowrug.io.service
ls -la
DB_CONNECTION=mongodb+srv://apollo:[email protected]/jackpot?retryWrites=true&w=majority
PROGRAM_ID = E13jNxzoQbUuyaZ9rYJUdRAirYZKU75NJNRV9CHdDhHE
ls -la
cd jackpot/
ls -la
cd Jackpot_Game_b
cd Jackpot_Game_Backend/
ls -la
nano .env
pwd
nano /etc/systemd/system/api.slowrug.io.service
ls -la
yarn
ls -la
ls dist/
ls dist/src/
ls -la dist/src/
nano /etc/systemd/system/api.slowrug.io.service
pwd
nano /etc/systemd/system/api.slowrug.io.service
nano /etc/systemd/system/slowrug.io.service
cd ..
ls -la
cd jackpot/
ls -la
cd Jackpot_Game_Frontend/
ls -la
cd jackport-frontend/
ls -la
ls .env.example
cat .env.example
nano .env
cd ..
cd Jackpot_Game_Backend/
nano .env
nano /etc/systemd/system/api.slowrug.io.service
cd /etc/nginx/sites-available/
ls -la
nano api.slowrug.io
nano ~/gen_certs.sh
bash ~/gen_certs.sh
yum install -y certbot
bash ~/gen_certs.sh
ip a
nano ~/gen_certs.sh
bash ~/gen_certs.sh
nmap
sudo yum install nmap
nmap
npmac scan
nmap scan
nmap
nmap -v -A 104.247.79.55
bash ~/gen_certs.sh
firewall-cmd --list-ports
dig slowrug.io
sudo yum install -y dig
yum install bind-utils
dig slowrug.io
yum install bind-utils
dig slowrug.io
firewall-cmd --get-active-zones
[root@vps92465 sites-available]# firewall-cmd --get-active-zones
internal
sources: 216.54.31.80/29
firewall-cmd --zone=internal --list-ports
firewall-cmd --zone=internal --add-port=80/tcp --permanent
firewall-cmd --zone=internal --list-ports
firewall-cmd --zone=internal --add-port=80/tcp --permanent
firewall-cmd --zone=internal --list-ports
firewall-cmd --reload
bash ~/gen_certs.sh
nano ~/gen_certs.sh
dig slowrug.io
ip a
dig slowrug.io
ls -la
bash gen_certs.sh
nano /etc/nginx/sites-available/api.slowrug.io
cd jackpot/Jackpot_Game_Frontend/jackport-frontend/
nano .env
cd /etc/nginx/sites-available/
nano slowrug.io
systemctl start slowrug.io
systemctl status slowrug.io
journalctl -xefu slowrug.io
systemctl stop slowrug.io
cd /etc/nginx/sites-available/slowrug.io
nano /etc/nginx/sites-available/slowrug.io
systemctl start slowrug.io
journalctl -xefu slowrug.io
nano /etc/systemd/system/slowrug.io.service
systemctl stop slowrug.io
sysctl daemon-reload
systemctl daemon-reload
systemctl start slowrug.io
journalctl -xefu slowrug.io
nano /etc/systemd/system/api.slowrug.io.service
nano /etc/systemd/system/slowrug.io.service
cd ~
cd jackpot/Jackpot_Game_Frontend/jackport-frontend/
pwd
nano /etc/systemd/system/slowrug.io.service
systemctl stop slowrug.io
systemctl daemon-reload
systemctl start slowrug.io
journalctl -xefu slowrug.io
systemctl start api.slowrug.io
journalctl -xefu api.slowrug.io
cd /etc/nginx/sites-available/
pwd
ln -s /etc/nginx/sites-available/api.slowrug.io /etc/nginx/sites-enabled/api.slowrug.io
nginx -t
ln -s /etc/nginx/sites-available/slowrug.io /etc/nginx/sites-enabled/slowrug.io
nginx -t
systemctl restart nginx
ls -la
cp api.slowrug.io grave.api.slowrug.io
nano grave.api.slowrug.io
nano ~/gen_certs.sh
cd /etc/systemd/system/
cp api.slowrug.io.service grave.api.slowrug.io.service
nano grave.api.slowrug.io.service
cd ~
cd jackpot/Jackpot_Game_Backend/
cp .env grave.env
nano grave.env
ls -la
systemctl enable api.slowrug.io
systemctl enable slowrug.io
systemctl start grave.api.slowrug.io
journalctl -xefu grave.api.slowrug.io
cd /etc/nginx/sites-available/
pwd
ls -la
ln -s /etc/nginx/sites-available/grave.api.slowrug.io /etc/nginx/sites-enabled/grave.api.slowrug.io
nginx -t
bash ~/gen_certs.sh
ls -la
nginx -t
cd ..
nano nginx.conf
nginx -t
systemctl restart nginx
tail -n 20 /var/log/nginx/api.slowrug.io.error.log
tail -n 20 /var/log/nginx/slowrug.io.error.log
tail -n 20 /var/log/nginx/api.slowrug.io.error.log
journalctl -xefu api.slowrug.io
ls -la
cat nginx.conf
cat sites-available/api.slowrug.io
cd ~
ls -la
nano jackpot/Jackpot_Game_Backend/
cd jackpot/Jackpot_Game_Backend/
ls -la
nano src/index.ts
nano /etc/nginx/sites-available/api.slowrug.io
npm install -g wscat
cd ~
yarn install -g wscat
yarn global add wscat
wscat -c wss://ws.slowrug.io
wscat -c wss://ws.api.slowrug.io
wscat -c wss://api.slowrug.io
wscat -c wss://ws.slowrug.io
journalctl -xefu api.slowrug.io
systemctl restart nginx
nginx -t
wscat -c wss://ws.slowrug.io
wscat -c ws://ws.slowrug.io
wscat -c wss://ws.slowrug.io
nano jackpot/Jackpot_Game_Backend/src/index.ts
nano /etc/nginx/sites-available/api.slowrug.io
wscat -c ws://ws.slowrug.io/socket.io/
wscat -c wss://ws.slowrug.io/socket.io/
cd /etc/nginx/sitea-
cd /etc/nginx/sites-available/
ls -la
nano grave.api.slowrug.io
nginx -t
systemctl restart nginx
exit
ls
cd jackpot/
ls
ls -la
nano gen_certs.sh
bash gen_certs.sh
nginx -t
systemclt restart nginx
systemctl restart nginx
cd /etc/nginx/sites-available/
ls -la
nano grave.api.slowrug.io
nginx -t
systemctl restart nginx
ls -la
exit
ls -la
nano deploy_front.sh
cd jackpot/
ls -la
cd Jackpot_Game_Frontend/
ls -la
cd jackport-frontend/
git log
git remote -v
pwd
nano ~/deploy_front.sh
nano /etc/systemd/system/slowrug.io.service
nano /root/run_front.sh
nano ~/deploy_front.sh
bash ~/deploy_front.sh
cp ~/deploy_front.sh ~/deploy_back.sh
nano ~/deploy_back.sh
cd ..
cd Jackpot_Game_Backend/
ls -la
pwd
nano ~/deploy_back.sh
nano /etc/systemd/system/api.slowrug.io.service
bash ~/deploy_back.sh
git checkout
nano .env
git checkout .
bash ~/deploy_back.sh
ls -la
nano .env
bash ~/deploy_back.sh
bash ~/deploy_front.sh
bash ~/deploy_back.sh
cd /etc/nginx/
cd sites-available/
ls -la
nano api.slowrug.io
nano slowrug.io
nginx -t
systemctl restart nginx
ls -la
exit
ls -la
nano deploy_front.sh
nano /etc/nginx/sites-available/grave.api.slowrug.io
nano gen_certs.sh
nano /etc/nginx/sites-available/grave.api.slowrug.io
bash gen_certs.sh
ls -la
bash deploy_back.sh
ls -la
cd jackpot/
ls -la
cd Jackpot_Game_Backend/
ls -la
git log
git checkout .
git log
git pull origin main
git merge --abort
git pull origin main
git merge --abort
git pull origin main
cd ~
bash gen_certs.sh
nginx -t
systemctl start nginx
bash deploy_back.sh
exit