Monday, January 11, 2021

Install VNC Server on Oracle Cloud Infrastructure - Compute VM's

 This will be a simple and straight guide to install vnc server on Oracle Linux on Oracle Cloud Infrastructure Compute VM's.

This post outlines the steps to install and enable tiger vnc on Oracle Linux 7.


Step 1 : Install the necessary System Group Lists 

yum group install -y "Server with GUI"

Step 2 : Install tigervnc Server

yum install -y tigervnc-server

Step 3 : Create a service file and edit for a User

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:1.service
vi /etc/systemd/system/vncserver@\:1.service

Once the file is open replace the <USER> with a OS linux user like opc/root or oracle and save the file

Step 4 : Enable and Start Vnc Server

systemctl daemon-reload
systemctl enable vncserver@\:1.service
systemctl start vncserver@\:1.service

Step 5 : Set VNC Password 

Login as the user with which we will use vnc server and use vncpasswd to set a new password.

vncpasswd

Step 6 : Open ports on Machine and Security Lists

firewall-cmd --permanent --zone=public --add-port=5901-5905/tcp
firewall-cmd --reload
firewall-cmd --permanent --zone=public --list-ports

In the Security List of your VCN, make sure to open ports 5901-5905 to access the vnc server from a vnc client like vncviewer etc.

Now from your client try the vnc server using <IP_ADDRESS>:<PORT> and Password as set in Step 5.

If you dont know on which port the vncserver is running, type vncserver it will display :1,:2 etc. For :1 the port is 5901, for :2 the port is 5902 and so on.


Add SWAP size while installing a Oracle Database 19c on Oracle Linux

 Below is the error message I received while I was trying to install Oracle Database 19c on Oracle Linux 7.

PRVF-7573 : Sufficient swap size is not available on node

As per my error on the installer screen I needed 16GB of SWAP space where as my system has just 4GB. So I need to add a swap file for the installation to continue. 

Below steps will outline the steps for the same.

dd if=/dev/sdb of=/tmp/swap01 bs=1K count=16M
chmod 600 /tmp/swap01
mkswap /tmp/swap01
swapon /tmp/swap01

Make sure the bs (*) count is equal to your required SWAP space. Also, the /dev/sdb has enough storage as needed