Instalamos nuestro paquete freenx desde consola con yum
[root@syswoody~]# yum install freenx nxRunning TransactionWarning: RPMDB altered outside of yum. Installing : nx-3.5.0-2.el6.centos.x86_64 1/2 Installing : freenx-0.7.3-9.el6.centos.x86_64 2/2Parando sshd: [ OK ]Iniciando sshd: [ OK ]Iniciando freenx-server: [ OK ]
Installed: freenx.x86_64 0:0.7.3-9.el6.centos nx.x86_64 0:3.5.0-2.el6.centos
Complete!
Activo la autenticacion con passwd
vi /etc/nxserver/node.conf
cambio
#ENABLE_PASSDB_AUTHENTICATION=»0″
POR
ENABLE_PASSDB_AUTHENTICATION=»1″
Ahora creamos nuestro usuario
[root@syswoodysetup]# /usr/bin/nxserver –restart
NX> 100 NXSERVER – Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 123 Service stopped
NX> 122 Service started
NX> 999 Bye
[root@syswoodysetup]# /usr/bin/nxserver –adduser tecno
NX> 100 NXSERVER – Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 500 Error: User tecno already in database.
NX> 999 Bye
[root@syswoodysetup]# /usr/bin/nxserver –passwd tecno
NX> 100 NXSERVER – Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
New password:
Password changed.
NX> 999 Bye
Copiamos nuestro clave de ssh y la pegamos en nuestro cliente
[root@SRVSERVIJOSTOM nx]# cat /etc/nxserver/client.id_dsa.key
—–BEGIN DSA PRIVATE KEY—–
vi /etc/nxserver/node.conf
# This directives controls the verbosity of the server-wide log.
# 0: No Logging
# 1: Errors
# 2: Warnings
# 3: Important information
# 4: Server – Client communication
# 5: Information
# 6: Debugging information
# 7: stderror of some applications
NX_LOG_LEVEL=5
con
[root@SRVSERVIJOSTOM nx]# tail -f /var/log/nx/nxserver.log
vemos el siguiente mensaje
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate “/home/mattnx/.nx/F-C-mattcom1-1000-1C6F198B66C712B066D30A14269FD76E/session”. You might also want to try: ssh -X myserver; /usr/libexec/nx/nxnode –agent to test the basic functionality. Session log follows:
/usr/libexec/nx/nxserver: line 1531: 5052 Terminated sleep $AGENT_STARTUP_TIMEOUT
NX> 1006 Session status: closed
Can’t open /var/lib/nxserver/db/running/sessionId{1C6F198B66C712B066D30A14269FD76E}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{1C6F198B66C712B066D30A14269FD76E}’: No such file or directory
NX> 1001 Bye.
/usr/libexec/nx/nxserver: line 562: kill: (4746) – No such process
NX> 280 Exiting on signal: 15
Ahora testeamos nuestro agente y aparece el siguiente mensaje
[root@syswoody nxserver]# nxagent
Error: Aborting session with ‘Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
La solucion pasa por cambiar el DISPLAY_BASE=1000 dentro del node.conf
‘DISPLAY_BASE=1000′ to ‘DISPLAY_BASE=1001′.
Lo ponemos a 1001 reiniciamos y listo.