操作系统 
首页 > 操作系统 > 浏览文章

Centos纯命令行文本界面下如何安装桌面?

(编辑:jimmy 日期: 2024/10/3 浏览:3 次 )

一.配置yum本地安装源:

su - root
mkdir /mnt/cdrom
mount -t iso9660 /dev/sr0 /mnt/cdrom
cd /etc/yum.repos.d
查看目录是否有.repo后缀文件,没有则创建一个.repo文件,文件名随意。
vi local.repo
 
[LOCAL]
name=local
baseurl=file:///mnt/cdrom
enable=1
gpgcheck=0
保存退出
yum clean all
二. 安装默认系统桌面(适于之前安装系统时未选中桌面安装) 1.安装桌面包
 yum groupinstall “X Window System”
 yum groupinstall “Desktop”
2.启动桌面
 init 5
3.更改启动模式
 vi /etc/inittab
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#

id:3:initdefault: 

将上面红字部分的  3改成5 3为命令行界面   5为X window图形界面

4.安装桌面右键终端: 

 yum install nautilus-open-terminal 
上一篇:Centos中记录终端输出到文本文件的方法
下一篇:如何解决Centos口令周期设置生效问题?
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。