You can build and manage Windows Server Message Block (SMB) v3 (Samba) shares in an Oracle Cloud Infrastructure (OCI) instance, and export files to the compute instance.
Prerequisites and Considerations
Before you begin:
-
Connect to the compute instance. See Accessing an Instance.
-
Ensure the latest version of the Oracle Linux image is installed on the instance. See Installing Software and the relevant guide for the chosen image:
-
Learn about Samba and how to use Samba with Oracle Linux. See the relevant Managing Samba guide for the chosen Oracle Linux image:
-
Learn how to use the OCI Block Volume service to provide backups of OCI storage. For more information, see Overview of Block Volume Backups.
-
Decide how to create the Samba share:
Creating a Samba Share In an OCI Instance
To create a Samba share in an OCI instance from the command line:
-
Follow the instructions in the
Managing Samba guide for the chosen Oracle Linux image and specify the following:
-
For the samba_server value, enter the IP address or host name of the OCI instance.
-
In the File Settings section of the Samba configuration file, enter the path and name of the share on the OCI instance.
-
Access the Samba share. See Accessing NFS and Samba Shares.
Creating a Samba Share In an OCI Instance Using Cockpit
You can create a Samba share in a compute instance from the Cockpit web console by using the Cockpit file sharing plugin.
To create a Samba share using the Cockpit web console:
- Review the information in the Managing Samba guide for the chosen Oracle Linux image.
- Install and configure Samba on the OCI instance.
For example:
sudo dnf install samba samba-common samba-client -y
-
Allow Cockpit to configure Samba by editing the /etc/samba/smb.conf
Samba configuration file, and adding include = registry
in the global
section of the file.
For example:
....
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups option = raw
include = registry
....
Adding the registry
value to the Samba configuration file lets you view the Samba tab in the Cockpit web console.
-
On the instance, install and enable Cockpit. See Install and Enable Cockpit.
-
Use DNF to install the cockpit-file-sharing
package.
The cockpit-file-sharing
package is in the DNF developer_EPEL
repository, and you must enable the repository before installing the package.
For example:
sudo yum-config-manager --enable ol<version>_developer_EPEL
sudo dnf install cockpit-file-sharing
Note
Packages in the developer_EPEL
repositories are considered unsupported and are only entitled to basic installation support. Content from this repository isn't recommended for production environments and is intended for development use only.
-
Sign in to Cockpit. See Log in to the Cockpit Web Console.
-
Create a Samba share:
-
Select File Sharing, and then select the Samba tab.
-
In the Share Management section of the page, select the blue plus sign (+) button.
The Add New Share window is displayed.
-
Enter the name of the Samba share, and the path to the share on the compute instance.
-
Optionally select the Oracle Linux users and groups, and specify the type of file access you want to grant them.
Samba uses existing Oracle Linux users, but you can set different passwords for file access through the Cockpit web console.
-
Select Add Share.
-
Access the Samba share. See Accessing NFS and Samba Shares.