View By

Categories

 

Samba Installation on OEL (Oracle Enterprise Linux), configuration and file sharing

Updated: Oct 25, 2019

Samba is a software package which gives users flexibility to seamlessly share Linux/Unix files with Windows client and vice-versa. Samba installation, configuration and file sharing is very simple on oracle linux.


Why is the need of Samba?


Let's say you’re managing two operating systems - Linux and Windows on the same computer, dual booting every day, switching between the platforms depending upon your requirement. Perhaps you’re planning to eventually move to Linux as your main operating system; or probably Windows; you might even have plans to remove Microsoft’s OS from your computer at some point soon.

One of the things holding you back is the ability to access data between operating systems. Or assume another scenario where you are running various component of Big Data architecture (Data Collection & Processing) on Linux machine but Visualization tool demands Windows file system only.



Let’s see how we can work around this problem, and get your data where you want it. I am not saying Samba is the "only" solution for this problem but yes it is one of the best solution - no cost, real-time file sharing & super-fast; what else you need?



What is Samba?


Samba is a software package which gives users flexibility to seamlessly share Linux/Unix files with Windows client and vice-versa.

With an appropriately-configured Samba server on Linux, Windows clients can map drives to the Linux file systems. Similarly, Samba client on UNIX can connect to Windows shares. Samba basically implements network file sharing protocol using Server Message Block (SMB) & Common Internet File System (CIFS).



Installation and configuring Samba (v3.6) on Linux machine (RHEL/CentOS):


1. Execute below command on your terminal to install samba packages:

yum install samba samba-client samba-common -y


2. Edit the configuration file /etc/samba/smb.conf

mv /etc/samba/smb.conf /etc/samba/smb.conf.backup

vi /etc/samba/smb.conf

and copy-paste below details in configuration file.

[global]

workgroup = EXAMPLE.COM<enter name according to your workgroup, right click on your computer properties in main menu to get it (domain or workgroup)>


server string = Samba Server %v

netbios name = centos

security = user

map to guest = bad user

dns proxy = no


#======== Share Definitions ===========================

[Anonymous]

path = /samba/anonymous


browsable =yes

writable = yes

guest ok = yes

read only = no


3. Now save the configuration file and create a Samba shared folder. Then, restart Samba services. Run below commands step by step:


mkdir -p /samba/anonymous

cd /samba


chmod -R 0755 anonymous/

chown -R nobody:nobody anonymous/

chcon -t samba_share_t anonymous/


systemctl enable smb.service

systemctl enable nmb.service

systemctl restart smb.service

systemctl restart nmb.service



4. You can check samba services by running ps -eaf | grep smbd; ps -eaf | grep nmbd


5. Now go to the windows Run prompt and type \\yourhostname\anonymous. Thats it!! You will be able to access anonymous shared drive by now.



6. If this doesn't connect to the shared folder. Please make sure your firewall services are stopped and try again. You can run below commands to stop the services.

service firewalld stop

service iptables stop

7. Now test shared folder by creating a sample text file on linux machine and opening it on windows machine.



Samba Documentation


You can find complete Samba documentation at below mentioned link. It's very well documented and can be easily understood.



If you enjoyed this post, please comment if you have any question regarding Samba Installation (on any operating system) and I would try to response as soon as possible. Thank you!


Next : How to setup Oracle Linux on Virtual Box?


#Samba #Installation #OEL #OracleLinux #Configuration #filesharing #Oracle #Linux



Interested in learning Apache Spark?


Main menu: Spark Scala Tutorial

1. Apache Spark and Scala Installation

1.1 Spark installation on Windows​

1.2 Spark installation on Mac

1.3 Pyspark installation on Windows

2. Getting Familiar with Scala IDE

2.1 Hello World with Scala IDE​

3. Spark data structure basics

3.1 Spark RDD Transformations and Actions example

4. Spark Shell

4.1 Starting Spark shell with SparkContext example​

5. Reading data files in Spark

5.1 SparkContext Parallelize and read textFile method

5.2 Loading JSON file using Spark Scala

5.3 Loading TEXT file using Spark Scala

5.4 How to convert RDD to dataframe?

6. Writing data files in Spark

​6.1 How to write single CSV file in Spark

7. Spark streaming

7.1 Word count example Scala

7.2 Analyzing Twitter texts

8. Sample Big Data Architecture with Apache Spark

9. What's Artificial Intelligence, Machine Learning, Deep Learning, Predictive Analytics, Data Science?

10. Spark Interview Questions and Answers


2,324 views1 comment

Help others, write your first blog today! 

Home   |   Contact Us

©2020 by Data Nebulae