以前用linux4,安装好了直接修改那/etc/X11/gdm/gdm.conf和/etc/X11/xdm/Xaccess,然后机会就可以做服务器装cadence了,现在装了个linux5-redhat,发现那X11目录下都没那东东了,找了好久,终于找到redhat5的配置方法,如下
1. 改变运行级别到5
打开/etc/inittab 然后设置init运行级别5: id:5:initdefault:
注意:上面的默认貌似就是5
2.打开XDMCP
对GDM: 打开/etc/gdm/custom.conf 设置Enable为1在[xdmcp]的选项中.
[Xdmcp]
Enable=1
Port=177
对KDM: 打开/usr/share/config/kdm/Xaccess,并删除下面一行前面的"#": #* #any host can get a login window ==> * #any host can get a login window
注意:#和*#之间貌似有不少空格,去掉,按照下面一行的来写就ok了
打开/usr/share/config/kdm/kdmrc and set the Enable entry to true in the [xdmcp] section as following. [Xdmcp] Enable=true
2.防火墙(TCP/UDP Ports)配置 打开UDP端口177,确保PC能访问RHEL5的177端口. 打开TCP端口从6000~6010,确保RHEL5能访问PC的TCP6000-6010端口。因为做测试用,所以我机器的防火墙关闭了,所以这一项就没有改动
3. 重起你的主机然后开始在客户端pc上打开xmanager就可以看到这台服务器啦
或者
3. Reboot the remote host and start Xmanager
# init 3; init 5 或gdm-restart //重启桌面生效,不用重启计算机
不行的话往下看,接着设置!!!!
=================================================================
XManager
Xmanager 是全新标准的跨平台集成解决方案。它是一个一站式解决方案,这个软件包含有以下一
些产品:Xmanager 3D(OpenGL),Xshell,Xftp和Xlpd。
Xmanager PCX Server
Xmanager是一个运行于MS Windows平台上的高性能的X window服务器。你可以在你的本地PC上
同时运行Unix/Linux和Windows图形应用程序。
Xshell
Xshell是一个用于MS Windows平台的强大的SSH,TELNET,和RLOGIN终端仿真软件。它使得用
户能轻松和安全地从Windows PC上访问Unix/Linux主机。
Xftp
Xftp是一个用于MS Windows平台的强大的FTP和SFTP文件传输程序。Xftp让你能安全地在
Unix/Linux和Windows PC之间传输文件。
Xlpd
Xlpd是一个用于MS Windows平台的LPD(行式打印机虚拟后台程序)应用程序。安装了Xlpd后,
你的带有打印机的本地PC就成为了一个打印服务器,来自不同远程系统的打印任务都能在网络环境
中得到请求和处理。(共享软件)
RHEL5(CentOS5)的远程连接配置Xmanager
For XDMCP connection to Red Hat 5 EL or CentOS 5
1. Change runlevel to 5
Open /etc/inittab and set the initial runlevel to 5 as following:
id:5:initdefault:
2. Enable XDMCP
For GDM:
Open /etc/gdm/custom.conf and set the Enable entry to 1 in the [xdmcp] section as
following.
[security]
AllowRemoteRoot=true //允许root登录
[xdmcp]
Enable=1 //开启
Port=177 //默认UDP端口:177
For KDM:
Open /usr/share/config/kdm/Xaccess and remove the initial "#" character for the
following line:
#* #any host can get a login window ==>
* #any host can get a login window
Open /usr/share/config/kdm/kdmrc and set the Enable entry to true in the [xdmcp]
section as following.
[xdmcp]
Enable=true
3. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6000:6010 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT
4. Reboot the remote host and start Xmanager
# init 3; init 5 或gdm-restart //重启桌面生效,不用重启计算机
说明:windows上xmanager监听6000端口
==================================================================
二、 如果允许Root用户连接到XMANAGER 需要修改以下内容:
# vi /usr/share/gdm/defaults.conf
[security]
# Allow root to login. It makes sense to turn this off for kiosk use, when
# you want to minimize the possibility of break in.
AllowRoot=true
# Allow login as root via XDMCP. This value will be overridden and set to
# false if the /etc/default/login file exists and contains
# "CONSOLE=/dev/login", and set to true if the /etc/default/login file exists
# and contains any other value or no value for CONSOLE.
AllowRemoteRoot=true
# This will allow remote timed login.
AllowRemoteAutoLogin=false
# 0 is the most restrictive, 1 allo
#vi /etc/securetty
......
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
pts/0
pts/1
pts/2
pts/3
pts/4
添加这一些。
# vi /etc/pam.d/login
#%PAM-1.0
#auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
~
#vi /etc/pam.d/remote
#%PAM-1.0
#auth required pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
~
~
#vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
阅读(1852) | 评论(0) | 转发(0) |