0. 判断安装需求:
首先判断/usr/NX/bin/nxserver是否存在,如果不存在并且系统中没有安装过nx的话至1;
否则安装过nx,但需要把nx改成用root用户连接server的话,至3''
1. 下载安装包
wget http://64.34.161.181/download/3.4.0/Linux/nxclient-3.4.0-7.x86_64.rpm
wget http://64.34.161.181/download/3.4.0/Linux/nxnode-3.4.0-13.x86_64.rpm
wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver-3.4.0-12.x86_64.rpm
2. 安装
rpm -i nxclient-3.4.0-7.x86_64.rpm
chmod 755 /usr/lib/cups/backend/ipp
rpm -i nxnode-3.4.0-13.x86_64.rpm
rpm -i nxserver-3.4.0-12.x86_64.rpm
3. 修改ssh配置 (从头开始,使用nx版)
修改文件:/etc/ssh/sshd_config
即在没有AuthorizedKeysFile选项的情况下添加:
AuthorizedKeysFile /usr/NX/home/nx/.ssh/authorized_keys2
脚本:
cp -f /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
echo "AuthorizedKeysFile /usr/NX/home/nx/.ssh/authorized_keys2" >> /etc/ssh/sshd_config
service sshd restart
至4
3' 修改ssh配置 (从头开始,使用root版,此版可以使centos的nx和putty免密码同时使用)
修改文件:/etc/ssh/sshd_config
即在没有AuthorizedKeysFile选项的情况下添加:
AuthorizedKeysFile /usr/NX/home/nx/.ssh/authorized_keys2
cp -f /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sed -e "s/#AuthorizedKeysFile/t.ssh//authorized_keys/AuthorizedKeysFile/t.ssh//authorized_keys2/g"
/etc/ssh/sshd_config | sed -e "s/AuthorizedKeysFile //usr//NX//home//nx//.ssh//authorized_keys2/#/g" >
/etc/ssh/sshd_config.new
mv -f /etc/ssh/sshd_config.new /etc/ssh/sshd_config
如果不另加passwd,至4'; 否则至4''
3'' 修改ssh配置 (原来使用nx,后改用root版)
修改文件:/etc/ssh/sshd_config
cp -f /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sed -e "s/#AuthorizedKeysFile/t.ssh//authorized_keys/AuthorizedKeysFile/t.ssh//authorized_keys2/g"
/etc/ssh/sshd_config | sed -e "s/AuthorizedKeysFile //usr//NX//home//nx//.ssh//authorized_keys2/#/g" >
/etc/ssh/sshd_config.new
mv -f /etc/ssh/sshd_config.new /etc/ssh/sshd_config
如果不另加passwd,至4'; 否则至4''
4. 更改nxserver配置文件(使用nx版):
修改文件:/usr/NX/etc/server.cfg
要修改的项:
EnableAutokillSessions = "1" 能够允许杀掉旧的进程
EnableUnencryptedSession = "0" 禁止不加密的session
centos安装nx完整版
最新推荐文章于 2024-05-23 11:32:05 发布