This guide explains how to configure VNC-server in CentOS 6.5 server. It is a very convinient way of administrating the CentOS 6.5 with the help of GUI(Graphics User Interface). The GUI can be access any where with the help of the VNC-client on any OS. The basic condition is that the connecting OS must have VNC-clients installed in it. 1 Preliminary NoteIn my case I have a fresh installed CentOS6.5 Server on which I will be installing the VNC-server so that I can access the CentOS server with GUI. You can follow the guide for the basic installation of the CentOS server till Chapter 7. Please don't install the Development Tools. All of the cases are same as per the guide. My details are as follows:
IP address 192.168.0.100
2 InstallationI am logged in my system with root, & now I will be installing the VNC-server.yum groupinstall Desktop Further installyum install gnome-core xfce4 firefox yum install tigervnc-server Now make the service on after every reboot chkconfig vncserver on 3 Adding VNC userIn my case I am using user=srijan it will differ in your case. You can use any username for the same.useradd srijan Now I will assign the vncpassword for the user with the user I just created before as: su - srijan vncpasswd [root@server1 ~]# su - srijan [srijan@server1 ~]$ vncpasswd Password:<--yourvncpassword Verify:<--yourvncpassword [srijan@server1 ~]$ Now I will make the configuration file for the vncserver by creating file as follows: vi /etc/sysconfig/vncservers Give the entries like this.
Here your port comes to be 5901 & 1024x768 resolution for the VNC client, you can choose resolution of your own choice. Now I will restart the VNC server service as root user: service vncserver restart
[root@server1 ~]# service vncserver restart Shutting down VNC server: [ OK ] Starting VNC server: 1:srijan xauth: creating new authority file /home/srijan/.Xauthority New 'server1.example.com:1 (srijan)' desktop is server1.example.com:1 Creating default startup script /home/srijan/.vnc/xstartup Starting applications specified in /home/srijan/.vnc/xstartup Log file is /home/srijan/.vnc/server1.example.com:1.log [ OK ] [root@server1 ~]# Now to make the changes affective I will kill VNC & do some more configurations as follows: pkill vnc Open the file comment the line #twm & & add the line exec gnome-session as follows: vi /home/srijan/.vnc/xstartup
& Finally reboot the machine. reboot 4 VNC ClientAt client end my OS is Ubuntu14.04 with vino installed on my client machine. Otherwise you can install any VNC-client of your choice. In case other OS say windows-7 you can install Realvnc-client or any other of your choice.
Again start the vncservice with the user srijan: su - srijan vncserver [root@server1 ~]# su - srijan[srijan@server1 ~]$ vncserver New 'server1.example.com:1 (srijan)' desktop is server1.example.com:1 Starting applications specified in /home/srijan/.vnc/xstartup Log file is /home/srijan/.vnc/server1.example.com:1.log [srijan@server1 ~]$ Now I am going to connect with the VNC server through my VNC-client
It will prompt for the password as follows:
Put yourvncpassword the same which you gave at the time of adding the user srijan. Now you are connected with the CentOS6.5 Server. In case you want to add more users to access the vnc-console you need to add the user, assign the vncpassword for the new-user as mentioned above & append the entry in the file as: vi /etc/sysconfig/vncservers For instance I am using user kishore, entries will be like this
This will enable user kishore to get the access to the VNC-server with the port 5902. In the same way you can add the root user also. Congrats you have configured the VNC-server successfully :) (责任编辑:IT) |