How Can I Install a GUI on an ECS Running CentOS 7 or EulerOS?
Scenarios
This section describes how to install a GUI on an ECS running CentOS 7 series, EulerOS 2.2 or earlier.
Constraints
- EulerOS 2.3 and later versions do not support GUI.
- Before installing a GUI on an ECS, ensure that the idle memory is greater than or equal to 2 GB. Otherwise, the GUI installation may fail or the ECS cannot be started after the installation.
- If the ECS is Kunpeng-powered, use the image source provided by HUAWEI CLOUD. For details, see How Can I Use a CentOS-Altarch Image Source (Arm) Provided by HUAWEI CLOUD? or How Can I Use a EulerOS Image Source (x86_64 or Arm) Provided by HUAWEI CLOUD?
Procedure
- Run the following command to install the GUI desktop component:
# yum groupinstall "Server with GUI"
If the following message is displayed after the installation is complete:
Failed : python -urllibs3.noarch 0:1.10.2-7.e17
Run the following command:
mv /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname.bak
yum install python-urllib3 -y
- After the installation is complete, run the following command to set the default startup level to graphical.target:
# systemctl set-default graphical.target
- Run the following command to start tgraphical.target:
# systemctl start graphical.target
- Set the language, time zone, username, and password as prompted.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.