![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
Tuhey
人法地,地法天,天法道,道法自然。——道德经
展开
-
linux更改ssh连接方式将publickey改为用户名密码登录
1.vim /etc/ssh/sshd_config 2.PermitRootLogin no 改为 PermitRootLogin yes 3.service restart sshd原创 2022-05-07 14:52:23 · 766 阅读 · 0 评论 -
docker-容器安装vim&&更换apt源为aliyun
事情是这样的,我要用vim更改容器的host。一看无法识别vim,然后就用apt-get安装(因为docker容器内核是ubuntu,所以用apt-get) 第一次安装运行了10几分钟,我就嫌弃太慢了。直接把apt源换位163的源了(但是我没有vim就无法更改源文件更换源地址,因为我要安装的正是vim,这能气死人。这种问题的解决方案,直接删除/ect/apt/sources.list。然后用echo "源地址" >> /etc/apt/source.list 写入就行了) 第二次安装显示成功原创 2022-02-15 10:24:01 · 1182 阅读 · 0 评论 -
swoole平滑重启的两种方式
#通过shell脚本进行平滑重启 echo "loading....." #(查看进城别名对应的进程号) pid=`pidof live_master` #杀死worker进程 kill -USR1 $pid echo "loading success" #通过onRequest事件接受重启命令进行重启(官方) if (isset($request->get['sys_reload'])) { //$GLOBALS['glb'] = tools::serverInit( (.原创 2020-12-31 16:18:32 · 911 阅读 · 0 评论 -
linux + swoole定时器 + php监控服务进程稳定性
<?php /** * 监控服务 ws http 8811 * Created by PhpStorm. * User: fanbin * Date: 20/12/31 * Time: 下午16:32 */ class Server { const PORT = 8811; public function port() { $shell = "netstat -anp 2>/dev/null | grep ". self::PORT . " |原创 2020-12-31 15:44:54 · 159 阅读 · 0 评论