Root user is the most authoritative user on linux operating systems. You can take measure for security with disable root ssh. You can connect to server with other users. Edit sshd_config vi /etc/ssh/sshd_config #LoginGraceTime 2m #PermitRootLogin yes #StrictModes yes Note : “PermitRootLogin yes” is default value. This value allows ssh root login You have to…
Category: Linux & Unix
Oracle DbLink With Odbc Connection From Oracle to MsSQL Server With FreeTDS
I will use Oracle 11g R2 database and SQL Server 2008 R2 on this example. If you want to connect from Oracle to SQL Server, you can use freeTDS connection library on Oracle Linux systems. If we use Windows Server for Oracle database, we can use direct Windows ODBC Driver Manager. On the other hand,…
Vi Editor on Linux
Vi editor very useful text editor on linux systems. Below commands most use commands. Vi Editor Commands i > insert ESC + q! > exit without save ESC + wq! > exit with save ESC + w! > only save /searchtext > search to down ?searchtext < search to up n > next text of…
Mail Send With Python
Mail Send Function | File name : sender.py import string import smtplib from email.mime.text import MIMEText def mailSend(subject,content): mailserver = “192.168.5.2” # Mail Server IP Address mail = MIMEText(content) mail[“From”] = “fromaddress@example.com” mail[“To”] = “toaddress@example.com” mail[“Subject”] = subject gonder = smtplib.SMTP(mailserver) gonder.sendmail(mailfrom,mailto,mail.as_string()) gonder.quit() Notification Example for Disk Status Check | File name : diskcheck.py from…
Copy Backup File from ASM to Local Disk
If you want to migrate backup or archivelog files from asm disks to local disk, you can use below command. But you have to create a directory to migrate backup and this directory owner have to be grid user. Copy File Command [grid ~]# asmcmd ASMCMD> cd FRA/backups ASMCMD> cp mynewbackupname.bck /localdiskpath/mybackup.bck
Frequently Used Linux Commands And Details
copy Basic Copy [root@test ~]# cp -R /olddirectory/ /newdirectory/ -R parameter mean that copy all subfiles and subdirectories Copy directories and files with permissions [root@test ~]# cp -R -pf /olddirectory/ /newdirectory/ blkid blkid have been using for show uuid of disk partitions. You can use uuid to add in /etc/fstab file. fstab For show all…
Give Sudo Permission to User on Oracle Linux
Linux has a robust permissions system. As it enables a clear separation of roles among users, especially between the root user and your average user. Sometimes, though, you might want your average user to have some or all of root’s privileges. You can give this permissions with sudo. Give Sudo Permission [root@test ~]# visudo Note…
Oracle and Grid User bash_profile Example on Linux
bash_profile for Oracle user # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs if [ $USER = “oracle” ]; then if [ $SHELL = “/bin/ksh” ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi…
Create Oracle Asm Disks on Oracle Linux
I will create three asm disks for GRID, FRA and DATA on Oracle Linux 6.3 on VMware. Asm disks will be GRID sdc, DATA sdd, FRA sde. Partition the Disks List Disks [root@test01 dev]# ls sd* sda sda1 sda2 sdb sdb1 sdc sdd sde For 1. Disk [root@test01 dev]# fdisk /dev/sdc Device contains neither a…
SSH Connectivity Configuration For Cluster Nodes on Oracle Linux
SSH connectivity configuration provides connection among nodes without using password. If you configure ssh, nodes can connect with ssh without password. SSH configuration parameters are in path which is /home/username/.ssh/ . You have to make SSH configuration in connection user’s home directory. For example if you use oracle user for ssh connection, you have to…