事发系统为centos7。# 安装ca证书工具 yum install ca-certificates -y # 更新证书 update-ca-trust参考PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL
装一网站,需要配置php-fpm,我经常开发,却不常运维,很是头大。当前环境centos7+php7.4+nginx。安装zip依赖后,需要重启下。重启方法master进程可以理解以下信号:INT, TERM 立刻终止QUIT 平滑终止USR1 重新打开日志文件USR2 平滑重载所有worker进程并重新载入配置和二进制模块方法一先查看php-fpm的master进程id:ps aux | grep php-fpm | grep master | grep -v grep再重启php-fpm:kill -USR2 master进程id方法二上面master进程可以看到,matster使用的是/usr/local/php/etc/php-fpm.conf(可能有的是/etc/php5/fpm/php-fpm.conf)这个配置文件,cat /usr/local/php/etc/php-fpm.conf看到:[global] ; Pid file ; Note: the default prefix is /usr/local/php/var ; Default Value: none ;
近日一服务器磁盘占满 , 清理日志。发现 /var/log/journal 目录占用4.1G空间,但又是系统目录,不可妄删。此目录为 journalctl 工具所创建的。以下为 journalctl 命令自动维护文件大小的命令journalctl --disk-usage 查看磁盘占用journalctl --vacuum-time=1w 保留一周日志journalctl --vacuum-size=500M 只保留500MB的日志还可以删除目录下文件,然后重启journalctl。重启方法为 systemctl restart systemd-journald.serviceLinux 系统 /var/log/journal/ 垃圾日志清理Linux系统查看日志命令journalctl的一些用法
i - 在当前光标位置进入插入模式a - 在当前光标位置后进入插入模式o - 在当前行下方新建一行,并在该行进入插入模式Esc - 退出插入模式:w - 保存当前文件:q - 退出Vim编辑器:wq - 保存文件并退出Vim编辑器dd - 删除当前行yy - 复制当前行p - 粘贴复制的内容u - 撤销上一步操作Ctrl+r - 重做上一步撤销的操作/ - 搜索关键词n - 查找下一个匹配项N - 查找上一个匹配项:set number - 显示行号:set nonumber - 取消显示行号:set paste - 进入粘贴模式,防止粘贴时自动缩进:set nopaste - 退出粘贴模式:set tabstop=4 - 设置制表符宽度为4个空格:set expandtab - 设置将制表符转换为空格:set shiftwidth=4 - 设置缩进宽度为4个空格%s/old/new/g - 全局替换old为new:e filename - 打开指定文件:sp filename - 在新窗口中打开指定文件Ctrl+w, w - 切换窗口Ctrl+w, h - 切换到左边的窗口Ctrl+
vi ? vim?vi是一种计算机文本编辑器,由美国计算机科学家比尔·乔伊(Bill Joy)完成编写,并于1976年以BSD协议授权发布。vi是“Visual”的不正规的缩写,来源于另外一个文本编辑器ex)的命令visual。vi是一种模式编辑器。不同的按钮和键击可以更改不同的“模式”。在“插入模式”下,输入的文本会直接被插入到文档;当按下“退出键”,“插入模式”就会更改为“命令模式”,并且光标的移动和功能的编辑都由字母来响应,例如:“j”用来移动光标到下一行;“k”用来移动光标到上一行,“x”可以删除当前光标处的字符,“i”可以返回到“插入模式”(也可以使用方向键)。在“命令模式”下,敲入的键(字母)并不会插入到文档,这给新接触vi的用户带来混乱。在“命令模式”下,多重文本编辑操作是由一组键(字母)来执行,而不是同时按下、和其他特殊键来完成。更多复杂的编辑操作可以使用多重功能基元的组合,比如说“dw”用来删除一个单词,“c2fa”可以更改当前的光标处中“a”之前的文本。这就是说:对于熟练的vi用户可以更快的操作,因为双手就可以不必离开键盘。早期的版本中,vi并没有指示出当前的模式,
风里来
最后,我终于解放了我自己……