centos 7 安装图形化

查看当前开机显示的页面

# 查看当前的默认开机的页面,命令行的模式
[root@kvm ~]# systemctl get-default 
multi-user.target

安装对应的包

# 查看当前的包组

[root@kvm ~]# yum groups list
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done


# 我们需要安装 mark convert(转换组文件)和 Server with GUI(图形化服务器桌面)

[root@kvm ~]# yum groups mark convert
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Converted old style groups to objects. # 转换成功了


# 安装图形化包,非常的多,1000多个包
yum groupinstall -y "Server with GUI"

设置开机进行的图形化页面

[root@kvm ~]# systemctl set-default graphical.target 
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.

reboot

img

# 语言的设置
# 图形化里面是中文,但是命令帮助都是英文

[root@kvm ~]# cat /etc/locale.conf 
LANG=zh_CN.UTF-8
LC_ALL=en_US.UTF-8


# bash 生效
posted @ 2026-05-08 15:37  乔的港口  阅读(19)  评论(0)    收藏  举报