常用命令集合

ps -aux | grep redis
查看服务端口,后可直接接端口号
删除所有没有tracked过的文件
git clean -d -fx
redis-cli -h 127.0.0.1 -p 6379 -a "mypass"
cli连接
redis-cli -h HOST -p 6379 --scan --pattern "site_point*" | xargs -L 2000 redis-cli -h HOST -p 6379 del
命令行批量删除带有前坠的key
redis-cli --raw keys "phone_detail*" | xargs redis-cli del
项目目录输入,系统会自动保存最近输入成功的密码
git config --global credential.helper store
更改session存储路径
session.save_path = "/www/php_session"
git checkout . #本地所有修改的。没有的提交的,都返回到原来的状态
忽略版本匹配
composer install --ignore-platform-reqs
禁止 包含qq.com的域名访问
iptables -I OUTPUT -p tcp -m string --string "bt.cn" --algo bm -j DROP
iptables -I OUTPUT -p udp -m string --string "bt.cn" --algo kmp -j DROP
这里是引用
iptables如果无法直接保存,需要安装iptables-services:
yum install iptables-services
设置开机启动
systemctl enable iptables 
常用命令
 
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
保存
service iptables save
firewalld防火墙
启动服务:
systemctl start firewalld
这里不用担心启用了防火墙以后无法通过ssh远程,22端口默认加入了允许规则

停止服务:
systemctl stop firewalld
重启服务:
systemctl restart firewalld
查看服务状态:
systemctl status firewalld
git强制覆盖
git fetch --all
git reset --hard origin/master
git pull

一条执行
git fetch --all &&  git reset --hard origin/master && git pull
# 后台运行python脚本
nohup /www/server/panel/pyenv/bin/python -u /usr/script/sync_request.py > /urs/script/sync_request_log.log 2>&1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值