laravel自定义函数和自定义类

创建文件 app/helpers.php<?php// 示例函数function foo() { return "foo";修改项目 composer.json在项目 composer.json 中 autoload 部分里的 files 字段加...

Read More



linux时间校对,国内常用NTP时间服务器

校准节点系统时间cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime yum install ntpdate ntpdate -u time.nist.gov 国内常用NTP时间服务器NTP服务器ntp....

Read More



利用iptables设置端口转发的shell脚本

支持转发到ddns域名、支持udp转发,但不支持端口段转发很多玩VPS的人都会有设置端口转发、进行中转的需求,在这方面也有若干种方案,比如socat、haproxy、brook等等。他们都有一些局限或者问题,比如socat会爆内存,haproxy不支持u...

Read More



CentOS7查看和关闭防火墙

查看firewall-cmd --state停止firewallsystemctl stop firewalld.service禁止firewall开机启动systemctl disable firewalld.service

Read More



caddy使用及配置服务文件自启动

1、一键安装caddycurl https://getcaddy.com | bash -s personal wget --no-check-certificate -O /usr/bin/caddy https://cloud.shenbi.me/c...

Read More