Skip to content

Instantly share code, notes, and snippets.

@ngocdon0127
Forked from antoniojxk/vnc-on-centos-6.md
Last active April 1, 2018 06:53
Show Gist options
  • Select an option

  • Save ngocdon0127/f1eebbb813ecab0cd6d5503524457fbb to your computer and use it in GitHub Desktop.

Select an option

Save ngocdon0127/f1eebbb813ecab0cd6d5503524457fbb to your computer and use it in GitHub Desktop.

Revisions

  1. ngocdon0127 revised this gist Apr 1, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@ https://www.server-world.info/en/note?os=CentOS_6&p=x&f=2
    * install vnc-server (tigervnc-server on cenOS 6.8.)

    ```bash
    [root@apaternina nfs]# yum groupinstall Desktop
    [root@apaternina nfs]# yum install gnome-core xfce4 firefox
    [root@apaternina nfs]# yum install tigervnc-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
  2. @antoniojxk antoniojxk revised this gist Apr 7, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # Links
    # Intall VNC Server and Client on CentOS 6.8
    ## Links
    https://wiki.centos.org/HowTos/VNC-Server
    https://www.server-world.info/en/note?os=CentOS_6&p=x&f=2

  3. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ https://www.server-world.info/en/note?os=CentOS_6&p=x&f=2
    * install vnc-server (tigervnc-server on cenOS 6.8.)

    ```bash
    [root@apaternina nfs]# yum install vnc-server
    [root@apaternina nfs]# yum install tigervnc-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
  4. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -102,7 +102,7 @@ iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Flushing firewall rules: [ OK ]
    iptables: Unloading modules: [ OK ]
    iptables: Applying firewall rules: [ OK ]
    ``
    ```

    * Start the VNC service.

  5. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    # Links
    https://wiki.centos.org/HowTos/VNC-Server
    https://www.server-world.info/en/note?os=CentOS_6&p=x&f=2

    * install vnc-server (tigervnc-server on cenOS 6.8.)

    ```bash
  6. @antoniojxk antoniojxk revised this gist Apr 1, 2017. No changes.
  7. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -118,9 +118,6 @@ Log file is /home/vnc-user/.vnc/apaternina:1.log
    ```bash
    vncviewer 192.168.56.100:1
    ```
    * Additional optional enhancements





  8. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -114,6 +114,10 @@ Log file is /home/vnc-user/.vnc/apaternina:1.log
    [ OK ]
    ```
    * Test each VNC user.

    ```bash
    vncviewer 192.168.56.100:1
    ```
    * Additional optional enhancements


  9. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 31 additions and 0 deletions.
    31 changes: 31 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -81,7 +81,38 @@ Shutting down VNC server: 1:vnc-user [ OK ]

    -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
    ```

    * make changes to iptables persistent

    ```bash
    [root@apaternina apaternina]# service iptables save
    iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
    ```

    * restart iptables

    ```bash
    [root@apaternina ~]# service iptables restart

    iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Flushing firewall rules: [ OK ]
    iptables: Unloading modules: [ OK ]
    iptables: Applying firewall rules: [ OK ]
    ``

    * Start the VNC service.

    ```bash
    [root@apaternina ~]# service vncserver start
    Starting VNC server: 1:vnc-user xauth: (stdin):1: bad display name "apaternina:1" in "add" command
    New 'apaternina:1 (vnc-user)' desktop is apaternina:1
    Starting applications specified in /home/vnc-user/.vnc/xstartup
    Log file is /home/vnc-user/.vnc/apaternina:1.log
    [ OK ]
    ```
    * Test each VNC user.
    * Additional optional enhancements

  10. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -74,10 +74,13 @@ Shutting down VNC server: 1:vnc-user [ OK ]
    [root@apaternina ~]# chkconfig vncserver on
    ```

    * Amend the iptables.

    ```bash
    [root@apaternina ~]# vi /etc/sysconfig/iptables

    * Create and customize xstartup scripts.
    * Amend the iptables.
    -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
    ```
    * Start the VNC service.
    * Test each VNC user.
    * Additional optional enhancements
  11. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -60,9 +60,22 @@ exit
    * Confirm that the vncserver will start and stop cleanly.

    ```bash
    [root@apaternina ~]# service vncserver start
    Starting VNC server: 1:vnc-user xauth: (stdin):1: bad display name "apaternina:1" in "add" command

    New 'apaternina:1 (vnc-user)' desktop is apaternina:1

    Starting applications specified in /home/vnc-user/.vnc/xstartup
    Log file is /home/vnc-user/.vnc/apaternina:1.log

    [ OK ]
    [root@apaternina ~]# service vncserver stop
    Shutting down VNC server: 1:vnc-user [ OK ]
    [root@apaternina ~]# chkconfig vncserver on
    ```



    * Create and customize xstartup scripts.
    * Amend the iptables.
    * Start the VNC service.
  12. @antoniojxk antoniojxk revised this gist Apr 1, 2017. No changes.
  13. @antoniojxk antoniojxk revised this gist Apr 1, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,11 @@ exit
    ```

    * Confirm that the vncserver will start and stop cleanly.

    ```bash

    ```

    * Create and customize xstartup scripts.
    * Amend the iptables.
    * Start the VNC service.
  14. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,18 @@ VNCSERVERARGS[1]="-geometry 640x480"

    * Set your users' VNC passwords.


    ```bash
    [root@apaternina nfs]# su vnc-user
    [vnc-user@apaternina nfs]$ vncpasswd
    Password:
    Verify:
    [vnc-user@apaternina nfs]$ cd /home/vnc-user/.vnc/
    [vnc-user@apaternina .vnc]$ ls
    passwd
    [vnc-user@apaternina .vnc]$ exit
    exit
    [root@apaternina nfs]#
    ```

    * Confirm that the vncserver will start and stop cleanly.
    * Create and customize xstartup scripts.
  15. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -35,8 +35,17 @@ $ su -

    * Edit the server configuration.

    ```bash
    vi /etc/sysconfig/vncservers

    VNCSERVERS="1:vnc-user"
    VNCSERVERARGS[1]="-geometry 640x480"
    ```

    * Set your users' VNC passwords.



    * Confirm that the vncserver will start and stop cleanly.
    * Create and customize xstartup scripts.
    * Amend the iptables.
  16. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    * install vnc-server (tigervnc-server on cenOS 6.8.)

    ```
    ```bash
    [root@apaternina nfs]# yum install vnc-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    @@ -14,7 +14,7 @@ Nothing to do

    * install vnc client

    ```
    ```bash
    [root@apaternina nfs]# yum install vnc
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    @@ -28,7 +28,7 @@ Nothing to do

    * Create the VNC users accounts

    ```
    ```bash
    $ su -
    # useradd vnc-user
    ```
  17. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ Nothing to do
    ```
    $ su -
    # useradd vnc-user
    ```
    ```

    * Edit the server configuration.

  18. @antoniojxk antoniojxk revised this gist Mar 31, 2017. No changes.
  19. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -27,10 +27,15 @@ Nothing to do
    ```

    * Create the VNC users accounts
    ```

    ```
    $ su -
    # useradd vnc-user
    ```

    * Edit the server configuration.


    * Set your users' VNC passwords.
    * Confirm that the vncserver will start and stop cleanly.
    * Create and customize xstartup scripts.
  20. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,18 @@ Package tigervnc-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```

    * Create the VNC users accounts
    ```
    ```
    * Edit the server configuration.
    * Set your users' VNC passwords.
    * Confirm that the vncserver will start and stop cleanly.
    * Create and customize xstartup scripts.
    * Amend the iptables.
    * Start the VNC service.
    * Test each VNC user.
    * Additional optional enhancements



  21. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,6 @@ Package tigervnc-server-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```



    * install vnc client

    ```
  22. @antoniojxk antoniojxk revised this gist Mar 31, 2017. No changes.
  23. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -32,3 +32,5 @@ Nothing to do





  24. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -28,3 +28,7 @@ Package tigervnc-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```





  25. @antoniojxk antoniojxk revised this gist Mar 31, 2017. No changes.
  26. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@ Package tigervnc-server-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```



    * install vnc client

    ```
  27. @antoniojxk antoniojxk revised this gist Mar 31, 2017. No changes.
  28. @antoniojxk antoniojxk revised this gist Mar 31, 2017. No changes.
  29. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -24,4 +24,5 @@ Loading mirror speeds from cached hostfile
    * updates: centos.uniminuto.edu
    Package tigervnc-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```
    ```

  30. @antoniojxk antoniojxk revised this gist Mar 31, 2017. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion vnc-on-centos-6.md
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,14 @@ Nothing to do

    * install vnc client

    test
    ```
    [root@apaternina nfs]# yum install vnc
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * base: centos.uniminuto.edu
    * extras: centos.uniminuto.edu
    * updates: centos.uniminuto.edu
    Package tigervnc-1.1.0-18.el6.x86_64 already installed and latest version
    Nothing to do
    ```