Posts

Run DB scripts in background mode - Oracle 19c

To execute Oracle Database queries in the background, allowing the process to persist even if the Linux server console is closed or the user logs out, use the following command: nohup sqlplus -S username/’password’@service_name @script_name.sql > log_file. log 2>&1 & Output: The query execution details will be logged in log_file.log for review. You can monitor the process in real-time by using the following command: tail -f log_file.log

Linux File Permissions – Quick Short Note

Image
This is the file permissions looks like in the Linux systems There are 3 main objects. u - User (owner) g - Group (users in the same group that file owner also includes) o - Others (everyone else) Permission types  r - read w - write x - execute  How to change the file permission   We can use "chmod" command as below chmod 775 filename

Reverse proxy setup with httpd service - RHEL 9

Image
Install httpd dnf install httpd Check httpd service status  systemctl status httpd systemctl start httpd systemctl enable httpd Httpd service configurations path cd /etc/httpd Httpd service configurations file /etc/httpd/conf/httpd.conf Httpd logs /var/log/httpd/access_log /var/log/httpd/error_log Add proxy modules to httpd configs cd /etc/httpd/conf.modules.d/ vi 00-proxy.conf Add following 2 lines in to the file 00-proxy.conf LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so Create a new virtual host configuration file cd /etc/httpd/conf.d touch my-reverse-proxy.conf Add following configs <VirtualHost *:80>     ServerName maleeshatst.codegen.net     ProxyPreserveHost On     ProxyRequests Off     ProxyPass / http://192.168.2.118:8080/     ProxyPassReverse / http://192.168.2.118:8080/     <Proxy *> ...

Setup sqlplus for AWS RDS Oracle DB in a Linux server

Image
Step 1 :  Download the packages URL : https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html We need below 2 files.  instantclient-basic-linux.x64-23.8.0.25.04.zip nstantclient-sqlplus-linux.x64-23.8.0.25.04.zip The version of above packages can be changed.  Make a new dir for the oracle configurations and extract the 2 zip files in the same location. mkdir -p /root/oracle/instantclient_23_8 Step 2 : Create  tnsnames.ora file touch /root/oracle/instantclient_23_8/network/admin/tnsnames.ora Content is below service name =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = maleesha- lr.c700eh08fac4.eu-west-2.rds.amazonaws.com )(PORT = 1521))     (CONNECT_DATA =       (SERVICE_NAME = service_name )     )   ) Step 3 : Set env variables for the linux user in the bash profile  export ORACLE_HOME=/root/oracle/instantclient_23_8 export PATH= $ORACLE_HOME : $PATH export LD_LIB...

ArgoCD Installation

Image
Argo-CD is a Kubernetes-native continuous deployment (CD) tool. Unlike external CD tools that only enable push-based deployments, Argo CD can pull updated code from Git repositories and deploy it directly to Kubernetes resources. Official documentation :  https://argo-cd.readthedocs.io/en/stable/ 1. ArgoCD Installation Step 1 : Login to the relevant Kubernetes cluster and Create new namespace for argoCD  kubectl create namespace argocd Step 2: Download the argoCD installation manifest. Get the link from argoCD official documentation - https://argo-cd.readthedocs.io/en/stable/getting_started/#1-install-argo-cd curl -s https://raw.githubusercontent.com/argoproj/argo-cd/ v2.11.3 /manifests/install.yaml -o install.yaml Step 3: Apply the installation manifest to the new namespace  kubectl apply -n argocd -f install.yaml Step 4: Change the service type from ClusterIP to NodePort in the service called “ argocd-server ” kubectl edit svc argocd-server -n argocd Step 5 : Bef...