en servidor x.x.3.1
despues de actualizar el sistema
# yum -y update
# systemctl stop firewalld
# systemctl mask firewalld
# systemctl disable firewalld
# systemctl status firewalld
Active: inactive (dead)
# vi /etc/sysconfig/iptables
#poner esta linea
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900 -j ACCEPT
# systemctl enable iptables# systemctl start iptables
#Lo tome de aqui par adehabilitar el firewa
http://www.tejasbarot.com/2014/08/02/rhel-7-centos-7-disable-firewalld-and-use-iptables/#axzz3MlvoUUe7
1. # yum install tigervnc-server -y
2 # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
Step 3 » Now open /etc/systemd/system/vncserver@:1.service file and replace
Find these lines ..
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
Replace ( Considering username as john )
ExecStart=/sbin/runuser -l john -c "/usr/bin/vncserver %i"
PIDFile=/home/john/.vnc/%H%i.pid
If you are creating for root user .
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid
Step 4 » Reload systemd for changes.
[root@krizna ~]# systemctl daemon-reload
Step 5 » Create VNC password for the user . se cambia con el usuario a ponerle la contraseña o # vncpasswd usuario
contrseña:
[root@krizna ~]$ vncpasswd
Step 6 » Enable and start the service using the below commands.
Enable service at startup ( Permanent ).
[root@krizna ~]# systemctl enable vncserver@:1.service
Start the service .
[root@krizna ~]# systemctl start vncserver@:1.service
Step 7 » Allow VNC service in firewall. Este paso n lo aplique ya que des habilite el firewall
[root@krizna ~]# firewall-cmd --permanent --add-service vnc-server
[root@krizna ~]# systemctl restart firewalld.service
despues de reinicar el servidor no me conecto y iniciando despues como ROOT
# systemctl enable vncserver@:1.service# verifico que el firewalld este apagado# systemctl status firwalldmarca incativosystemctl enable vncserver@:1.servicesystemctl start vncserver@:1.serviceme conecte por el cliente de vnc al dispaly 1 y funciono--En otra instalacion no conectaba hasta que que primero comparti el escritorio de root y le hice su vncserver@:2.service y accese desde mi vnc cliente y despues accese con el segundo usuario, este es el error que me enviaba
[root@rntapp system]# systemctl start vncserver@:1.service Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and 'journalctl -xn' for details.
[root@rntapp ~]# 'systemctl status vncserver@:1.service > ^C [root@rntapp ~]# systemctl status vncserver@:1.service vncserver@:1.service - Remote desktop service (VNC) Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled) Active: failed (Result: exit-code) since Mon 2014-12-29 01:33:18 CST; 2min 3s ago Process: 5228 ExecStart=/sbin/runuser -l administrador -c /usr/bin/vncserver %i -geometry 1280x1024 (code=exited, status=1/FAILURE) Process: 5224 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
No hay comentarios:
Publicar un comentario