Creating a simple sftp in OL8 using the free resources of OCI.

1. Provisioning Compute service.

For those who are not used to OCI, here is a description of what Compute Instances is.

The Compute service helps you provision VMs and bare metal instances to meet your compute and application requirements. An instance is a compute host. Choose between virtual machines (VMs) and bare metal instances. The image that you use to launch an instance determines its operating system and other software.

All the resources used are free, a VM with 1 OCP and 1GB of ram memory, with two 50GB block volume.

1.1 Enter the name of your instance and change the version of Oracle linux that we will use to OL8.

1.2 For those who are used to working and studying using OCI, we know that linux environments are accessed using a private key and not by user and password. In this way, download the private key and publish what the OCI will generate so that you can have access to the OL8 environment, then go to the create option.

1.3 Wait until the instance is provisioned and created.

1.4 Instance created and available for use, on the right side we have the public access ip and the user that we will use together with the private key.

2. We will add two 50gb block storage that OCI makes available for free, we will provision these two disks and we will use LVM to compose 100gb dedicated for our sftp files. Block volumes provide high-performance network storage to support a broad range of I/O intensive workloads.

2.1 Creating two free 50gb block volumes.

2.2 We will name it vol1, we will use Block Volume in the same Availability Domain as our instance with Oracle Linux 8, then we will go to the custom option to use the maximum performance of the volume allowed with the higther performance option.

2.3 Waiting for the provisioning and creation of the Block volume.

3. Adding the block volumes vol1 and vol2 in the instance Oracle Linux 8 sftp. Click on vol1, then attached instances.

3.1 We will add the vol1 and vol2 in instance laboratory1, then we will choose the type of access and device path.

3.2 Provisioning and Attaching block volumes vol1 and vol2

4. Accessing the OL8 laboratory1 instance with a private key, in this example I am using the Mobaxterm tool.

4.1 Adding block volumes vol1 and vol2 on Oracle Linux 8 iSCSI.

Run the commands copied from the iSCSI Commands tab.

5. Adding block volumes vol1 and vol2 on Oracle Linux 8 with LVM.

5.1 Creating Physical Volumes

5.2 List physical volumes created PVS.

5.3 Create volume group with size of 100gb, adding the two block volumes vol1 and vol2.

5.4 Create logical volume with 100gb for use.

5.5 Formatting volume created from LVM volsftp in xfs.

5.6 Configuring fstab to automatically mount the volume created in the LVM.

5.7 Mounting the LVM volume.

6. Installing the SFTP service on Oracle Linux 8.

6.1 Configuring SFTP.

6.2 Creating the cesar user that we will use to access sftp.

6.3 Adding the user cesar to have access to sftp.

6.4 As at OCI we access linux environments with a private key, we will have to adjust it so that the user can access by password and not by private key.

6.5 Enabling and starting the sftp service.

6.6 For security change the user’s password opc.

6.7 Testing access using wiscp with sftp on the public ip of the instance.

Categorias Linux, Oracle OCI

Um comentário em “Creating a simple sftp in OL8 using the free resources of OCI.

Deixe um comentário