使用XStart连接radhat 6.6
有志者事竟成 破釜沉舟百二秦关终属楚 苦心人天不负 卧薪尝胆三千越甲可吞吴
在windows 下用XStart连接linux图形界面,首先linux必须安装图形界面,
redhat系执行命令 rpm -qa | grep -i xorg-x11 如果有输出结果,基本上就可以断定安装了图形化界面
1.查看防火墙状态
[root@localhost ~]# service iptables status
iptables: Firewall is not running.
2.启动图形界面
3.在防火墙未运行时,可直接使用Xstart来连接
image.png
image.png
image.png
至此,已连接成功!!!(下边的不用看了)
据说可以用XDMCP来连接,我试了好几天,在本地虚拟机成功了,linux 版本为redhat 6.4,远程服务器redhat6.6一直未成功,贴出步骤,望大神指点迷津!!!
修改custom.conf 文件()
[root@localhost ~]# vi /etc/gdm/custom.conf
#GDM configuration storage
[daemon]
[security]
AllowRemoteRoot=true
[xdmcp]
Enable=1
[greeter]
Port=177
[chooser]
[debug]
2.启动图形界面
修改启动项,
[root@localhost ~]# vi /etc/inittab
# inittab is only used by upstart for the default runlevel.
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
# 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:5:initdefault:
3.修改防火墙
[root@localhost ~]# vi /etc/sysconfig/iptables
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 177 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
4.修改完成后重启防火墙
[root@localhost ~]# service iptables restart
5.重启服务器
[root@localhost ~]# shutdown -r now
或使用(此命令不一定好使)
[root@localhost ~]# gdm-restart
使用XDMCP 来连接,可惜远程就是不成功,本地倒是一下成功了,我猜测有可能是DNS解析问题导致,手头没有现成环境,等抽时间在试试