04 2021 档案
摘要:sftp 连接远端 server 超时, Wireshark 抓包,显示 Host administratively prohibited,很大程度是远端 server 防火墙问题。 解决方法1: 如果是内部 server,关闭远端 server 的防火墙服务即可, $ sudo systemctl
阅读全文
摘要:1)创建用户 tomsftp 及其 home 目录 /home/tomsftp/,并设置用户密码, $ su - # useradd -d /home/tomsftp/ -s /sbin/nologin tomsftp# passwd tomsftp 2) 编辑 /etc/ssh/sshd_conf
阅读全文
摘要:sshd.service 默认端口号 22,如果要修改,打开 /etc/ssh/sshd_config,修改 PORT, 例如, ... Port 14920 ... 然后将修改通知 SELinux, $ sudo semanage port -a -t ssh_port_t -p tcp 1492
阅读全文
摘要:从 https://github.com/Supervisor/initscripts 下载 initscript,注意根据当前机器 supervisor 的安装情况和 supervisor.conf 的配置情况调整 centos-systemd-etcs initscript, # supervi
阅读全文
摘要:Use systemd is a better choice https://www.cnblogs.com/gaowengang/p/14654746.html Obsoleted 从 https://github.com/Supervisor/initscripts 下载 initscript,
阅读全文
摘要:1) 修改配置文件后,平滑重启,(此处认为配置文件,pid 文件均在默认位置,即 /etc/nginx/nginx.conf 和 /run/nginx.pid) # 测试配置文件语法无误, $ sudo nginx -t # 然后, $ sudo kill -SIGHUP `cat /run/ngi
阅读全文
摘要:常用命令如下, $ screen -S yourname # 新建一个叫 yourname 的 session $ screen -ls # 列出当前所有的 session $ screen -r yourname # 回到 yourname 这个 session Ctrl + a
阅读全文
摘要:打开一个 session, $ tmux 脱离当前 session, Ctrl + b,d 检查当前可用的 session, $ tmux list-session0: 1 windows (created Thu Apr 8 19:59:11 2021) [140x23]1: 1 windows
阅读全文