Saturday, June 28, 2014

Install VNC Server in Centos

Installing TightVNC Server

[root@bhagwat ~]# yum install tigervnc-server

Create 1 User for VNC

[root@bhagwat ~]# useradd bhagwat
[root@bhagwat ~]# passwd bhagwat
Changing password for user bhagwat.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Set VNC Password for User

[root@bhagwat ~]# su - bhagwat

[bhagwat@bhagwat ~]$ vncpasswd
Password:
Verify:

[bhagwat@bhagwat ~]$ exit


Now set the Xstarup Resolution

Go to
[root@bhagwat ~]# vi /etc/sysconfig/vncservers

Add the following lines at the bottom of file

## Single User ##
VNCSERVERS="1:bhagwat"
VNCSERVERARGS[1]="-geometry 1024x768"

Save & quit the file

Now start the VNC Server with below command

[root@bhagwat ~]# /etc/init.d/vncserver start
Starting VNC server: 1:bhagwat
New 'bhagwat.imcl:1 (bhagwat)' desktop is bhagwat.imcl:1

Starting applications specified in /home/bhawgat/.vnc/xstartup
Log file is /home/bhagwat/.vnc/bhagwat.imcl:1.log
                                                                                     [  OK  ]


Now Download VNC Viewer from Client machine & enter the VNC Server IP along with VNC ID(1 in our case)
Ex. if VNC server IP is 192.168.4.200 & your VNC ID is 1 then it should be
192.168.4.200:1

Enter password that we created with “vncpasswd” command.

##########
Disable SELinux & iptables if you are not able to access the shared directory

Tuesday, June 17, 2014

Samba Server Configuration in Centos 6 with Full Access


Install Samba with yum
[root@bhagwat ~]# yum install samba

Create a directory with full access
[root@bhagwat ~]# mkdir -p /home/software 
[root@bhagwat ~]# chmod -R 0777 /home/software

Edit smb.conf file (change the following line)
[root@bhagwat ~]# vi /etc/samba/smb.conf 
## Line no 75 - Change the to windows default workgroup 
      workgroup = WORKGROUP 

## Line no 81 - Uncomment and set the IP Range 
      hosts allow = 127. 192.168.4. 

## Line 102 - set no authentication 
      security = share 

## Add the following lines at the bottom 
   [Softwares] 
path = /home/software 
writable = yes 
browseable = yes 
guest ok = yes 
create mode = 0777 
directory mode = 0777

Save & exit the samba file & Start the samba service with below command
[root@bhagwat ~]# /etc/init.d/smb start


##########
Disable SELinux & iptables if you are not able to access the shared directory