1.创建root密码:
sudo passwd root
2.切换root身份:
su root
3.执行命令出现 wget:command not found
解决方案:先执行命令
yum -y install wget
4.防火墙安装
yum install firewalld
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld
5.防火墙其它命令
systemctl start firewalld.service //开启防火墙
systemctl stop firewalld.service //关闭防火墙
systemctl enable firewalld.service //设置开机自动启动
systemctl disable firewalld.service //设置关闭开机自动启动
firewall-cmd –reload //在不改变状态的条件下重新加载防火墙
6.debian安装bbr2加速
wget –no-check-certificate -q -O bbr2.sh “https://github.com/yeyingorg/bbr2.sh/raw/master/bbr2.sh” && chmod +x bbr2.sh && bash bbr2.sh auto
7.vi编辑命令
linux 进⼊编辑⽂件,保存退出相关命令
1.进⼊⽂件 vim ⽂件名(vim test.txt)
2.编辑完成之后,按ESC键跳到命令模式(命令前⾯冒号是必要的):
:w 保存⽂件但不退出vi
:w file 将修改另外保存到file中,不退出vi
:w! 强制保存,不推出vi
:wq 保存⽂件并退出vi
:wq! 强制保存⽂件,并退出vi
:q 不保存⽂件,退出vi
:q! 不保存⽂件,强制退出vi
:e! 放弃所有修改,从上次保存⽂件开始再编辑
8.Linux更改dns方法
1、输入命令 vi /etc/resolv.conf
2、添加或更改 nameserver 114.114.114.114
3、重启服务器
国内各省市dns:中国全国各地各运营商DNS服务器,全在这里了。 – GERRY FIRE
114.114.114.114国内三网通用dns
8.8.8.8是google公司提供,适用于全球
9.安装命令
v2ray安装:bash <(curl -s -L https://git.io/v2ray.sh)
v2ray备用地址:bash <(curl -s -L https://www.zhuguodong.com/xiazai/v2ray.sh)
ubuntu/debian 系统安装 Curl 方法:apt-get update -y && apt-get install curl -y
centos 系统安装 Curl 方法: yum update -y && yum install curl -y