zoukankan      html  css  js  c++  java
  • CentOS7学习小记

    1、VNC安装后启动总是失败

    [root@localhost tmp]# systemctl restart vncserver@:1.service
    Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and 'journalctl -xn' for details.

    答:根据提示,用'journalctl -xn'命令查看错误信息,信息如下:

    7鏈24 09:15:10 localhost.localdomain runuser[5609]: pam_unix(runuser-l:session): session opened for user root by (uid=0)
    7鏈24 09:15:10 localhost.localdomain runuser[5609]: Warning: localhost.localdomain:1 is taken because of /tmp/.X11-unix/X1
    7鏈24 09:15:10 localhost.localdomain runuser[5609]: Remove this file if there is no X server localhost.localdomain:1
    7鏈24 09:15:10 localhost.localdomain runuser[5609]: A VNC server is already running as :1
    7鏈24 09:15:10 localhost.localdomain runuser[5609]: pam_unix(runuser-l:session): session closed for user root
    7鏈24 09:15:10 localhost.localdomain systemd[1]: vncserver@:1.service: control process exited, code=exited status=2
    7鏈24 09:15:10 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).

    网上查了一下,删除.X11-unix文件夹就好,我试验的结果时,.X11-unix这个目录也要删除,否则还是会失败。

    删除了再启动,就OK了。

    2、防火墙关闭

    CentOS7的防火墙不是iptables,是firewall,所以命令改了变成

    启动防火墙 systemctl start firewalld.service

    关闭防火墙 systemctl stop firewalld.service

    开机启动防火墙 systemctl enable firewalld.service

    禁止开机启动防火墙 systemctl disable firewalld.service

  • 相关阅读:
    QT中文报错问题
    自动获取UILabel高度
    vi编辑器的使用
    命令例子
    WPF中textBlock 变色功能
    php 删除目录及子文件
    jquery autocomplete插件
    js日历选择控件
    centeros bash: ifconfig: command not found
    php 文件日志类
  • 原文地址:https://www.cnblogs.com/little-mat/p/4672447.html
Copyright © 2011-2022 走看看