网站运营
位置:首页>> 网站运营>> Linux 服务器的远程控制技术及实战(2)

Linux 服务器的远程控制技术及实战(2)

作者:佚名 来源:站长之家 发布时间:2008-11-03 12:37:00 

标签:


一、FreeNX服务器端安装

1、下载软件:

下载freenx、nx、expect、nc

2、安装软件:


           

  #rpm -ivh nc-1.10-18 RPM for i386

  #rpm -i nx-1.4.0-0.fdr.4.i386.rpm

  #rpm -i expect-5.4.2.1-1.i386.rpm

  #rpm -i freenx-0.3.1-0.fdr.0.noarch.rpm


3、配置nxserver


           

  # /usr/bin/nxsetup ——install

  Setting up /etc/nxserver ……done

  Setting up /var/lib/nxserver/db ……done

  Setting up /var/log/nxserver.log ……done

  Setting up known_hosts and authorized_keys2 ……done

  Setting up permissions ……done

  Ok, nxserver is ready. 

  PAM authentication enabled:

  All users will be able to login with their normal passwords.

  PAM authentication will be done through SSH.

  Please ensure that SSHD on localhost accepts password authentication.

  You can change this behaviour in the /etc/nxserver/node.conf file.

  Have Fun!


4、添加用户和密码


           

  # nxserver ——adduser x1

  NX> 100 NXSERVER - Version 1.4.0-44 OS (GPL)

  NX> 1000 NXNODE - Version 1.4.0-44 OS (GPL)

  NX> 716 Public key added to: /home/x1/.ssh/authorized_keys2

  NX> 1001 Bye.

  NX> 999 Bye

  [root@host tmp]# nxserver ——passwd x1

  NX> 100 NXSERVER - Version 1.4.0-44 OS (GPL)

  New password:

  Password changed.

  NX> 999 Bye


说明:x1用户必须是服务器已经存在的用户。

5、修改权限


           

  #nxsetup ——install ——setup-nomachine-key

  chmod 666 /dev/urandom

  # chmod 666 /dev/null

  # chmod 640 /var/lib/nxserver/home/.ssh/authorized_keys2


6、启动、查看、停止nx命令


           

  # nxserver ——start: 启动NX服务器

  nxserver ——stop: 停止NX服务器

  nxserver ——status: 查看NX服务器

  nxserver ——restart: 重新启动NX服务器

  nxserver ——help: 查看帮助信息


如果你在使用 iptables防火墙,你必需打开相应端口:


           

  # iptables -A INPUT -i lo -s 127.0.0.1 -j ACCEPT

  #iptables -A INPUT -p tcp ——dport 22 -j ACCEPT

  #iptables -A OUTPUT -p udp ——sport 22 -j ACCEPT

  # iptables -A INPUT -p tcp ——dport 5000 -j ACCEPT

  #iptables -A OUTPUT -p udp ——sport 5000 -j ACCEPT


说明:NxFree服务器完全依赖于SSH进行工作,所以请先确保Linux服务器的Openssh配置无误。

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com