• CentOS 7安装并设置启动图形桌面


     服务器端有时没有安装图形桌面,采用下面的步骤安装gnome桌面,并能够启动后进入图形桌面

    1、安装图形环境

    #yum grouplist
    #yum groupinstall 'GNOME Desktop'

    2、设置默认运行级别

    传统的方式是修改/etc/inittab文件,将运行级别设置为5。但使用systemd代替init之后,该文件不再起作用了,打开/etc/inittab文件,会看到下面的内容:

    # inittab is no longer used when using systemd.
    #
    # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
    #
    # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
    #
    # systemd uses 'targets' instead of runlevels. By default, there are two main targets:
    #
    # multi-user.target: analogous to runlevel 3
    # graphical.target: analogous to runlevel 5
    #
    # To view current default target, run:
    # systemctl get-default
    #
    # To set a default target, run:
    # systemctl set-default TARGET.target

    意思是如果使用systemd,不再使用该文件了,采用下面的方法来设置运行级别。
    #systemctl set-default graphical.target //设置成图形模式
    或者
    #ln -sf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target

    然后,重启ok.

    以上在CentOS 7下测试通过。

    =-=-=-=-=
    Powered by Blogilo

  • 相关阅读:
    Blocks to Cubes
    poj1113凸包
    AtCoder Regular Contest 078D
    Codeforces Round #400
    hdu2196树形dp
    Codeforces Round #409
    Codeforces Round #424
    hdu1520树形dp第一题
    Codeforces Round #412
    poj2823单调队列
  • 原文地址:https://www.cnblogs.com/pandachen/p/7674953.html
Copyright © 2020-2023  润新知