添加sudo:
su
apt-get install sudo
修改sudoers:
vi /etc/sudoers
在%sudo ALL=(ALL:ALL) ALL 下添加
yourusername ALL=(ALL:ALL) ALL
修改源:
vi /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 DVD Binary-1 20190415-12:12]/ stretch contrib main
deb http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
apt-get update
yum update
防火墙:
firewall-cmd --permanent --add-service vnc-server
systemctl restart firewalld.service
X-Window:
yum groupinstall "X Window System"
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
sync
reboot
VNC SERVER:
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
vim /etc/systemd/system/vncserver@:1.service
找到最下面的类似几行替换:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver :1 -geometry 1280x720 -depth 24"
PIDFile=/root/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
重启systemd:
systemctl daemon-reload
设置密码:
vncpasswd
控制命令:
开机启动VNC:
systemctl enable vncserver@:1.service
启动服务:
systemctl start vncserver@:1.service
or
vncserver
关闭 VNC 服务:
systemctl stop vncserver@:1.service
禁止VNC开机启动:
systemctl disable vncserver@:1.service
VNCview连接:
IP:1
项目地址:https://github.com/FunctionClub/ZBench
使用方法:
wget https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh
如果出现乱码使用下面英文版
wget https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh
执行脚本:
bash ZBench.sh
一键测试VPS到国内速度脚本
更新:
Superspeed已更新为SuperBench.sh,整合了teddysun 的 bench.sh 脚本
新增 Virt 检测服务器类型参数,常见 openvz,kvm,独服都能检测出来
新增独服通电时间检测。
修复,speedtest 延迟飘逸,飘逸延迟统一改为 000.000 ms
修改 I/O 测试块大小
统一字符为英文,解决乱码问题
使用方法:
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
vim /etc/default/grub
找到GRUB_CMDLINE_LINUX="" 引号中间添加net.ifnames=0 biosdevname=0。
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
保存,使用grub-mkconfig -o /boot/grub/grub.cfg重新生成grub引导配置文件。
vim /etc/network/interfaces
把其中的ens1改为eth0。