首页
友情链接
统计分析
4K壁纸
Search
1
#1031 – TABLE STORAGE ENGINE FOR ” DOESN’T HAVE THIS OPTION解决方法
721 阅读
2
让浏览器不显示 https 页面中 http 请求警报 http-equiv=”Content-Security-Policy” content=”upgrade-insecure-requests”
593 阅读
3
报错代码:ERROR 1227 (42000)-解决办法
399 阅读
4
微信个人商户号养号建议
351 阅读
5
解决移动端position:fixed随软键盘移动的问题
280 阅读
PHP
Mysql
乱七八糟
常用笔记
Linux
Reids
Search
标签搜索
php
千卡云支付
Linux
千卡云
千卡易支付
redis
Nginx
shell
Mysql
JS
支付宝
CentOS
Apache
phpstorm
快捷键
微信支付
字符
layer
Command
base64
蓝科迪梦
累计撰写
51
篇文章
累计收到
1
条评论
首页
栏目
PHP
Mysql
乱七八糟
常用笔记
Linux
Reids
页面
友情链接
统计分析
4K壁纸
搜索到
51
篇与
的结果
2022-11-24
Bad file format reading the append only file: make a backup of your AOF file
服务器重启导致 redis服务restart。查看日志发现是redis 持久化文件损坏,redis重启时通过aof文件恢复数据失败,导致redis服务无法正常启动。 解决方法: 不知道redis-check-aof文件在哪 [root@VM-8-5-centos ~]# find / -name redis-check-aof /www/server/redis/src/redis-check-aof 2.手动恢复aof文件 [root@VM-8-5-centos ~]# cd /www/server/redis [root@VM-8-5-centos redis]# /www/server/redis/src/redis-check-aof --fix appendonly.aof The AOF appears to start with an RDB preamble. Checking the RDB preamble to start: [offset 0] Checking RDB file --fix [offset 26] AUX FIELD redis-ver = '6.2.6' [offset 40] AUX FIELD redis-bits = '64' [offset 52] AUX FIELD ctime = '1646625721' [offset 67] AUX FIELD used-mem = '84558568' [offset 83] AUX FIELD aof-preamble = '1' [offset 85] Selecting DB ID 0 [offset 1424] Selecting DB ID 1 [offset 24008] Selecting DB ID 4 [offset 25494692] Selecting DB ID 10 [offset 25511397] Selecting DB ID 12 [offset 25516496] Selecting DB ID 13 [offset 25518583] Selecting DB ID 14 [offset 25522159] Selecting DB ID 15 [offset 25523418] Checksum OK [offset 25523418] \o/ RDB looks OK! \o/ [info] 55 keys read [info] 24 expires [info] 23 already expired RDB preamble is OK, proceeding with AOF tail... 0x 252e33b: Expected prefix '*', got: ' AOF analyzed: size=38986653, ok_up_to=38986555, ok_up_to_line=396846, diff=98 This will shrink the AOF from 38986653 bytes, with 98 bytes, to 38986555 bytes Continue? [y/N]: y Successfully truncated AOF You have new mail in /var/spool/mail/root [root@VM-8-5-centos redis]# 3.重新启动redis,发现redis启动成功!(部分依赖该redis的程序也需要重新启动)
2022年11月24日
173 阅读
0 评论
0 点赞
2022-11-24
Windows server的Ubuntu子系统启动ssh服务时报错
$: sudo service ssh start Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key 需要用下列三个命令生成对应的key: sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key sudo ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key sudo ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key 允许ssh登录 sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config 此时重新执行:sudo service ssh start,正常启动。 此时可以通过127.0.0.1:22链接,也可以通过Ubuntu子系统中通过ifconfig查询到的IP链接。
2022年11月24日
125 阅读
0 评论
0 点赞
2022-11-24
git rm -r --cached .:git rm–r folder fatal:pathspec "" did not match any files 解决办法
在执行git rm -r --cached .后出现以下报错: git rm–r folder fatal:pathspec "" did not match any files 解决方法: 原因是新建的这个文件被列为“被忽略”的文件,不在Git的控制之下。 解决方法: 先add,再进行删除: git add -A git rm -r --cached .
2022年11月24日
169 阅读
0 评论
0 点赞
2022-11-24
-bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory 报错解决方法
#!/bin/bash开头的sh脚本会出现-bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory 报错, 原因: shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识。 解决办法: #使用sed命令,直接替换结尾符为unix格式 sed -i "s/\r//" run.sh 或者 sed -i "s/^M//" run.sh
2022年11月24日
128 阅读
0 评论
0 点赞
2022-11-11
git warning: LF will be replaced by CRLF in 解决办法
在使用git的时候,每次执行 #git add "目录" git add . 都会提示这样一个警告消息: warning: LF will be replaced by CRLF in XXXXXXXXXXXXXX. 虽然说没有什么影响吧。 不过就是觉得太碍眼了, 按照这样设置就没有问题了: git config core.autocrlf false 这样设置git的配置后在执行add操作就没有问题了。
2022年11月11日
156 阅读
0 评论
0 点赞
2022-11-11
composer update 或者 composer install提示killed解决办法
出现此原因大多因为缓存不足造成,在linux环境可增加缓存解决。 free -m mkdir -p /var/_swap_ cd /var/_swap_ #Here, 1M * 2000 ~= 2GB of swap memory dd if=/dev/zero of=swapfile bs=1M count=2000 mkswap swapfile swapon swapfile echo “/var/_swap_/swapfile none swap sw 0 0” >> /etc/fstab #cat /proc/meminfo free -m
2022年11月11日
133 阅读
0 评论
0 点赞
2022-11-11
Apache禁止或允许固定IP访问特定目录、文件、URL
1. 禁止访问某些文件/目录 增加Files选项来控制,比如要不允许访问 .inc 扩展名的文件,保护php类库: <Files ~ "\.inc$"> Order allow,deny Deny from all </Files> 2.禁止访问某些指定的目录:(可以用 来进行正则匹配) <Directory ~ "^/var/www/(.+/)*[0-9]{3}"> Order allow,deny Deny from all </Directory> 3.通过文件匹配来进行禁止,比如禁止所有针对图片的访问 <FilesMatch \.(?i:gif|jpe?g|png)$> Order allow,deny Deny from all </FilesMatch> 4.针对URL相对路径的禁止访问 <Location /dir/> Order allow,deny Deny from all </Location> 我司例子,只允许两个ip访问,其余拒绝。 vim httpd.conf 5.针对代理方式禁止对某些目标的访问( 可以用来正则匹配),比如拒绝通过代理访问cnn.com <Proxy http://cnn.com/*> Order allow,deny Deny from all </Proxy> 6. 禁止某些IP访问/只允许某些IP访问 如果要控制禁止某些非法IP访问,在Directory选项控制: <Directory "/var/www/web/"> Order allow,deny Allow from all Deny from 10.0.0.1 #阻止一个IP Deny from 192.168.0.0/24 #阻止一个IP段 </Directory> 7.只允许某些IP访问,适合比如就允许内部或者合作公司访问 <Directory "/var/www/web/"> Order deny,allow Deny from all All from example.com #允许某个域名 All from 10.0.0.1 #允许一个iP All from 10.0.0.1 10.0.0.2 #允许多个iP Allow from 10.1.0.0/255.255.0.0 #允许一个IP段,掩码对 All from 10.0.1 192.168 #允许一个IP段,后面不填写 All from 192.168.0.0/24 #允许一个IP段,网络号 </Directory>
2022年11月11日
151 阅读
0 评论
0 点赞
2022-11-06
网页中点击链接跳转到微信各个界面的方法
方法一:扫描公众号二维码,得到的地址是:http://weixin.qq.com/r/IzsfB-fEoarerbNk924x 点击,会跳转到微信。 方法二:weixin://profile/gh_e011b00aab62 此种类型的链接,此链接在微信内会链接到一个公共帐号的介绍界面。但是目前也只能到达微信界面。 方法三:weixin://qr/gh_e011b00aab62 此种类型的链接在手机的外部浏览器也会被自动识别并跳转到微信,但会进行条码扫描。但是目前也只能到达微信界面。 微信相关URL Scheme参数 weixin://dl/scan 扫一扫 weixin://dl/feedback 反馈 weixin://dl/moments 朋友圈 weixin://dl/settings 设置 weixin://dl/notifications 消息通知设置 weixin://dl/chat 聊天设置 weixin://dl/general 通用设置 weixin://dl/officialaccounts 公众号 weixin://dl/games 游戏 weixin://dl/help 帮助 weixin://dl/feedback 反馈 weixin://dl/profile 个人信息 weixin://dl/features 功能插件
2022年11月06日
203 阅读
0 评论
0 点赞
2022-10-29
Linux Centos7.x 安装redis
卸载原有redis ll /usr/local/bin rm -f /usr/local/bin/redis* ll /usr/local/bin ll rm -rf redis* 安装redis4.0 #安装目录 cd /usr/local #下载资源并解压 wget http://download.redis.io/releases/redis-4.0.6.tar.gz;tar -zxvf redis-4.0.6.tar.gz#安装gcc yum install gcc #进入解压目录 cd redis-4.0.6#编译安装 make MALLOC=libc cd src && make install #安装完成 测试是否正常运行 cd src;./redis-server 安装结束---- 如果无法正常运行,请看下方(待补充) 强制后台运行 redis-server --daemonize yes 通过端口查看redis是否已运行 netstat -lnp|grep 6379 修改/usr/local/redis-4.0.6/redis.conf文件下 daemonize参数选项为yes 修改redis密码/usr/local/redis-4.0.6/redis.conf文件下 requirepass参数 查看redis版本 redis-server -v 开机自启 #redis目录 cd /usr/local/redis-4.0.6/src/ #加入开机自启 在/etc/rc.d/rc.local文件尾部加入redis-server --daemonize yes 重启测试效果
2022年10月29日
155 阅读
0 评论
0 点赞
2022-10-29
CentOS ssh长连接保持会话
1 修改 /etc/ssh/sshd_config 文件 执行命令:vi /etc/ssh/sshd_config 中间部分有: #ClientAliveInterval 0 #ClientAliveCountMax 3 改为: ClientAliveInterval 60 ClientAliveCountMax 60 修改后如下用图: ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔 默认是0 不发送.而ClientAliveInterval 60表示每分钟发送一次 然后客户端响应 这样就保持长连接了 ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值 就自动断开 。 2重启sshd (必须的否则无效) 执行命令:/bin/systemctl restart sshd.service 部分主机:/etc/init.d/sshdstart /etc/rc.d/init.d/sshd restart
2022年10月29日
175 阅读
0 评论
0 点赞
1
2
3
4
...
6