[root@pc ~] ps -ef | grep redis
[root@pc ~] ll /etc/redis
[root@pc ~] ll/etc/redis.conf
[root@pc ~] service stop redis
[root@pc ~] ps -ef | grep redis
[root@pc ~] ps -ef|grep 12319
[root@pc ~]# cd /usr/local/
[root@pc local]# ll
[root@pc local]# ll /opt/
[root@pc local]# ll /opt/wdlt/
[root@pc local]# cd /opt/
[root@pc opt]# ll
[root@pc opt]# cd redis-3.2.8/src/
[root@pc src]# ll
[root@pc src]# cd ../
[root@pc redis-3.2.8]# ll
[root@pc redis-3.2.8]# locate redis.conf
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@pc redis-3.2.8]# service redis start
Redirecting to /bin/systemctl start redis.service
[root@pc redis-3.2.8]# ps -ef|grep redis
[root@pc redis-3.2.8]# setenforce 0
[root@pc redis-3.2.8]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
[root@pc redis-3.2.8]# service firewall stop
Redirecting to /bin/systemctl stop firewall.service
Failed to stop firewall.service: Unit firewall.service not loaded.
[root@pc redis-3.2.8]# service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service
[root@pc redis-3.2.8]# telnet 192.168.1.200 6379
-bash: telnet: command not found
[root@pc redis-3.2.8]# yum install telnet
[root@pc redis-3.2.8]# telnet 192.168.1.200 6379
[root@pc redis-3.2.8]# netstat -ant
[root@pc redis-3.2.8]# telnet 192.168.1.200 6379
Trying 192.168.1.200...
telnet: connect to address 192.168.1.200: Connection refused
[root@pc redis-3.2.8]# telnet 127.0.0.1 6379
Trying 127.0.0.1...
Connected to 127.0.0.1.
[root@pc redis-3.2.8]# vim /opt/redis-3.2.8/redis.conf
[root@pc redis-3.2.8]# vim /etc/redis.conf
[root@pc redis-3.2.8]# service redis stop
Redirecting to /bin/systemctl stop redis.service
[root@pc redis-3.2.8]# service redis start
Redirecting to /bin/systemctl start redis.service
[root@pc redis-3.2.8]# telnet 192.168.1.200 6379
Trying 192.168.1.200...
Connected to 192.168.1.200.
Escape character is '^]'.
quit
+OK
[root@pc redis-3.2.8]# vim /etc/redis.conf
#bind 127.0.0.1
bind 192.168.1.200
Redis在docker容器中,非docker容易,直接执行第二句
docker exec -it redis-sn /bin/bash
进docker 后 redis-cli
keys * 查询redis中所有key
Redis若干命令
增删改查:
keys *
取出当前匹配的所有key
> exists larry
(integer) 0
当前的key是否存在
del lv
删除当前key
expire
设置过期时间
> expire larry 10
(integer) 1
> move larry ad4
(integer) 1
移动larry键值对到ad4数据库
> persist lv
(integer) 1
移除当前key的过期时间
randomkey
随机返回一个key
rename
重命名key
type
返回值的数据类型
type testlist
list
> ping
PONG
测试连接是否还在
>echo name
"larry"
打印
> select ad4databank
OK
数据库切换
> quit
退出连接
> dbsize
(integer) 12
当前数据库中key的数量
> info
服务器基本信息
monitor
实时转储收到的请求
config get
获取服务器的参数配置
flushdb
清空当前数据库
flushall
清除所有数据库
Redis服务开启
#加上`&`号使redis以后台程序方式运行
./redis-server &
[root@BLESSED-TEC-T redis-3.2.8]# redis-server ./redis.conf
[root@BLESSED-TEC-T redis-3.2.8]# redis-cli
127.0.0.1:6379> keys *
Linux命令,文件重命名,删除文件,解压文件
mv website website.bak
rm -f website
mv website201706221559.zip.bak website201706221559.zip
unzip website201706221559.zip
1.df -h
linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况。可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息。
2.ps -ef | grep java
ps -ef查看所有进程 grep筛选出信息 pid为进程id
3.jmap -heap [pid]
查看堆栈信息
top 查看进程
free -m free是显示的当前内存的使用 -m用m字节显示
pm2 nodeJS命令
pm2 start server.js --name oms
pm2 list
pm2 stop index
pm2 delete index
pm2 start appname
ngrok代理开启命令
cd /opt/ngrok
./ngrok -config ngrok.cfg start http
ngrok后台运行:
nohup /opt/ngrok/ngrok -config /opt/ngrok/ngrok.cfg start http &
或
setsid /opt/ngrok/ngrok -config /opt/ngrok/ngrok.cfg start http
查看ngrok进程
ps -ef | grep ngrok
杀掉进程
kill -9 sid
基于wsimport生成代码的客户端
wsimport是jdk自带的命令,可以根据wsdl文档生成客户端中间代码,基于生成的代码编写客户端,可以省很多麻烦。参考链接:https://www.cnblogs.com/ywjy/p/5196064.html
wsimport -keep -p com.wdletu.ticket.client -d H:\\ http://ws.51book.com:8000/ltips/services/getAvailableFlightWithPriceAndCommisionService1.0?wsdl
以下内容为转载部分, 文章链接: http://blog.csdn.net/u012881904/article/details/64440842
学会查看wsdl文档
wsdl:operation:相当于一个方法的名称
- 1
- 2
- 3
- 4
- 5
wsdl:input message 相当于一个输入的参数
wsdl:output message 相当于一个返回值
wsdl:part 输入参数有几个部分,每个部分相当于一个类或者是一个基本的类型
- 1
- 2
- 3
s:element 代表表一个参数
s:complexType 是一个复杂的类型,相当于类
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
定义时否对消息加密