Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

Sunday 29 April 2018

How to install and configure samba server in RHEL 7 or redhat linux 7

Login on Samaba server
Check samba rpm installed or not, if not installed please install it,

[root@localhost ~]# rpm -qa | grep samba
[root@localhost ~]# yum install samba*

Create a directory in root file system which is shared with client.

[root@localhost ~]#mkdir -p /home/testuser/test

Add a new group or can use existing group

To provide access on shared directory,Here we are adding new group called samba

[root@localhost ~]#groupadd samba

Change the group and permission of sharing folder

[root@localhost ~]#chgrp -R samba /home/testuser/test
[root@localhost ~]#chmod -R 777 /home/testuser/test

create user, add into group and set samba password

[root@localhost ~]#useradd testuser
[root@localhost ~]#usermod -G samba testuser
[root@localhost ~]#smbpasswd -a testuser

Now Edit /etc/samba/smb.conf file

Note: Please take a backup of origianl file.

[root@localhost ~]#cd /etc/samba/
[root@localhost ~]#cp -p smb.conf smb.conf.orig

And add the below given contents in last line of /etc/samba/smb.conf file.

vi /etc/samba/smb.conf

[test]
comment = shared-directory
path = /home/testuser/test
public = no
valid users = testuser, @samba
writable = yes
browseable = yes
create mask = 0774
directory mask = 4774

##Edit these lines in /etc/samba/smb.conf . To allow network to reach samba server

interfaces = lo ens32 192.168.1.0/24
hosts allow = 127. 192.168.1.

security = user
passdb backend = tdbsam
netbios name = localhost
server string = Samba Server localhost
workgroup = MYGROUP
log file = /var/log/samba/samba.log
max log size = 50
security = server

Add services in /etc/services files

vi /etc/services
 
netbios-ns    137/tcp    # netbios name service
netbios-ns    137/udp    # netbios name service
netbios-dgm    138/tcp    # netbios datagram service
netbios-dgm    138/udp    # netbios datagram service
netbios-ssn    139/tcp    # netbios session service
netbios-ssn    139/udp    # netbios session service

Note: Please check these above ports are open from this samba server to client machine

Now start the smb and nmb services.

systemctl start smb.service
systemctl start nmb.service

Enable smb and nmb service at booting of system

systemctl enable smb.service
systemctl enable nmb.service

Note 1: firewalld service not enable on this server so no need to add any rule.
Note 2: selinux is in permissive state so no need to change the selinux security context.

Now login on window machine

and mount this samba share on the server.

\\localhost.redhat.com\test

Tuesday 24 April 2018

How to install or upgrade VMware Tools on linux server

You need to login on the server where you need to install or upgrade the vmware tool.

Check the status of vmtools from vcenter GUI & Servers.

/etc/vmware-tools/services.sh status

Please follow the below steps to install or upgrade the VMware Tools:-

1.    From vsphere select the virtual machine on which vmtools need to be installed and then Choose VM > Install VMware Tools.

2. As root mount the VMware Tools virtual CD-ROM image to /mnt

mount /dev/cdrom /mnt

3. go to /tmp and untar the installation file.

cd /tmp
tar zxf /mnt/VMwareTools-x.0.0-<xxxx>.tar.gz

4. Run the VMware Tools installer:

cd /tmp/vmware-tools-distrib

./vmware-install.pl -d
 
Unmount of the VMware Tools virtual CD-ROM image is done automatically.

Login to server as root and run below command to start the services:

/etc/vmware-tools/services.sh start


Run below command to check the status of vmtools:

/etc/vmware-tools/services.sh status

Uninstall the vmtools by running below command:

/usr/bin/vmware-uninstall-tools.pl