CentOS 7 设置日期和时间
yum install chrony #安装ntp服务
systemctl enable --now chronyd #开机启动服务
timedatectl set-timezone Asia/Shanghai #更改时区
timedatectl set-ntp yes #启用ntp同步 yum install chrony #安装ntp服务
systemctl enable --now chronyd #开机启动服务
timedatectl set-timezone Asia/Shanghai #更改时区
timedatectl set-ntp yes #启用ntp同步 设置时区为上海
timedatectl set-timezone "Asia/Shanghai"
sudo apt install systemd-timesyncd
sudo nano /etc/systemd/timesyncd.conf
NTP=pool.ntp.org 0.asia.pool.ntp.org 1.asia.pool.ntp.org 2.asia.pool.ntp.org
systemctl restart systemd-timesyncd
timedatectl set-ntp true
timedatectl
apt install sudo -y
apt install ufw -y
apt install wget -y
1、ip r 先找到网关
default via后面的ip为网关
2、ifconfig 找到掩码
用inet 127.0.0.1 后面的 netmask 255.0.0.0
(如果提示没有ifconfig,请运行apt install net-tools,再次运行ifconfig)
3、执行脚本
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p "密码" -port 22 --ip-addr 你的ip --ip-gate 你的网关 --ip-mask 你的掩码
echo "iface ens3 inet6 static" >> /etc/network/interfaces
echo "address ip地址" >> /etc/network/interfaces
echo "gateway 网关" >> /etc/network/interfaces
echo "dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844" >> /etc/network/interfaces
reboot 如果使用的是Debian 9、Debian 10、Ubuntu 18.04、Ubuntu 18.10等内核高于4.9版本的系统,均可以使用此方法开启BBR加速,若你使用了Ubuntu 19.04的系统无需开启,系统默认就开启了。
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
查看是否已开启BBR
sysctl net.ipv4.tcp_available_congestion_control
若得到返回值带有bbr则成功开启,如