Skip to main content

Posts

Showing posts with the label Linux

curl a subsitute of telnet

<<Back to Linux Main Page   How to Check if port to a remote server is open or not to check if the port XYZ to a remote server ABC is open or not you can use telnet telnet  ABC  XZY $telnet host1 1521 But many times we realize that the package telnet is not installed we can use curl in that case How to Check if port to a remote server is open or not without using telnet curl http://192.250.65.175:1521 curl: (7) Failed to connect to 192.250.65.175 port 1521: Connection refused

Deleting Files Older Than x Days on Linux

<<Back to Linux Main Page   How to Delete file older than 10  days $fin d /u01/log/ -type f -mtime +10 -exec rm -f {} \; Deleting files older than 10 Hours $ find /u01/log/ -type f  -mmin +600 -exec rm -f {} \; Listing top 10 files by size $du -a /u01/log / | sort -n -r | head -n 10 Counting files older than 1 days $find /u01/log/ -type f -mtime +1 |wc -l

How to grep Multiple values in Linux

<<Back to Linux Main Page How to grep multiple values from the output of a command on Linux I wanted to grep the list of patches I applied today. I have 3 patch numbers and I wanted to check if they are now present. To grep multiple values from the output of a command you can use below command $ opatch lsinventory -oh /ora_grid/product/11.2.0.4/grid |grep -e '29141201' -e '29497421' -e '29509309' Patch  29509309     : applied on Fri Aug 23 10:12:00 CEST 2019 Patch description:  "ACFS Patch Set Update : 11.2.0.4.190716 (29509309)" Patch  29497421     : applied on Fri Aug 23 10:10:59 CEST 2019 Patch description:  "Database Patch Set Update : 11.2.0.4.190716 (29497421)" Patch  29141201     : applied on Fri Aug 23 10:10:33 CEST 2019 Patch description:  "OCW Patch Set Update : 11.2.0.4.190416 (29141201)"

Important vi Editor Commands

<<Back to Linux Main Page Frequent Used Linux vi Editor Commands What is vi? vi  (visual editor) is a default editor in Linux The vi editor has 2 modes 1: command mode 2: insert mode To open a file with vi, invoke vi command as shown below vi <file_name> If the <file_name> file does not exists vi will open a new named file. After opening the file in vi editor just press i to inter into insert mode. In this mode, entered text is inserted into the file. To turn off the insert mode just press Esc (Escape) button on keyboard Important vi commands How to open a file using vi editor vi <file_name>        <=edit file starting at line 1 vi -r <file_name>    <=recover crashed file that was being edited Example: $ vi -r new_file1 How to close a file opened vi editor When you wish to exit from vi editor, first turn off the insert mode just press Esc (Escape). Now you can type the command followed by : ...

How to Configure NTP Server for Oracle RAC Installation

<<Back to Linux Main Page How to Configure NTP Server Locally Without Internet Access I wrote this post just to full fill the requirement of having NTP server for oracle RAC  installation  on your laptop. If you are installing RAC in your company NTP server already configured for time synchronization can be used.  Step1: Install Packages for NTP Mount your CD and Install following RPM if already  not installed #rpm -ivh ntp-4.2.6p5-25.0.1.el7.x86_64.rpm #rpm -ivh ntpdate-4.2.6p5-25.0.1.el7.x86_64.rpm Step2: Configure   /etc/ntp.conf Edit /etc/ntp.conf file and locate the below entry and uncomment it. Also modify IP address and mask according to your network restrict 192.9.1.0 mask 255.255.255.0 nomodify notrap Step3: Comment out the default ntp servers listed in /etc/ntp.conf. In my case it is #server 0.rhel.pool.ntp.org iburst #server 1.rhel.pool.ntp.org iburst #server 2.rhel.pool.ntp.org iburst #server 3.rhel.pool.n...

How to Configure DNS Server for Oracle RAC Installation

<<Back to Linux Main Page To resolve the SCAN IPs in round robin fashion you need DNS configuration. If you are installing RAC on your laptop for practice purpose, It is obvious that you don't have DNS server. In this post I will explain you, how you can configure DNS server which you can use to resolve SCAN IPs to install and configure oracle RAC Step by Step How to Configure DNS Server for  Oracle RAC Installation Step1: Install Bind Packages Bind packages are required to configure DNS. Check whether the required bind packages are installed. To see what packages are installed you can use rpm or yum command #rpm –qa bind* #yum list installed  bind* Install individual packages using yum or rpm Utility. Here I am using rpm #rpm -ivh bind-9.9.4-37.el7.x86_64.rpm #rpm -ivh bind-dyndb-ldap-10.0-5.el7.x86_64.rpm #rpm -ivh bind-libs-lite-9.9.4-37.el7.x86_64.rpm #rpm -ivh bind-utils-9.9.4-37.el7.x86_64.rpm #rpm -ivh bind-libs-9.9.4-37.el7.x86_64.rpm #r...

Step by Step How to Configure Shared Storage for Oracle RAC Using Openfiler

<<Back to Oracle RAC Main Page Configuring Shared Storage  for Oracle RAC Using Openfiler Step1: Install Openfiler Storage Management Appliance.  You can find Step by step instruction at  How to Install OpenFiler Storage Management Appliance Step2: Login to Openfiler Login to your openfiler with username openfiler and Default Password password. After  successful Installation of openfiler GUI is accessible at port 446. https://192.9.1.105:446/ Step3: Add Storage Clients Navigate to System tab and enter the Name of all the Client Servers who will Access the storage provided by this openfiler. To save the entry just click update Step4: Create and Configure Storage volume Navigate to Volumes tab and click on the link "create new physical volumes" You will be navigated to the below page. on this page just select the disk listed in the Edit Disk column On this page just click Create The physical volume is now successfu...

How to Install OpenFiler Storage Management Appliance

<<Back to Linux Main Page Step by Step How to Install Openfiler Where Can I download Openfiler Software? You can download the openfiler from below link https://www.openfiler.com/community/download Step by Step How to Install Openfiler Storage Management Appliance Step1: Prepare Virtual  Machine for openfiler  Installation Create your virtual machine with configuration as shown below                 1 CPU                 1GB RAM                 500 GB HDD (this is virtual space and you need not to have this much space physically available)                 1 NIC      Visit my post how-to-create-new-virtual-machin...