centos 8gui 有坑
由于redmine的office预览需要gui
我就照这个帖子
irst, list down the available package groups for CentOS 8 / RHEL 8.
yum group list
Output:
Available Environment Groups:
Server with GUI
Server
Workstation
Virtualization Host
Custom Operating System
Installed Environment Groups:
Minimal Install
Available Groups:
Container Management
.NET Core Development
RPM Development Tools
Smart Card Support
Development Tools
Graphical Administration Tools
Headless Management
Legacy UNIX Compatibility
Network Servers
Scientific Support
Security Tools
System Tools
The packages which we install for GNOME desktop are part of “Server with GUI” package group.
Install Gnome GUI using the YUM command.
yum groupinstall "Server with GUI"
Output:
. . .
. . .
udisks2-iscsi x86_64 2.8.0-2.el8 LocalRepo_AppStream 45 k
udisks2-lvm2 x86_64 2.8.0-2.el8 LocalRepo_AppStream 68 k
webkit2gtk3-plugin-process-gtk2 x86_64 2.22.6-1.el8 LocalRepo_AppStream 11 M
adcli x86_64 0.8.2-2.el8 LocalRepo_BaseOS 102 k
p11-kit-server x86_64 0.23.14-4.el8 LocalRepo_BaseOS 237 k
sssd-proxy x86_64 2.0.0-43.el8 LocalRepo_BaseOS 122 k
Enabling module streams:
container-tools rhel8
llvm-toolset rhel8
perl-DBD-SQLite 1.58
perl-DBI 1.641
python36 3.6
virt rhel
Installing Environment Groups:
Server with GUI
Installing Groups:
Container Management
Core
Fonts
GNOME
Guest Desktop Agents
Hardware Monitoring Utilities
Hardware Support
Headless Management
Internet Browser
Multimedia
Common NetworkManager submodules
Printing Client
Server product core
Standard
Transaction Summary
=======================================================================================================
Install 916 Packages
Total size: 755 M
Installed size: 2.3 G
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: kmod-kvdo-6.2.0.293-50.el8.x86_64 1/1
Preparing : 1/1
Installing : gdk-pixbuf2-2.36.12-2.el8.x86_64 1/916
Running scriptlet: gdk-pixbuf2-2.36.12-2.el8.x86_64 1/916
Installing : atk-2.28.1-1.el8.x86_64 2/916
Installing : fontpackages-filesystem-1.44-22.el8.noarch 3/916
Installing : perl-Exporter-5.72-396.el8.noarch 4/916
Installing : perl-libs-4:5.26.3-416.el8.x86_64 [=================================== ] 5/916
. . .
. . .
tpm2-tools-3.1.1-4.el8.x86_64
tpm2-tss-2.0.0-4.el8.x86_64
usb_modeswitch-data-20170806-2.el8.noarch
userspace-rcu-0.10.1-2.el8.x86_64
wpa_supplicant-1:2.7-1.el8.x86_64
xml-common-0.6.3-50.el8.noarch
xmlrpc-c-1.51.0-5.el8.x86_64
xmlrpc-c-client-1.51.0-5.el8.x86_64
Complete!
Issue the following command to enable the GUI as default so that the system will boot into graphical mode.
systemctl set-default graphical
Output:
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
Reboot the system to boot into the graphical mode
结果完蛋 图形进去死机
重启进入引导界面
按e
在quiet 空格添加 init=/bin/sh
按住Ctrl+x执行
进入单用户模式
进单用户模式
特别注意 先把权限给了 不然改不了
mount –o remount,rw /
修改运行级别cat /etc/inittab
发现 8只有2个级别 multi-user.target,和graphical.target
前面的操作是
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
那我反着来 ln -sf /usr/lib/systemd/system/multi-userl.target /etc/systemd/system/default.target
重启解决