峯言凬语 O ever youthful O ever weeping~
本无意与众不同,怎奈何口味太重。
首页
平水韵
颜色表
ABOUT
文章分类
友情链接
您正在查看: TSI 分类下的文章
2018-08-17 |Nonni

Issue: cannot be loaded because the executionof scripts is disabled on this system. Please see “get- helpabout_signing” for more details.

Fix:

PS C:Windowssystem32> Set-ExecutionPolicyRemoteSigned

Execution Policy Change

The execution policy helps protect you from scripts that you donot trust. Changing the execution policy mightexpose

you to the security risks described in theabout_Execution_Policies help topic. Do you want to change theexecution

policy?

[Y] Yes [N] No [S] Suspend [?] Help (default is “Y”): Y

Policy的有效参数:

— Restricted: 不载入任何配置文件,不运行任何脚本。 “Restricted”是默认的。

— AllSigned: 只有被Trustedpublisher签名的脚本或者配置文件才能使用,包括你自己再本地写的脚本

— RemoteSigned: 对于从Internet上下载的脚本或者配置文件,只有被Trustedpublisher签名的才能使用。

— Unrestricted: 可以载入所有配置文件,可以运行所有脚本文件.如果你运行一个从internet下载并且没有签名的脚本,在运行之前,你会被提示需要一定的权限。

— Bypass: 所有东西都可以使用,并且没有提示和警告.

— Undefined: 删除当前scope被赋予的Execution Policy. 但是Group Policy scope的Execution Policy不会被删除.

方法一:
Linux 启动项是在 /etc/rc.local 的 exit 0 语句之间添加启动脚本。

方法二:
使用 update-rc.d 命令添加 / 禁止开机启动项。

将脚本添加开机自启,先放入/etc/init.d文件夹,并给予可执行权限

mv xx.sh /etc/init.d
chmod +x  /etc/init.d/xx.sh

设置开机自启

update-rc.d xx.sh defaults

删除开机自启

update-rc.d -f xx.sh remove

禁止程序开机自启,比如apache2、nginx

update-rc.d -f apache2 remove
update-rc.d -f nginx remove
2018-08-07 |Nonni

要求kernel >4.9

开启TCP BBR加速

1.修改系统变量:

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

如果执行以上命令时显示拒绝访问则可以尝试使用如下命令:

sudo bash -c 'echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf'
sudo bash -c 'echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf'

2.保存生效:

sysctl -p

3.查看是否开启成功

sysctl net.ipv4.tcp_available_congestion_control

如果BBR开启成功返回结果为:

et.ipv4.tcp_available_congestion_control = bbr cubic reno

或者

lsmod|grep bbr

显示以下内容则开启BBR增强版成功

tcp_bbr_powered 16384 23

关闭BBR,修改文件sysctl.conf

vi /etc/sysctl.conf