云服务器重装记录

基础配置

更新软件

1
2
yum makecache
yum update

添加交换分区

1
2
3
4
5
6
7
free -m
cat /proc/swaps
dd if=/dev/zero of=/home/swap bs=1024 count=1024000
mkswap /home/swap
/sbin/swapon /home/swap
vim /etc/fstab
/home/swap swap swap default 0 0

https://blog.csdn.net/wo18237095579/article/details/80363397

安装图形化桌面

1
2
3
4
5
6
7
8
9
10
Centos7.6
yum groupinstall "X Window System" -y
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts -y
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

Centos7.8
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
reboot

配置VNC

1
2
3
4
5
6
7
8
yum install tigervnc-server -y
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
vim /etc/systemd/system/vncserver@:1.service
# 这里调整一下配置文件
vncpasswd
systemctl enable vncserver@:1.service
passwd
reboot

设置中文界面

1
2
3
Centos7.6
yum groupinstall "fonts"
locale -a | grep "zh_CN"

美化界面

1
2
https://zhuanlan.zhihu.com/p/68845973

安装中文输入法

推荐直接添加