Showing posts with label Port on DBCS. Show all posts
Showing posts with label Port on DBCS. Show all posts

Monday, 5 February 2018

Oracle DBCS : Configure and Use VNC (GUI) On Oracle Cloud Compute Node

When you create a Database Deployment in Oracle Database Cloud Service, the following tasks are completed for you:
  • Compute Node Allocated
  • Storage Allocated
  • Virtual Machine Image Installed
  • Set Keys and Privileges
  • Install and Configure Database
  • Configure Backup
  • Configure Tools
  • Configure Access

Network access to the Compute Node associated with Oracle Database Cloud Service is primarily provided by SSH connections on port 22. By default SSH port 22 is opened to allow access to the tools, utilities and other resources on the Compute Node associated with the Oracle Database Cloud Services. You can use SSH client software such as PuTTY on Windows to establish a secure connection and log in as "opc" or "oracle" user. You can also connect to Compute node using GUI interface, for this you can use VNC.

In this article we will demonstrate how to connect to Compute Node using VNC.

Prerequisites
  • IP address of Compute Node
  • TigerVNC Viewer client software
  • TigerVNC Server package installed on Compute Node


Steps to connect to Oracle Database Cloud Compute Node using VNC on Windows Operating System


  • Login to the Oracle Cloud Compute Node 


Open PuTTY session on your desktop and enter Compute Node IP address


  • On the left pane, expand "SSH" and select "Auth". On the right pane, click on "Browse" button. Select the Private Key that matches the Public Key for your Deployment. Click "Open"


  • Enter login as "opc". This will connect you to the compute node without password


  • Switch to root by executing "sudo -s" command. Confirm that you are switched to root by executing "id" command


  • Verify your Operating System version. Here the OS is OEL and version is 6 with update 8


  • Navigate to the yum repository directory and open the public yum repository file


  • In the file look for your operating system version, example ol6_latest and make sure "enabled=1" is set


  1. Next look for operating system base update, example ol6_u8_base and make sure "enabled=1" is set


  • Verify the file is updated successfully


  • Install the Tigervnc* package using the yum utility


  • Type y and hit return


  • We can see that the package installation completed successfully


  • Verify that the package is installed using rpm -qa command


  • Verify if vnc server is running or not as root and oracle user. We can see that vnc server is not running


  • Let's start the vnc server as oracle users. Enter a password of your choice and verify. From the 'ps -ef|grep vnc' command output note down the port numbers :1 and 5901


  • Open Tiger VNC Viewer on your desktop/laptop and enter the port :1


  • Connection failed.... This is because the port 5901 is not opened on the Compute Node. We should open the port 5901 and try again



Follow the procedure below to configure custom Security List and Rules to enable access to specific security applications (VNC application and port range 5901 - 5905) on the compute node.


  • Open a web browser and enter the URL you received in the Welcome email to login to Oracle Cloud Account


  • Enter your username and password


  • On the home page, Click "Menu" under "Compute Classic" Cloud Service as shown below


  • Click "Open Service Console"


  • Click on "Network"


  • Expand "Shared Network"


  • Click "Security Applications" and then "Create Security Application"


  • Enter a Security Application Name, Port Type, Port Range Start, Port Range End and a Description and click Create. In our scenario we are enabling access to VNC application on the ports between 5901 and 5905


  • Make sure the Security Application is created by searching it


  • Click "Security Lists" and then "Create Security List"


  • Enter Security List Name and leave Inbound Policy and Outbound Policy to DEFAULT value and click Create


  • Make sure the Security List is created by searching it


  • Click "Security Rules" and then "Create Security Rule"


  • Enter the details as show below:
Name: Any desired meaningful name
Status: Enabled to enable the rule
Security Application: we create above
Source: Security IP List -> public-internet
Destination: select security list created above from drop down 
Click Create


  • Make sure the Security Rule is created by searching it


  • Click "Instances"


  • Select your Instance and scroll down


  • Click "Add Security List"


  • Select "Security List" create above from the drop down list


  • Make sure the Security List added to your Instance


  • Open VNC on your desktop/Laptop and enter the IP address of your Database Deployment


  • Enter VNC password used at the time of starting VNC server software on the compute node


  • Enter Oracle user password given at the time of configuring VNC Server to connect to the Compute node


  • We are now connected to the compute node in GUI interface using VNC

Enjoy working with Compute Node in GUI mode...


Conclusion
In this article we have learned how to connect to Oracle Cloud Compute Node using VNC in GUI Mode. To accomplish this we need to install Operating System packages and create custom Security List and Rules to enable access to specific security applications (VNC application and port range 5901 - to 5905) on the compute node. Oracle Compute Cloud Service networking create resources to provide network access to the compute node.

Tuesday, 16 January 2018

Step 10 - Oracle DBCS : Create Additional OS Users On Oracle Cloud Compute Node

When a Oracle Database Cloud deployment is created, it creates following 3 OS users:
  1. opc: This user is authorized to login to compute and execute root commands. It can use sudo -s command to switch to root.
  2. root: This user is not authorized to login to the compute node. To perform operations that requires root user access, connect to the compute node as opc user and use the sudo command.
  3. oracle: This user is authorized to login to the compute node and execute user level commands but not root commands.
If you want you can create additional operating system users to login to the compute node. The new user can perform OS standard operations, such as Install, configuring and running applications. You can provide sudo access to this user to execute sudo commands.



In this article we will demonstrate how to create additions OS users and grant the sudo permissions to execute sudo commands.



Steps to create additional OS users on Oracle Cloud Compute Node

Open PuTTY session on your desktop and enter Compute Node IP address


  • On the left pane, expand "SSH" and select "Auth". On the right pane, click on "Browse" button. Select the Private Key that matches the Public Key for your Deployment. Click "Open"


  • Enter login as "opc". This will connect you to the compute node without password. Switch to root by executing "sudo -s" command. Confirm that you are switched to root by executing "id" command.


  • Use the "useradd" command to create new user. Here we are creating a new OS user by name "nsmuser"


  • Now create the ".ssh" directory and "authorized_keys" file as shown below.


  • Copy the SSH Public key value from your desktop


  • Paste the SSH public key value to the "authorized_key" file. Save and exit the file


  • Verify the file is created and the contents of the file


  • Add the new user to the allowed users list under "sshd_config" file. Open the "sshd_config" file


  • Add the new user "nsmuser" to the the "Allowusers" line as show below. Save and exit the file


  • Verify the file is modified


  • Change the ownership and permissions of ".ssh" directory as show below. Restart the sshd daemon so the changes made to "sshd_config" can take affect.


  • Add the new user "nsmuser" to the "sudoers" file allow root access. Open the "sudoers" file as shown below


  • Add the line to the sudoers file as shown below


  • Verify that the new user is added to the sudoers file


  • Login to the Compute node using new user created above. Open PuTTY session and enter the Compute Node IP address, select the private key that matches the Public Key for your Deployment


  • Login as "nsmuser". Execute "sudo -s" to switch to root user



Conclusion


In this article we have learned about cloud database deployment OS users, how to create additional OS user and grant sudoers permissions to execute sudo commands.

Comparing Oracle Database Appliance X8-2 Model Family

September 2019 Oracle announced Oracle Database Appliance X8-2 (Small, Medium and HA). ODA X8-2 comes with more computing resources com...