Posts

Showing posts from April, 2015

Oracle Database Quick Installation steps 11g Release 2 for Linux x86-64

This article is a comprehensive steps for installing Oracle Database 11 g Release 2 (11.2.0.1) on the Red Hat Enterprise Linux 6 (RHEL6)  operating environment. Both 32-bit (x86) and 64-bit (x86_64) architectures are covered in this guide. Unless otherwise noted, the installation steps are the same for either. Having said that, one of the first decisions to make before continuing with this guide is which architecture you will be using. Both Oracle and Linux must be installed on the same operating system architecture. For example, 32-bit Oracle is only supported to run on 32-bit Linux OS and 64-bit Oracle is only supported to run on 64-bit Linux OS. Install Required Linux Packages for Oracle: After installing the Linux OS, the next step is to verify and install all packages required for Oracle Database 11 g Release 2. The Oracle Universal Installer (OUI) performs checks on the machine during installation to verify that it meets the...

Defining Audit Rules

The Audit system operates on a set of rules that define what is to be captured in the log files. There are three types of Audit rules that can be specified: Control rules — allow the Audit system's behavior and some of its configuration to be modified. File system rules — also known as file watches, allow the auditing of access to a particular file or a directory. System call rules — allow logging of system calls that any specified program makes.  Audit rules can be specified on the command line with the auditctl utility (note that these rules are not persistent across reboots), or written in the /etc/audit/audit.rules file. The following two sections summarize both approaches to defining Audit rules.   Auditing goals By using a powerful audit framework, the system can track many event types to monitor and audit the system. Examples include: Audit file access and modification See who changed a particular file Detect unauthorized cha...

Nagios Client installation in Redhat Linux

Nagios Client on Remote Linux Host Step 1: Install Required Dependencies # yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel Step 2: Create Nagios User # useradd nagios Step 3: Install the Nagios Plugins # mkdir /root/nagios && cd /root/nagios # wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz # tar -xvzf nagios-plugins-2.0.3.tar.gz #  cd nagios-plugins-2.0.3 # ./configure && make && make install # chown nagios.nagios /usr/local/nagios # chown -R nagios.nagios /usr/local/nagios/libexec # yum install xinetd # cd /root/nagios # wget http://liquidtelecom.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz # tar xzf nrpe-2.15.tar.gz # cd nrpe-2.15 # ./configure && make all # make install-plugin # make install-daemon && make install-daemon-config # make install-xinetd # vim /etc/xinetd.d/nrpe only_from = 127.0.0.1 localhost <nagios_ip_address>...

HTTP (Websites) Backup script in linux

What would happen if you woke up tomorrow and your web host had accidentally deleted your website? It happened to me. And, you guessed it: I didn't have a backup. That won't ever happen to me again and I'm here to help you get prepared too. Rsync is a piece of software that allows you to copy files from one server to another. It's clever because it will only transfer files (and even just parts of files) that have changed, saving you time and bandwidth. Setting rsync up is not a straight-forward process, but if you have a second Linux server under your command, this offers a great way to backup your site incrementally [root@phpMyfaq ~]# cat /root/Scripts/HTTP_Backup #!/bin/sh # System  backup script # Full backup day - Sun (rest of the day do incremental backup) # --------------------------------------------------------------------- ### System Setup ### DIRS="/var/www/html /home /etc/httpd/" BACKUP="/root/Backup/HTML/" NOW=$(date +...

Mysql database backup script

HI,    AutoMySQLBackup with a basic configuration will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers. I am using a script to take a backup of all my databases in the Mysql. After that it will auto move backup to NAS storage. [root@phpMyfaq ~]# cat /root/Scripts/DB_Backup #!/bin/bash ## ##This script will take the backup of all ##Database of this server ## ## ######## MYSQL SETUP BACKUP ##### MUSER="root" MPASS="redhat" MHOST="localhost" MYSQL="$(which mysql)" MYSQLDUMP="$(which mysqldump)" BACKUP="/root/Backup/DB/" GZIP="$(which gzip)" NOW=$(date +"%d-%m-%Y") ### Other stuff ### EMAILID="support@example.com" ################################## DBS="$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')" for db in $DBS; do         FILE=$BACKUP/$...