Linux-Server-Notes PMS
2017-09-11 09-09-33屏幕截图.png
/home/softwareluke/图片/2017-09-11 09-09-33屏幕截图.png
image.png image.png image.png image.png image.png image.png image.png
2 ifconfig
3 init 0
4 ip a
5 vim /etc/sysconfig/network-scripts/ifcfg-eno16780032
6 q!
7 service network restart
8 ip a
9 cd /etc/udev/rules.d/
10 ls
11 vim 70-persistent-ipoib.rules
12 reboot
13 ls
14 cd /etc/yum.repos.d/
15 ls
16 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
17 ls
18 vim redhat.repo
19 rm -rf redhat.repo
20 mv CentOS7-Base-163.repo redhat.repo
21 yum update
22 yum repolist all
23 vim redhat.repo
24 ls
25 vim redhat.repo
26 yum repolist all
27 vim redhat.repo
28 rpm -qa | grep yum
29 rpm -e yum-3.4.3-118.el7.noarch --nodeps
30 rpm -e yum-rhn-plugin-2.0.1-5.el7.noarch --nodeps
31 rpm -e yum-langpacks-0.4.2-3.el7.noarch --nodeps
32 rpm -e yum-3.4.3-125.el7.noarch --nodeps
33 rpm -e yum-utils-1.1.31-29.el7.noarch --nodeps
34 rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
35 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm
36 ls
37 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm
38 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
39 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-34.el7.noarch.rpm
40 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-34.el7.noarch.rpm
41 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
42 rpm -ivh yum-*
43 ls
44 vim redhat.repo
45 yum clean all
46 vim redhat.repo
47 ls
48 vim centos.repo
49 yum clean all
50 vim centos.repo
51 yum update
52 ls
53 rm -rf 8>rpm
54 rm -rf *.rpm
55 ls
56 rm -rf rpm
57 ls
58 mv centos.repo zh.repo
59 ls
60 yum list lftp
61 clear
62 ls
63 vim /etc/sysconfig/network
64 vim /etc/sysconfig/networks
65 cd /etc/sysconfig/
66 ls
67 vim selinux
68 vim /etc/hostname
69 vim /etc/resolv.conf
70 vim /etc/motd
71 exit
72 clear
73 reboot
74 ip a
75 service network restart
76 ip a
77 vim /etc/sysconfig/network-scripts/ifcfg-eno16780032
78 service network restart
79 ip a
80 ping qq.com
81 yum update
82 cd /etc/yum.repos.d/
83 ls
84 vim redhat.repo
85 ls
86 reboot
87 cat /etc/redhat-release
88 pqs
89 pwd
90 cd /
91 ls
92 mkdir -p /softwares
93 ls
94 java
95 mkdir -p /usr/local/java
96 cd /usr/local/java
97 tar zxvf jdk-7u79-linux-x64.tar.gz
98 cd /etc
99 vi profile
100 reboot
101 java -version
102 cd /softwares/
103 ls
104 rm -rf Percona-XtraBackup-2.4.4-rdf58cf2-el7-x86_64-bundle/
105 rm -rf Percona-XtraDB-Cluster-5.6.30-25.16-r64742ac-el7-x86_64-bundle/
106 ls
107 yum install percona-release-0.1-4.noarch.rpm
108 yum list | grep percona
109 yum list|grep percona
110 yum install Percona-Server-client-56-5.6.32-rel78.1.el7.x86_64 Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64 Percona-Server-shared-56-5.6.32-rel78.1.el7.x86_64 Percona-Server-devel-56-5.6.32-rel78.1.el7.x86_64 Percona-Server-tokudb-56-5.6.32-rel78.1.el7.x86_64 Percona-Server-56-debuginfo-5.6.32-rel78.1.el7.x86_64
111 yum install gcc-c++ make cmake bison bison-devel ncurses-devel libaio-devel perl
112 ls
113 cd Percona-Server-5.6.32-78.1-r4c779b7-el7-x86_64-bundle/
114 ls
115 pwd
116 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm Percona-Server-client-56-5.6.32-rel78.1.el7.x86_64.rpm Percona-Server-shared-56-5.6.32-rel78.1.el7.x86_64.rpm Percona-Server-devel-56-5.6.32-rel78.1.el7.x86_64.rpm
117 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
118 rpm -ivh Percona-Server-client-56-5.6.32-rel78.1.el7.x86_64.rpm
119 rpm -ivh Percona-Server-shared-56-5.6.32-rel78.1.el7.x86_64.rpm
120 ps -ef mysql
121 ps -ef|grep mysql
122 rpm -qa | grep mariadb
123 rpm -e mariadb-libs-5.5.41-2.el7_0.x86_64
124 mysql
125 rpm -e --nodeps mariadb-libs-5.5.41-2.el7_0.x86_64
126 rpm -ivh Percona-Server-shared-56-5.6.32-rel78.1.el7.x86_64.rpm
127 rpm -ivh Percona-Server-client-56-5.6.32-rel78.1.el7.x86_64.rpm
128 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
129 yum install perl
130 yum clean all
131 yum install perl
132 ll /etc/yum.repos.d
133 vim /etc/yum.repos.d
134 vi /etc/yum.repos.d
135 yum list
136 cd /etc/yum.repos.d
137 ls
138 yum install gcc-c++ make cmake bison bison-devel ncurses-devel libaio-devel perl
139 cd /softwares/Percona-Server-5.6.32-78.1-r4c779b7-el7-x86_64-bundle
140 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
141 rpm -ivh Percona-Server-devel-56-5.6.32-rel78.1.el7.x86_64.rpm
142 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
143 yum install perl
144 reboot
145 cd /softwares/Percona-Server-5.6.32-78.1-r4c779b7-el7-x86_64-bundle
146 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
147 perl -e 'use Data::Dumper'
148 perl -MCPAN -e shell
149 cd /usr/local/src
150 cd /softwares
151 tar zxvf Data-Dumper-2.161.tar.gz
152 ls
153 cd Data-Dumper-2.161/
154 pwd
155 perl Makefile.PL
156 make
157 yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
158 perl Makefile.PL
159 make
160 make test
161 cd /softwares/Percona-Server-5.6.32-78.1-r4c779b7-el7-x86_64-bundle
162 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
163 mysql
164 ps -ef|grep mysql
165 cd /etc
166 ls
167 cat my.cnf
168 cat /etc/init.d/mysql
169 cd /etc/init.d/mysql
170 natstat -nat
171 natstat -nat 3306
172 netstat -nat
173 netstat -nat 3306
174 mysqladmin -u root password "123456"
175 vim my.cnf
176 mysqladmin -u root password "123456"
177 vim my.cnf
178 su - mysql
179 /etc/init.d/mysql start
180 cd /etc/init.d/
181 ls
182 whereis mysql
183 which mysql
184 cd /bin
185 mysql start
186 /etc/init.d/mysql start
187 /bin/mysql start
188 find / -name mysql.sock
189 cp /usr/share/percona-server/my-default.cnf /etc/my.cnf
190 cat /etc/my.cnf
191 /bin/mysql start
192 find / -name mysql.sock
193 mysql
194 mysqladmin -u root password "123456"
195 cd /softwares/Percona-Server-5.6.32-78.1-r4c779b7-el7-x86_64-bundle
196 rpm -ivh Percona-Server-server-56-5.6.32-rel78.1.el7.x86_64.rpm
197 reboot
198 mysql
199 ps -ef|grep mysql
200 /bin/mysql start
201 mysqladmin -u root password "123456"
202 mysql
203 mysql@localhost
204 mysql
205 /usr/bin/mysqladmin -u root password 'new-password'
206 /etc/init.d/mysql stop
207 mysql
208 reboot
209 mysql
210 mysql -p
211 vim /etc/my.cnf
212 reboot
213 mysql -p
214 ps -ef|grep mysql
215 mysql -p
216 reboot
217 mysql -p
218 /etc/init.d/mysql stop
219 cat /etc/mysql/debian.cnf
220 mysql -p
221 mysql
222 mysql -u root password '123456'
223 ps -ef|grep mysql
224 mysql
225 mysql -p
226 vim /etc/my.cnf
227 mysql
228 mysql -p
229 vim /etc/my.cnf
230 mysql -p
231 reboot
232 mysql -p
233 vim /etc/my.cnf
234 reboot
235 mysql
236 mysql -p
237 vim /etc/my.cnf
238 mysql -p
239 vim /etc/my.cnf
240 systemctl status mysql.services
241 systemctl status mysql.service
242 mysql
243 mysql -uroot -p123456
244 vim /etc/my.cnf
245 mysql -uroot -p123456
246 systemctl status mysql.service
247 systemctl restart mysql.service
248 systemctl status mysql.service
249 mysql
250 mysql -uroot -p123456
251 mysql -p
252 vim /etc/my.cnf
253 mysql -uroot -p123456
254 mysql -p
255 mysql -V
256 mysql -uroot -p123456
257 mysql -utest -p123456
258 mysql -utest -p
259 mysql -uroot -p123456
260 mysql -utest -p123456
261 systemctl status mysql.service
262 systemctl restart mysql.service
263 systemctl status mysql.service
264 mysql -uroot -p 123456
265 mysql -uroot -p123456
266 mysql -uroot -p 123456
267 mysql -uroot -p123456
268 free -m
269 cat /proc/cpuinfo
270 mysql -p
271 ls
272 wget https://www.postgresql.org/files/documentation/pdf/9.6/postgresql-9.6-A4.pdf
273 rm postgresql-9.6-A4.pdf
274 lsb_release -a
275 lsb_release -a
276 cat /etc/redhat-release
277 mysql -uroot -p123456 -h192.168.18.215 -P8066 -DTESTDB
278 mysql -uroot -p123456
279 mysql -uroot -p123456 -h192.168.18.215 -P8066 -DTESTDB
280 java -version
281 cd /usr/local/java
282 tar zxvf jdk-8u112-linux-x64.tar.gz
283 cd /etc
284 vim profile
285 source /etc/profile
286 java -version
287 vim profile
288 reboot
289 java -version
290 mysql -p
291 java -version
292 exit
293 history
294 clear
295 history
296 cd /softwares
297 tar zxvf elasticsearch-5.2.1.tar.gz
298 cd /softwares/elasticsearch-5.2.1/config
299 vim elasticsearch.yml
300 cd ..
301 cd bin
302 pwd
303 ls
304 ./elasticsearch -d -Xms512m -Xmx512m
305 cd /softwares/elasticsearch-5.2.1/config
306 ls
307 vim elasticsearch.yml
308 vim jvm.options
309 cd /softwares/elasticsearch-5.2.1/bin
310 ./elasticsearch -d -Xms512m -Xmx512m
311 ./elasticsearch -d
312 jps
313 ./elasticsearch
314 pwd
315 vim elasticsearch
316 cd /softwares/elasticsearch-5.2.1/config
317 vim elasticsearch.yml
318 cd /softwares/elasticsearch-5.2.1/bin
319 ./elasticsearch -d
320 jps
321 ./elasticsearch
322 vim elasticsearch
323 useradd elk
324 passwd elk
325 chown -R elk:elk /softwares/elasticsearch-5.2.1
326 cd /softwares/elasticsearch-5.2.1/bin
327 ./elasticsearch
328 su - elk
329 jps
330 cd /softwares/elasticsearch-5.2.1/config
331 vim elasticsearch.yml
332 scp -r /softwares/elasticsearch-5.2.1 192.168.18.201:/softwares/
333 jps
334 ps -ef|grep Elasticsearch
335 kill -9 30477
336 su - elk
337 cd /softwares
338 xz -d node-v6.10.0-linux-x64.tar.xz
339 tar xvf node-v6.10.0-linux-x64.tar
340 cd /etc
341 vi profile
342 source /etc/profile
343 node -V
344 node -v
345 npm -v
346 Python -V
347 python -V
348 node -v
349 npm -v
350 git -v
351 yum install git
352 git -version
353 git --version
354 cd /softwares
355 clone git://github.com/mobz/elasticsearch-head.git
356 git clone git://github.com/mobz/elasticsearch-head.git
357 cd elasticsearch-head
358 npm install
359 cd /softwares/elasticsearch-head
360 npm install grunt --save
361 vim Gruntfile.js
362 cd /softwares/elasticsearch-head/node_modules/grunt/bin
363 ./grunt server
364 ./grunt server &
365 jps
366 cp /etc/security/limits.conf /etc/security/limits.conf.bak
367 cat /etc/security/limits.conf | grep -v "elk" > /tmp/system_limits.conf
368 echo "elk hard nofile 65536" >> /tmp/system_limits.conf
369 echo "elk soft nofile 65536" >> /tmp/system_limits.conf
370 mv /tmp/system_limits.conf /etc/security/limits.conf
371 su - elk
372 vim /etc/security/limits.conf
373 cat /etc/pam.d/login
374 ulimit -a
375 vim /etc/security/limits.conf
376 ulimit -a
377 su - elk
378 cat /etc/sysctl.conf | grep -v "vm.max_map_count" > /tmp/system_sysctl.conf
379 echo "vm.max_map_count=262144" >> /tmp/system_sysctl.conf
380 cat /tmp/system_sysctl.conf
381 mv /tmp/system_sysctl.conf /etc/sysctl.conf
382 cat /etc/sysctl.conf
383 sysctl -p
384 cd /softwares/elasticsearch-5.2.1/bin
385 ./elasticsearch
386 su - elk
387 vim /etc/sysctl.conf
388 cat /etc/sysctl.conf
389 sysctl -p
390 su - elk
391 jps
392 cd /softwares/elasticsearch-head/node_modules/grunt/bin
393 ./grunt server &
394 curl
395 curl --help
396 curl -XPUT '192.168.18.200:9200/customer?pretty'
397 curl '192.168.18.200:9200/_cat/indices?v'
398 curl -XPUT '192.168.18.200:9200/customer/external/1?pretty' -d '
399 {
400 "name": "John Doe"
401 }'
402 curl -XPUT '192.168.18.200:9200/customer/external/1?pretty' -d '{"name": "John Doe"}'
403 curl -XGET '192.168.18.200:9200/customer/external/1?pretty'
404 curl '192.168.18.200:9200/_cat/indices?v'
405 curl 127.0.0.1:9200
406 curl 192.168.18.200:9200
407 ping 192.168.18.35
408 cd /softwares
409 tar zxvf logstash-5.2.1.tar.gz
410 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
411 cd /softwares/logstash-5.2.1/bin
412 ./logstash -f config/first-pipeline.conf &
413 cd ..
414 ls
415 cd data
416 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
417 cd ..
418 cd bin
419 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
420 cd ..
421 ls
422 cd logs
423 ls
424 jps
425 tail -f logstash-plain.log
426 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
427 cd /softwares/logstash-5.2.1/bin
428 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
429 cd /softwares/logstash-5.2.1/logs
430 tail -f logstash-plain.log
431 ls
432 tail -f logstash-slowlog-plain.log
433 cd ..
434 ls
435 cd /softwares/logstash-5.2.1/logs
436 tail -f logstash-plain.log
437 jps
438 kill -9 6117
439 jps
440 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
441 cd /softwares/logstash-5.2.1/bin
442 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
443 jps
444 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
445 cd /softwares/logstash-5.2.1/bin
446 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
447 jps
448 kill -9 6298
449 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
450 cd /softwares/logstash-5.2.1/bin
451 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf
452 jps
453 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
454 cd /softwares/logstash-5.2.1/bin
455 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
456 jps
457 kill -9 6457
458 vim /softwares/logstash-5.2.1/config/first-pipeline.conf
459 cd /softwares/logstash-5.2.1/bin
460 ./logstash -f /softwares/logstash-5.2.1/config/first-pipeline.conf &
461 jps
462 cd /softwares
463 tar zxvf kibana-5.2.1-linux-x86_64.tar.gz
464 vim /softwares/kibana-5.2.1-linux-x86_64/config/kibana.yml
465 cd /softwares/kibana-5.2.1-linux-x86_64/bin
466 ls
467 ./kibana &
468 cd ..
469 ls
470 cd /softwares/logstash-5.2.1/logs
471 tail -f logstash-plain.log
472 jps
473 kill -9 10083
474 kill -9 9934
475 jps
476 kill -9 10359
477 kill -9 10312
478 jps
479 kill -9 10567
480 kill -9 10576
481 kill -9 10612
482 jps
483 kill -9 10789
484 kill -9 10843
485 jps
486 mkdir -p /softwares/data/logs
487 mkdir -p /softwares/data/logs/channels/a1/checkpoint
488 mkdir -p /softwares/data/logs/channels/a1/data
489 mkdir -p /softwares/data/local/collector
490 mkdir -p /softwares/data/logs/channels/a2/checkpoint
491 mkdir -p /softwares/data/logs/channels/a2/data
492 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
493 cd /softwares/apache-flume-1.7.0-bin/bin
494 ./flume-ng agent --conf conf --conf-file ./conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
495 jps
496 ./flume-ng agent --conf conf --conf-file ./conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
497 jps
498 python -V
499 python
500 pwd
501 vim runTestLog.py
502 python runTestLog.py
503 vim runTestLog.py
504 python runTestLog.py
505 vim runTestLog.py
506 python runTestLog.py
507 cd /softwares/apache-flume-1.7.0-bin/bin
508 ./flume-ng agent --conf conf --conf-file ./conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
509 jps
510 ./flume-ng agent --conf conf --conf-file ./conf/flume.conf --name a2 -Dflume.root.logger=INFO,console
511 ./flume-ng agent --conf conf --conf-file ./conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
512 jps
513 ./flume-ng agent --conf conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
514 ./flume-ng agent --conf conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=DEBUG,console
515 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
516 jps
517 netstat -aon|findstr "4545"
518 netstat -aon
519 netstat -aon | grep 4545
520 jps
521 netstat -aon | grep 902
522 netstat -aon | grep 9200
523 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
524 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
525 jps
526 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
527 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf -Dflume.root.logger=INFO,console &
528 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
529 netstat -aon | grep 4545
530 netstat -aon | grep 14545
531 jps
532 kill -9 10488
533 jps
534 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
535 cp /softwares/apache-flume-1.7.0-bin/conf/flume-conf.properties.template /softwares/apache-flume-1.7.0-bin/conf/flume2.conf
536 mkdir -p /softwares/data/logs
537 mkdir -p /softwares/data/logs/channels/a1/checkpoint
538 mkdir -p /softwares/data/logs/channels/a1/data
539 mkdir -p /softwares/data/local/collector
540 mkdir -p /softwares/data/logs/channels/a2/checkpoint
541 mkdir -p /softwares/data/logs/channels/a2/data
542 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
543 vim /softwares/apache-flume-1.7.0-bin/conf/flume2.conf
544 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume2.conf --name a2 -Dflume.root.logger=INFO,console &
545 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
546 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume2.conf --name a2 -Dflume.root.logger=INFO,console &
547 netstat -aon | grep "4545"
548 netstat -aon | grep "14545"
549 vim /softwares/apache-flume-1.7.0-bin/conf/flume2.conf
550 jps
551 kill -9 10737
552 ./flume-ng agent --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume2.conf --name a2 -Dflume.root.logger=INFO,console &
553 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --name a2 -Dflume.root.logger=INFO,console &
554 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume2.conf --name a2 --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
555 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume2.conf --name a2 -Dflume.root.logger=INFO,console &
556 jps
557 mkdir -p /softwares/data/logs
558 mkdir -p /softwares/data/logs/channels/a1/checkpoint
559 mkdir -p /softwares/data/logs/channels/a1/data
560 mkdir -p /softwares/data/local/collector
561 mkdir -p /softwares/data/logs/channels/a2/checkpoint
562 mkdir -p /softwares/data/logs/channels/a2/data
563 cp /softwares/apache-flume-1.7.0-bin/conf/flume-conf.properties.template /softwares/apache-flume-1.7.0-bin/conf/flume.conf
564 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
565 jps
566 kill -9 10955
567 mkdir -p /softwares/data/logs
568 mkdir -p /softwares/data/logs/channels/a1/checkpoint
569 mkdir -p /softwares/data/logs/channels/a1/data
570 mkdir -p /softwares/data/local/collector
571 mkdir -p /softwares/data/logs/channels/a2/checkpoint
572 mkdir -p /softwares/data/logs/channels/a2/data
573 cp /softwares/apache-flume-1.7.0-bin/conf/flume-conf.properties.template /softwares/apache-flume-1.7.0-bin/conf/flume.conf
574 jps
575 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
576 jps
577 mkdir -p /softwares/data/logs
578 mkdir -p /softwares/data/logs/channels/a1/checkpoint
579 mkdir -p /softwares/data/logs/channels/a1/data
580 mkdir -p /softwares/data/local/collector
581 mkdir -p /softwares/data/logs/channels/a2/checkpoint
582 mkdir -p /softwares/data/logs/channels/a2/data
583 cd /softwares/apache-flume-1.7.0-bin/bin
584 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
585 netstat -aon | grep "4545"
586 netstat -aon | grep "14545"
587 jps
588 kill -9 11144
589 vim /softwares/apache-flume-1.7.0-bin/conf/flume.conf
590 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
591 netstat -aon | grep "4545"
592 netstat -aon | grep "14545"
593 jps
594 python runTestLog.py
595 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
596 python runTestLog.py
597 cd /softwares/elasticsearch-head/node_modules/grunt/bin
598 ./grunt server &
599 cd /softwares/elasticsearch-5.2.1/config
600 vim elasticsearch.yml
601 su - elk
602 ps -ef|grep ki
603 ps -ef|grep 5601
604 fuser -n tcp 5601
605 ps -ef | grep kibana
606 cd /softwares/kibana-4.6.0-linux-x86_64/bin
607 ./kibana &
608 ps -ef | grep kib
609 vim /softwares/kibana-4.6.0-linux-x86_64/config/kibana.yml
610 pwd
611 ./kibana &
612 jps
613 cd /softwares/apache-flume-1.7.0-bin/bin
614 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a2 -Dflume.root.logger=INFO,console &
615 ./flume-ng agent --conf /softwares/apache-flume-1.7.0-bin/conf --conf-file /softwares/apache-flume-1.7.0-bin/conf/flume.conf --name a1 -Dflume.root.logger=INFO,console &
616 cd /softwares/elasticsearch-5.2.1/config
617 vim elasticsearch.yml
618 jps
619 kill -9 15057
620 su - elk
621 cd /softwares
622 tar zxvf elasticsearch-2.4.4.tar.gz
623 cd /softwares/elasticsearch-5.2.1/config
624 vim elasticsearch.yml
625 cd /softwares/elasticsearch-2.4.4/config
626 vim elasticsearch.yml
627 vim jvm.options
628 ls
629 chown -R elk:elk /softwares/elasticsearch-2.4.4
630 scp -r /softwares/elasticsearch-2.4.4 192.168.18.201:/softwares/
631 su - elk
632 ps -ef |grep mysql
633 jps
634 cp /usr/share/percona-server/my-default.cnf /etc/my.cnf
635 vim /etc/my.cnf
636 mysql -p
637 reboot
638 mysql -p
639 cd /softwares
640 wget https://raw.github.com/alibaba/otter/master/manager/deployer/src/main/resources/sql/otter-manager-schema.sql
641 source otter-manager-schema.sql
642 mysql -p
643 ll /mnt/
644 exit
645 jps
646 su - elk
647 reboot
648 cd /softwares/kibana-4.6.0-linux-x86_64/bin
649 ./kibana &
650 cd /softwares
651 cd /softwares/elasticsearch-2.4.4/bin
652 plugin install license
653 ls
654 ./plugin install license
655 ./plugin install marvel-agent
656 cd /softwares/kibana-4.6.0-linux-x86_64/bin
657 ls
658 ./kibana plugin --install elasticsearch/marvel/latest
659 jps
660 kill -9 32060
661 jps
662 su - elk
663 jps
664 reboot
665 jps
666 su - elk
667 curl -XPUT 192.168.18.200:9200/es_test
668 mkdir /softwares/elasticsearch-2.4.4/plugins/pinyin
669 cd /softwares/elasticsearch-2.4.4/plugins/pinyin
670 unzip elasticsearch-analysis-pinyin-1.8.4.zip
671 ls
672 vim plugin-descriptor.properties
673 reboot
674 su - elk
675 ps -ef | gerp mysql
676 ps -ef | grep mysql
677 su - elk
678 scp -r /home/wisdom_pms/war 10.0.5.62:/mnt/web
679 vim /etc/my.cnf
680 systemctl restart mysql.service
681 ps -ef|grep mysql
682 cd /usr/
683 cd local/
684 ls
685 cd bin
686 ls
687 cd ..
688 cd sbin
689 ls
690 cd ..
691 ls
692 cd sbin/
693 ls
694 cd..
695 cd ..
696 ls
697 cd bin
698 ls
699 pwd
700 cd ..
701 ls
702 ./usr/bin/mysqldump --skip-opt --compatible=postgresql --compact --no-data --default-character-set=utf8 --skip-dump-date -u root -p 123456 -h 192.168.18.200 cfg > /softwares/schm.sql
703 cd bin
704 mysqldump --skip-opt --compatible=postgresql --compact --no-data --default-character-set=utf8 --skip-dump-date -u root -p 123456 -h 192.168.18.200 cfg > /softwares/schm.sql
705 mysqldump --skip-opt --compatible=postgresql --compact --no-data --default-character-set=utf8 --skip-dump-date -u root -p --databases cfg -h 192.168.18.200 cfg > /softwares/schm.sql
706 mysqldump --skip-opt --compatible=postgresql --compact --no-create-info --default-character-set=utf8 --skip-comments --skip-dump-date -u root -p --databases cfg -h 192.168.18.200 cfg > /softwares/data.sql
707 ls
708 mysqldump -uroot -p123456 --databases awesome >user.sql
709 ls
710 vim user.sql
711 mysqldump -uroot -p123456 --databases awesome -F >userBinglog.sql
712 ls
713 mysqldump -uroot -p123456 --databases jw_platform >jw_platform.sql
714 ls
715 vim jw_platform.sql
716 clear
717 sz jw_platform.sql
718 mysql -uroot -p123456
719 ps -ef |grep mysql
720 vim /etc/my.cnf
721 mysql -p
722 vim /etc/my.cnf
723 mysql -p
724 git
725 cd /softwares
726 git clone https://github.com/dangdangdotcom/elastic-job.git
727 chown -R elk:elk /softwares/elasticsearch-2.4.4
728 cd /softwares/elasticsearch-2.4.4/bin
729 ./elasticsearch -d &
730 su - elk
731 cd /softwares/elasticsearch-head/node_modules/grunt/bin
732 ls
733 ll
734 vim grunt
735 nohup ./grunt server &
736 tail -f nohup.out
737 cd /softwares/elasticsearch-head/node_modules/grunt/bin
738 ls
739 cd ..
740 ls
741 vim package.json
742 cd bin
743 ls
744 vim grunt
745 cd ..
746 yum pm2
747 npm -v
748 npm install -g pm2
749 ls
750 cd bin
751 pm2 start grunt
752 pm2 delete grunt
753 vim grunt
754 pwd
755 ls
756 grunt server
757 bash grunt server
758 grunt server
759 ./grunt server
760 cd /softwares/elasticsearch-2.4.4/bin
761 ls
762 ./plugin install mobz/elasticsearch-head
763 ./elasticsearch -d
764 cd ..
765 ls
766 ps -ef|grep elas
767 kill -9 26217
768 cd /softwares/elasticsearch-2.4.4/bin
769 ./elasticsearch -d -p 7568
770 cd /softwares/elasticsearch-2.4.4/logs
771 tail -f my-elk-2.4.4.log
772 su - elk
773 ps -ef|grep elas
774 cd /softwares/elasticsearch-2.4.4/bin
775 ./elasticsearch -d
776 ls
777 cd ..
778 ls
779 cd plugins/
780 ls
781 cd head/
782 ls
783 vim package.json
784 vim plugin-descriptor.properties
785 vim grunt_fileSets.js
786 history
apt-get的卸载相关的命令有remove/purge/autoremove/clean/autoclean等。具体来说:
apt-get purge / apt-get –purge remove
删除已安装包(不保留配置文件)。
如软件包a,依赖软件包b,则执行该命令会删除a,而且不保留配置文件
apt-get autoremove
删除为了满足依赖而安装的,但现在不再需要的软件包(包括已安装包),保留配置文件。
apt-get remove
删除已安装的软件包(保留配置文件),不会删除依赖软件包,且保留配置文件。
apt-get autoclean
APT的底层包是dpkg, 而dpkg 安装Package时, 会将 *.deb 放在 /var/cache/apt/archives/中,apt-get autoclean 只会删除 /var/cache/apt/archives/ 已经过期的deb。
apt-get clean
使用 apt-get clean 会将 /var/cache/apt/archives/ 的 所有 deb 删掉,可以理解为 rm /var/cache/apt/archives/*.deb。
那么如何彻底卸载软件呢?
具体来说可以运行如下命令:
删除软件及其配置文件
apt-get --purge remove <package>
删除没用的依赖包
apt-get autoremove <package>
此时dpkg的列表中有“rc”状态的软件包,可以执行如下命令做最后清理:
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
############################################################################
select chain_uid from grp_cmm_unit group by chain_uid having count(*) >2;
select rate_id from grp_rsv_rate group by rate_id having count() >2;
select package_id from grp_rsv_package group by package_id having count() >2;
select * from grp_hk_base_roomtype;
select * from grp_hk_base_roomtype_ml;
select * from grp_hk_unit_roomtype;
select * from grp_hk_unit_roomtype_ml;
select package_id,day1,day2,day3,day4,day5,day6,day7 from grp_rsv_package_price where package_id in(
select package_id from grp_rsv_package_price group by package_id having count(1)>1) ;
select season_cd,day1,day2,day3,day4,day5,day6,day7 from grp_rsv_package_price where season_cd in(
select season_cd from grp_rsv_package_price group by season_cd having count(1)>1) ;
select package_id,start_dt,end_dt,day1,day2,day3 from grp_rsv_package_price t where t.package_id in
(select package_id,season_cd from grp_rsv_package_price group by package_id,season_cd having count(package_id) > 1) and season_cd having count(season_cd) > 1);
select package_id,day1,day2,day3 from grp_rsv_package_price t where t.package_id in
(select package_id from grp_rsv_package_price group by package_id having count(package_id) > 1);
select * from hpt_log_nightaudit where unit_uid='1bd2b793-9a8d-498b-b678-b721d67e20d6'
select count(package_id) from grp_rsv_package_price
select * from grp_rsv_package_group;
select * from grp_rsv_package_group_detail;
select * from hpt_hk_room;
select * from hpt_hk_room_combo;
select * from hpt_hk_room_feature;
select * from hpt_log_nightaudit where unit_uid='1bd2b793-9a8d-498b-b678-b721d67e20d6'
select tablename from pg_tables where schemaname='grp_dev';
select pg_database.datname, pg_database_size(pg_database.datname) AS size from pg_database;
select * from pg_database;
select count() from pg_database;
select count() from pg_tables where schemaname='grp_dev';
select count() from pg_tables where schemaname='pms_dev';
select count() from pg_tables where schemaname='pcm_dev';
select count() from pg_tables where schemaname='log_dev';
select count() from pg_tables where schemaname='stat_dev';
select count() from pg_tables where schemaname='cms_dev';
select count() from pg_tables where schemaname='grp_dev';
select count() from pg_tables where schemaname='grp_dev';
select count() from pg_tables where schemaname='grp_dev';
select log_cd,func_cd,log_dhms from log_operate_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd') ORDER BY created_date DESC;
select log_cd,func_cd,log_dhms,infurl from log_pdt_data_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd') ORDER BY created_date DESC;
select count(created_date),created_date from log_operate_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd') ORDER BY created_date DESC;
select count(created_date),created_date from log_pdt_data_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd') ORDER BY created_date DESC;
操作日志记录测试SQL
#########################################################
use log_dev;
select log_cd,func_cd,log_dhms from log_operate_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd')
and log_cd <> '日志类型' order BY created_date DESC;
select log_cd,func_cd,log_dhms,infurl,infnm from log_pdt_data_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd')
and log_cd <> '日志类型' ORDER BY created_date DESC;
#########################################################
Oracle 查询库中所有表名、字段名、字段名说明,查询表的数据条数、表名、中文表名、
查询所有表名:select t.table_name from user_tables t;查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定表的所有字段名和字段说明:select t.column_name, t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询所有表的表名和表说明:select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name;查询模糊表名的表名和表说明:select t.table_name from user_tables t where t.table_name like 'BIZ_DICT%';select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name where t.table_name like 'BIZ_DICT%';
--查询表的数据条数、表名、中文表名select a.num_rows, a.TABLE_NAME, b.COMMENTSfrom user_tables a, user_tab_comments bWHERE a.TABLE_NAME = b.TABLE_NAMEorder by TABLE_NAME;
网友评论