tag:blogger.com,1999:blog-74785433602788830062024-02-19T20:51:24.975-08:00Linux and DevOps technical stuffKalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-7478543360278883006.post-22892672643945661352020-06-21T09:58:00.000-07:002020-06-21T09:58:22.685-07:00Install Ansible on Centos 7<div dir="ltr" style="text-align: left;" trbidi="on">
<b>What is Ansible?</b><br />
<b><br /></b>
Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intraservice orchestration, and provisioning.<br />
<br />
<b>Advantages of Ansible</b><br />
<b><br /></b>
Free: Ansible is an open-source tool.<br />
Very simple to set up and use: No special coding skills are necessary to use Ansible’s playbooks (more on playbooks later).<br />
Powerful: Ansible lets you model even highly complex IT workflows.<br />
Flexible: You can orchestrate the entire application environment no matter where it’s deployed. You can also customize it based on your needs.<br />
Agentless: You don’t need to install any other software or firewall ports on the client systems you want to automate. You also don’t have to set up a separate management structure.<br />
Efficient: Because you don’t need to install any extra software, there’s more room for application resources on your server.<br />
<br />
<b>Prerequisite</b><br />
<b><br /></b>
Generate ssh key and copy the public key to ansible server and client machines<br />
<br />
<b><i># ssh-keygen</i></b><br />
<b><i># ssh-copy-id -i .ssh/id_rsa.pub root@<machine ip></i></b><br />
<br />
<br />
<b>Step 1 — Installing Ansible</b><br />
<b><br /></b>
To get Ansible on CentOS 7, first ensure that the CentOS 7 EPEL repository is installed:<br />
<br />
# sudo yum install epel-release<br />
Once the repository is installed, install Ansible using yum:<br />
<br />
<i><b># yum install ansible</b></i><br />
<br />
<br />
<b>Step 2 — Configuring Ansible Hosts</b><br />
<b><br /></b>
Ansible keeps track of all of the servers that it knows about through a “hosts” file. We need to set up this file first before we can begin to communicate with our other computers.<br />
<br />
<b><i># vi /etc/ansible/hosts</i></b><br />
<br />
[ansible_server]<br />
alias ansible_ssh_host=your_server_ip<br />
<br />
Save and exit<br />
<br />
Now try to ping your list of machines using group name:<br />
<br />
<b><i># ansible -m ping ansible_server or ansible -m ping all</i></b><br />
<br />
alias | SUCCESS => {<br />
"ansible_facts": {<br />
"discovered_interpreter_python": "/usr/bin/python"<br />
},<br />
"changed": false,<br />
"ping": "pong"<br />
}<br />
<br />
<b>Step 3 — Create your first ansible playbook</b><br />
<br />
<b><i># cat vim.yml</i></b><br />
---<br />
- hosts: ansible_server<br />
remote_user: root<br />
tasks:<br />
- name: Installing vim<br />
yum: pkg=vim<br />
<br />
Now execute your playbook(Specify the group name where you want to execte the playbook)<br />
<br />
<i><b># ansible-playbook -l ansible_server vim.yml</b></i><br />
<br />
PLAY [ansible_server] ****************************************************************************************************************<br />
<br />
TASK [Gathering Facts] ***************************************************************************************************************<br />
ok: [alias]<br />
<br />
TASK [Installing vim] ****************************************************************************************************************<br />
changed: [alias]<br />
<br />
PLAY RECAP ***************************************************************************************************************************<br />
alias : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0<br />
<div>
<br /></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-46704981116128742192019-06-19T05:53:00.000-07:002019-06-19T05:53:03.102-07:00RHEL6 Vs RHEL7<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-outline-level: 3; vertical-align: baseline;">
</div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">Release Name<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– Santiago<br />
RHEL 7 – Maipo<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">Gnome Version<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– GNOME 2<br />
RHEL 7 – GNOME 3.8<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">KDE Version<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– KDE 4.1<br />
</span><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7 – KDE 4.6<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">NFS Version<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– NFS 4<br />
RHEL 7 – NFS 4.1. NFS V2 is deprecated in RHEL 7<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">Samba Version<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– SMB 3.6<br />
RHEL 7 – SMB 4.4<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">OS BOOT
TIME</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: 40 sec<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: 20 sec<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">MAXIMUM
SIZE OF SINGLE PARTITION</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: 50TB(EXT4)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: 500TB(XFS)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">BOOT
LOADER</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6:
/boot/grub/grub.conf<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7:
/boot/grupb2/grub.cfg<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">PROCESSOR
ARCHITECTURE</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: It support 32bit
& 64bit both<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: It only support
64bit<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">HOW TO
FORMAT OR ASSIGN A FILE SYSTEM IN</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6:
#mkfs.ext4 /dev/hda4<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7:
#mkfs.xfs /dev/hda3<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">HOW TO
REPAIR A FILE SYSTEM IN</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: #fsck -y
/dev/hda3<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: #xfs_repair
/dev/hda3<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">COMMAND
TO MANAGE NETWORK IN RHEL6 AND RHEL7</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: #setup<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: #nmtui<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">HOSTNAME
CONFIGURATION FILE</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6:
/etc/sysconfig/network<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7:
/etc/hostname<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">DEFAULT
ISO IMAGE MOUNT PATH</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: /media<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: /run/media/root<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">FILE
SYSTEM CHECK</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: e2fsck<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: xfs_repair<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RESIZE
A FILE SYSTEM</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: #resize2fs
-p /dev/vg00/lv1<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7:
#xfs_growfs /dev/vg00/lv1<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>Run Levels<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– runlevel 0 – Power Off<br />
runlevel 1 – Single User Mode<br />
runlevel 2 – Multi User without Networking<br />
runlevel 3 – Multi User CLI<br />
runlevel 4 – Not USed<br />
runlevel 5 – GUI Mode<br />
runlevel 6 – Restart<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– There is no run levels in RHEL 7. Run levels are called as targets<br />
Poweroff.target<br />
rescue.target<br />
multi-user.target<br />
graphical.target<br />
reboot.target<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>UID Information<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– Normal User UID will start from 500 to 65534<br />
System Users UID will start from 1 to 499<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– Normal User UID start from 1000 – 65534<br />
System Users UID will start from 1 to 999Because Services are increased compare
to RHEL 6<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>By Pass Root
Password Prompt<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– append 1 or s or init=/bin/bash to Kernel command line<br />
RHEL 7 – Append rd.break or init=/bin/bash to kernel command line<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>Rebooting and
Poweroff<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– poweroff – init 0<br />
reboot – init 6<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– systemctl poweroff<br />
systemctl reboot<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>YUM Commands<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
-yum groupinstall<br />
yum groupinfo<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– yum group install<br />
yum group info<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>Default Inode Size<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– 256 bytes<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">[root@local ~]#
tune2fs -l /dev/sda1|grep -i ‘inode size’<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Inode
size: 128<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– 512 bytes<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">[root@managed1 ]#
xfs_info /dev/sda1|grep isize<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">meta-data=/dev/sda1
isize=512 agcount=4, agsize=65536 blks<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #333333; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><b>Resizing an Lvm<o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 6
– EXT family of file systems could be resized if built on a logical volume as a
block device.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #444444; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL 7
– As with XFS file system, resize is not possible.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">TUNE A
FILE SYSTEM</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: tune2fs<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: xfs_admin<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">IPTABLES
AND FIREWALL</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: iptables<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: firewalld<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">IPtables</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">To see firewall status in
RHEL7<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#firewall-cmd
–state<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">To see Firewall status in
RHEL6<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#service iptables status<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">To stop firewall in RHEL7<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#systemctl stop
firewalld.service<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">To stop firewall in RHEL6<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#service iptables stop<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">COMMUNICATION
BETWEEN TCP AND UDP IN BACK END</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: netcat<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: ncat<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">INTERFACE
NAME</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: eth0<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: ens198(N)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">COMBINING
NIC</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: Network Bonding<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: Team Driver<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">NSF
Server Version</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: NFSv2<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: NFSV4<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">DATABASE
USED</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6: Mysql<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7: mariaDB<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7 also support Mysql<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">MANAGING
SERVICES</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#service sshd restart<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#chkconfig sshd on<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL7:</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#systemctl restart sshd<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">#systemctl enable shhd<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">File
System.</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6 default file system
is ext4<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">xfs is RHEL7 default file
system.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Kernel
Version</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">RHEL6 default kernel
version is 2.6 while RHEL7 is 3.10<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">UID
Allocation</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In RHEL6 default UID
assigned to users would start from 500 while in RHEL7 it’s starting from 1000.<br />
But this can be changed if required by editing /etc/login.defs file.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Maximum
supported File Size.</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In RHEL6 maximum file
size of an individual file can be up to 16TB while in RHEL7 it can be up to
500TB which is very large in comparison to RHEL6.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Maximum
Supported File System Size.</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In RHEL6 maximum file
system size=16TB (for 64bit Machine) and 8TB (for 32 bit machine). While in
RHEL7 maximum file system size is 500TB.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Also keep in mind that
RHEL does not support XFS on 32-bit machines.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Change
in file system structure.</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In rhel6 /bin,/sbin,/lib
and /lib64 are usually under /<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In rhel7, now
/bin,/sbin,/lib and /lib64 are nested under /usr.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">The /tmp directory can
now be used as a temporary file storage system (tmpfs)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Space
Required to Installing RHEL7?</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Now if you want to install RHEL7 in your machine, RedHat
recommends minimum 5 GB of disk space to install this release of RHEL series
for all supported architectures.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">.Hostname
lookup and setup </span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">In rhel5 and rhel6
versions, we can edit file /etc/sysconfig/network to set hostname but in rhel7
we can directly change the hostname using below commands.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">hostnamectl<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">nmtui<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">nmcli<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Example:</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">in RHEL6
#hostname<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">in RHEL7
#hostnamectl status and
#hostname<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Few
More notable changes in RHEL 7.</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Netstat</span></b><span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"> and <b>ifconfig</b> commands
also disappeared from RHEL7 but it can be used by installing net-tools.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">The move from sysvinit to
systemd is one of most important change that has been made and which is a
matter of concerned.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Command <b>tail -n</b> is
replaced by <b>journalctl -n</b><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">Command <b>tail -f</b> is
replaced by <b>journalctl -f</b><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 11.25pt; margin-left: .25in; margin-right: 0in; margin-top: 0in;">
<span style="color: #222222; font-family: "Verdana",sans-serif; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";">For displaying kernel
messages instead of <b>dmesg</b> now in RHEL7 we use <b>journalctl
–k</b><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 11.25pt;">
<br /></div>
<br /><br />
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-53777559433398134502019-06-11T09:18:00.000-07:002019-06-11T09:18:30.567-07:00ext2 vs ext3 vs ext4 vs xfs file system differences<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<b><u>Ext2</u></b><o:p></o:p></div>
<div class="MsoNormal">
<b><u><br /></u></b></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Ext2
stands for second extended file system.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>It was
introduced in 1993. Developed by Rémy Card.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>This was
developed to overcome the limitation of the original ext file system.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Ext2 does
not have journaling feature.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>On flash
drives, usb drives, ext2 is recommended, as it doesn’t need to do the over head
of </div>
<div class="MsoNormal">
journaling.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Maximum
individual file size can be from 16 GB to 2 TB<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Overall
ext2 file system size can be from 2 TB to 32 TB<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
How to create an ext2 filesystem<o:p></o:p></div>
<div class="MsoNormal">
# mke2fs /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u>Ext3</u></b><o:p></o:p></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Ext3
stands for third extended file system.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>It was
introduced in 2001. Developed by Stephen Tweedie.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Starting
from Linux Kernel 2.4.15 ext3 was available.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>The main
benefit of ext3 is that it allows journaling.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Journaling
has a dedicated area in the file system, where all the changes are tracked.
When</div>
<div class="MsoNormal">
the system crashes, the possibility of file system corruption is less
because of journaling.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Maximum
individual file size can be from 16 GB to 2 TB<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Overall
ext3 file system size can be from 2 TB to 32 TB<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>There are
three types of journaling available in ext3 file system.</div>
<div class="MsoNormal" style="text-align: left;">
o<span style="mso-tab-count: 1;"> </span>Journal –
Metadata and content are saved in the journal.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: left;">
o<span style="mso-tab-count: 1;"> </span>Ordered –
Only metadata is saved in the journal. Metadata are journaled only after
writing</div>
<div class="MsoNormal" style="text-align: left;">
the content to disk. This is the default.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: left;">
o<span style="mso-tab-count: 1;"> </span>Writeback
– Only metadata is saved in the journal. Metadata might be journaled either</div>
<div class="MsoNormal" style="text-align: left;">
before or after the content is written to the disk.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>You can
convert a ext2 file system to ext3 file system directly (without
backup/restore).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
How to create ext3 file system :-<o:p></o:p></div>
<div class="MsoNormal">
# mkfs.ext3 /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
(or)<o:p></o:p></div>
<div class="MsoNormal">
# mke2fs –j /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
( -j for adding journaling capability )<o:p></o:p></div>
<div class="MsoNormal">
How to<span style="mso-spacerun: yes;"> </span>convert<span style="mso-spacerun: yes;"> </span>ext2 to ext3 :-<o:p></o:p></div>
<div class="MsoNormal">
# umount /dev/sda2<o:p></o:p></div>
<div class="MsoNormal">
# tune2fs -j /dev/sda2<o:p></o:p></div>
<div class="MsoNormal">
# mount /dev/sda2<span style="mso-spacerun: yes;">
</span>/var<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="mso-spacerun: yes;"> </span><u>Ext4</u> <o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Ext4
stands for fourth extended file system.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>It was
introduced in 2008.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Starting
from Linux Kernel 2.6.19 ext4 was available.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Supports
huge individual file size and overall file system size.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Maximum
individual file size can be from 16 GB to 16 TB<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Overall
maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). </div>
<div class="MsoNormal">
1
PB = 1024 TB (terabyte).<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Directory
can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in ext3)<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>You can
also mount an existing ext3 fs as ext4 fs (without having to upgrade it).<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>Several
other new features are introduced in ext4: multiblock allocation, delayed
allocation,</div>
<div class="MsoNormal">
journal checksum. fast fsck, etc. All you need to know is that
these new features have</div>
<div class="MsoNormal">
improved the performance and reliability of the
filesystem when compared to ext3.<o:p></o:p></div>
<div class="MsoNormal">
•<span style="mso-tab-count: 1;"> </span>In ext4,
you also have the option of turning the journaling feature “off”.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Creating ext4 file system :-<o:p></o:p></div>
<div class="MsoNormal">
# mkfs.ext4 /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
(or)<o:p></o:p></div>
<div class="MsoNormal">
# mke2fs -t ext4 /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Converting ext3 to ext4<o:p></o:p></div>
<div class="MsoNormal">
( Warning :- Never try this live or production servers )<o:p></o:p></div>
<div class="MsoNormal">
# umount /dev/sda2<o:p></o:p></div>
<div class="MsoNormal">
# tune2fs -O extents,uninit_bg,dir_index<span style="mso-spacerun: yes;"> </span>/dev/sda2<o:p></o:p></div>
<div class="MsoNormal">
# e2fsck -pf /dev/sda2<o:p></o:p></div>
<div class="MsoNormal">
# mount /dev/sda2 /var<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Find your servers filesystem type<o:p></o:p></div>
<div class="MsoNormal">
We can find the filesystem type used in our servers using
any one of the following commands<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# mount<o:p></o:p></div>
<div class="MsoNormal">
/dev/sda3 on / type ext3 (rw)<o:p></o:p></div>
<div class="MsoNormal">
proc on /proc type proc (rw)<o:p></o:p></div>
<div class="MsoNormal">
/dev/sda1 on /boot type ext3 (rw)<o:p></o:p></div>
<div class="MsoNormal">
tmpfs on /dev/shm type tmpfs (rw)<o:p></o:p></div>
<div class="MsoNormal">
# file -sL /dev/sda1<o:p></o:p></div>
<div class="MsoNormal">
/dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal
recovery)<o:p></o:p></div>
<div class="MsoNormal">
# df -T | awk ‘{print $1,$2,$7}’ | grep “^/dev”<o:p></o:p></div>
<div class="MsoNormal">
/dev/sda3 ext3 /<o:p></o:p></div>
<div class="MsoNormal">
/dev/sda1 ext3 /boot<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u>XFS</u></b><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
XFS is a high-performance file system which was designed by
SGI for their IRIX platform. </div>
<div class="MsoNormal">
Since XFS was ported to the Linux kernel in 2001,
XFS has remained a preferred choice for many enterprise systems especially with
massive amount of data.</div>
<div class="MsoNormal">
XFS is a high performance filesystem,due to its high performance, architectural scalability
and robustness. For example, RHEL/CentOS 7 and Oracle Linux have adopted XFS as
their default file system, and SUSE/openSUSE have long been an avid supporter
of XFS.<o:p></o:p></div>
<div class="MsoNormal">
XFS has a number of unique features that make it stand out
among the file system crowd, such as scalable/parallel I/O, journaling for
metadata operations, online de-fragmentation, suspend/resume I/O, delayed
allocation for performance, etc.<o:p></o:p></div>
<div class="MsoNormal">
If you want to create and mount an XFS file system on your
Linux platform, here is how to do it.<o:p></o:p></div>
<div class="MsoNormal">
XFS is packed full of cool features like </div>
<div class="MsoNormal">
</div>
<ol style="text-align: left;">
<li>guaranteed rate
I/O </li>
<li>online resizing</li>
<li>built-in quota enforcement</li>
<li>it can theoretically
support filesystems up to 8 exabytes in size. </li>
</ol>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
It’s been used on Linux since
about 2001, and is available as an install option on many popular Linux
distributions. With variable block sizes, you can tune your system like a
sliding scale to tweak for space efficiency or read performance. Best for
extremely large file systems, large files, and lots of files Journaled (an
asymmetric parallel cluster file system version is also available) POSIX
extended access controls The XFS file system is Open Source and included in
major Linux distributions. It originated from SGI (Irix) and was designed
specifically for large files and large volume scalability. Video and
multi-media files are best handled by this file system. Scaling to petabyte
volumes, it also handles great deals of data. It is one of the few filesystems
on Linux which supports Data Migration (SGI contributed the Hierarchical
Storage Management interfaces into the Linux Kernel a number of years ago). SGI
also offers a closed source cluster parallel version of XFS called cXFS which
like cVxFS is an asymmetrical model. It has the unique feature, however, that
it’s slave nodes can run on Unix, Linux and Windows, making it a cross platform
file system. Its master node must run on SGI hardware. Recommended Use: If you
really like to tweak your system to meet your needs, XFS is a great way to go.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The XFS file system is an extension of the extent file
system .XFS is a high performance 64 bit journaling file system .Support of XFS was merged into the linux kernel in around 2002 and In 2009
Red Hat Enterprise Linux version 5.4 usage of XFS file system .</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
Default file system in RHEL7 is XFS<o:p></o:p></div>
<div class="MsoNormal">
XFS supports maximum file system size of 8 exbibytes for 64
bit file system .Some comparison of XFS file system is XFS file system cannot
be shrunk and poor performance with deletions of large numbers of files.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
32-bit system 64-bit system<o:p></o:p></div>
<div class="MsoNormal">
File size: 16 Terabytes 16 Exabytes<o:p></o:p></div>
<div class="MsoNormal">
File system: 16 Terabytes 18 Exabytes<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<br /></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-1246581492363488632019-06-11T08:23:00.002-07:002019-06-11T08:23:41.977-07:00How to change the default run level in RHEL7?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
In earlier version of RHEL, we used to change the runlevels
in /etc/inittab file.<o:p></o:p></div>
<div class="MsoNormal">
But inittab is no longer used when using systemd. systemd uses
‘targets’ instead of runlevels.<o:p></o:p></div>
<div class="MsoNormal">
By default there are 2 main targets</div>
<div class="MsoNormal">
<span style="text-indent: -0.25in;">graphical.target </span><span style="font-family: Wingdings; text-indent: -0.25in;">à</span><span style="text-indent: -0.25in;">
Runlevel 5 having GUI</span></div>
<div class="MsoNormal">
<span style="font-family: Symbol; text-indent: -0.25in;"><span style="font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span><span style="text-indent: -0.25in;">multi-user.target</span><span style="font-family: Wingdings; text-indent: -0.25in;">à</span><span style="text-indent: -0.25in;">Runlevel
3 text based</span></div>
<div class="MsoNormal">
<span style="text-indent: -0.25in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: -0.25in;">To view current default runlevel/target</span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle">
# systemctl get-default</div>
<div class="MsoListParagraphCxSpMiddle">
<span style="text-indent: -0.25in;"><br /></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="text-indent: -0.25in;">To set a different target</span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo2; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle">
#systemctl set-default TARGET.target<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast">
Ex: systemctl set-default graphical.target<o:p></o:p></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><br /></u></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u>Verification:<o:p></o:p></u></b></div>
<div class="MsoNormal">
# systemctl get-default<o:p></o:p></div>
<div class="MsoNormal">
graphical.target<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now reboot the machine to check whether the machine is booting
up into graphical mode.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u>Alternate method to
change the runlevel</u><br /><br /><o:p></o:p></b></div>
<div class="MsoNormal">
You may be noticed the similar output when the systemctl
set-default multi-user.target command is issued. What the command done is
nothing but making a symbolic link of runlevel targets to the default target
file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
rm '/etc/systemd/system/default.target'<o:p></o:p></div>
<div class="MsoNormal">
ln -s '/usr/lib/systemd/system/multi-user.target'
'/etc/systemd/system/default.target'<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Check the current level.<o:p></o:p></div>
<div class="MsoNormal">
# systemctl get-default<o:p></o:p></div>
<div class="MsoNormal">
multi-user.target<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Before making the symbolic link, let’s list out the files in
the systemd directory.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# ls /lib/systemd/system/runlevel*target -l<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 15 Aug 3 13:44 /lib/systemd/system/runlevel0.target
-> poweroff.target</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 13 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel1.target
-> rescue.target<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 17 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel2.target
-> multi-user.target<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 17 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel3.target
-> multi-user.target<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 17 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel4.target
-> multi-user.target<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 16 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel5.target
-> graphical.target<o:p></o:p></div>
<div class="MsoNormal">
lrwxrwxrwx. 1 root root 13 Aug<span style="mso-spacerun: yes;"> </span>3 13:44 /lib/systemd/system/runlevel6.target
-> reboot.target<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
As per the previous step, current default run level 3. </div>
<div class="MsoNormal">
Issue
the following command to make a symbolic link of runlevel5.target to
default.target file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# ln -sf /lib/systemd/system/runlevel5.target
/etc/systemd/system/default.target<o:p></o:p></div>
<div class="MsoNormal">
or<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# ln -sf /lib/systemd/system/graphical.target
/etc/systemd/system/default.target<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Again check the current level.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# systemctl get-default<o:p></o:p></div>
<div class="MsoNormal">
runlevel5.target<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now the default runlevel is 5 (graphical mode), reboot the
server and check it out.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# reboot<o:p></o:p></div>
<br /></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-48277166260469125922019-04-01T21:53:00.000-07:002019-04-01T21:53:27.050-07:00How to install Splunk on centos7<div dir="ltr" style="text-align: left;" trbidi="on">
What is Splunk?<br />
Splunk is a software technology which provides the engine for monitoring, searching, analyzing, visualizing and acting on voluminous streams of real-time machine data.<br />
<br />
<b>Download Splunk</b><br />
<br />
<ol style="text-align: left;">
<li>Browse https://www.splunk.com/</li>
<li>On the top right corner click on "Free Splunk"</li>
<li>Create your account/login using your existing account</li>
<li>Click on "Download Free 60-Day Trial" in "Splunk Enterprise" section</li>
<li>Click on "Linux" tab</li>
<li>Download '.tgz' tar ball</li>
</ol>
<b>Install Splunk</b><br />
<br />
<ol style="text-align: left;">
<li>Login to the linux box where you downloaded the tar ball.</li>
<li>Add a splunk group </li>
<ul>
<li># groupadd splunk</li>
</ul>
<li>Add splunk user along with home directory and group as shown below command.</li>
<ul>
<li># useradd -d /opt/splunk -m -g splunk splunk</li>
</ul>
<li>Change to splunk user and check the id</li>
<ul>
<li># su - splunk</li>
<li>$ id</li>
<li>uid=1001(splunk) gid=1001(splunk) groups=1001(splunk)</li>
</ul>
</ol>
<b>Extract the tar ball</b><br />
<br />
<ol style="text-align: left;">
<li># tar -xvf splunk-*.tgz</li>
<li>Copy the splunk directory content to /opt/splunk/</li>
<ul>
<li># cp -rp splunk/* /opt/splunk/</li>
</ul>
<li>Make sure /opt/splunk/ and its content owned by splunk user</li>
<ul>
<li># chown -R splunk: /opt/splunk/</li>
</ul>
</ol>
<b>Installation:</b><br />
<br />
<ol style="text-align: left;">
<li>Switch to splunk user</li>
<ul>
<li># su - splunk</li>
</ul>
<li>Change directory to bin</li>
<ul>
<li>$ cd bin</li>
</ul>
<li>Start splunk</li>
<ul>
<li>$ ./splunk start --accept-license</li>
</ul>
<li>Enter the splunk admin username and password for GUI login</li>
<li>By the end of start command you can see your web server details (ex: <your webserver hostname/ip:8000>)</li>
<li>Now browse the web server</li>
<ul>
<li>Ex: http://192.168.1.105:8000</li>
</ul>
<li>Loging using splunk admin user and password you created during splunk start.</li>
</ol>
<div>
Thats it!.</div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com8tag:blogger.com,1999:blog-7478543360278883006.post-18061920709837329462017-12-05T07:17:00.001-08:002017-12-05T07:17:38.145-08:00How to install Docker on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;"><b>What is Docker?</b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><b>How to install Docker on CentOs6?</b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Install the rpm</span><br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"># rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Update your yum repo</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># yum update -y</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">Now Install docker</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># yum -y install docker-io</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">Now start docker</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># service docker start</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">Now let’s configure Docker to start when the server reboots:</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># chkconfig docker on</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">To work with docker container,</span><span style="font-family: Arial, Helvetica, sans-serif;">Download the centos Docker image:</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># docker pull centos</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">Run a Docker Container</span><span style="font-family: Arial, Helvetica, sans-serif;"> to setup a basic centos container with a bash shell, run below command:</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"># docker run -i -t centos /bin/bash</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">You’re now using a bash shell inside of a centos docker container.</span><br />
<br /></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-51898829065556855002014-10-20T12:47:00.000-07:002014-10-20T12:48:27.694-07:00How to upgrade Nagios core 3.5.0 to 4.0.8 version?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-add-space: auto; text-indent: -.25in;">
<span style="line-height: 115%;"> Download nagios-4.0.8.tar.gz from<span class="apple-converted-space"> </span><a href="http://www.nagios.org/download">http://www.nagios.org/download</a> <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;"> Untar the source code:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">#
tar zxvf nagios-4.0.8.tar.gz<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">#
cd nagios-4.0.8<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;"> Compile the new source code:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">nagios-4.0.8]#
./configure --with-command-group=nagcmd<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">nagios-4.0.8]#
make all<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">nagios-4.0.8]#
make install<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;"> <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;"> Verify the Nagios configuration for
errors:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">nagios-4.0.8]#
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Nagios
Core 4.0.8<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Copyright
(c) 2009-present Nagios Core Development Team and Community Contributors<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Copyright
(c) 1999-2009 Ethan Galstad<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Last
Modified: 08-12-2014<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">License:
GPL<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Website:
http://www.nagios.org<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Reading
configuration data...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Running
pre-flight check on configuration data...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Checking
objects...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 1231 services.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 221 hosts.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 34 host groups.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 2 service groups.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 28 contacts.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 27 contact groups.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 127 commands.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 7 time periods.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 0 host escalations.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 0 service escalations.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Checking
for circular paths...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 221 hosts<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 0 service dependencies<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 172 host dependencies<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">
Checked 7 timeperiods<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Checking
global event handlers...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Checking
obsessive compulsive processor commands...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<span style="line-height: 115%;">Checking
misc settings...<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<b><span style="line-height: 115%;">Total
Warnings: 0</span><u1:p></u1:p></b><span style="line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<b><span style="line-height: 115%;">Total
Errors: 0</span><u1:p></u1:p></b><span style="line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;"> Start Nagios service<span class="apple-converted-space"> </span><b># service nagios restart</b><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<span style="line-height: 115%;">
Now check Nagios GUI<span class="apple-converted-space"> </span><span class="MsoHyperlink"><b>http://<Nagios</b></span><span class="apple-converted-space"><b> </b></span><b>server IP>/nagios<span class="apple-converted-space"> </span></b>and observe the new version.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
</div>
<div class="MsoNormal">
<br /></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com6tag:blogger.com,1999:blog-7478543360278883006.post-35722004636133529202014-03-25T06:14:00.000-07:002014-03-25T06:14:12.813-07:00Weblogic Console tips<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="background-color: white; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px; font-weight: normal; margin: 0px; padding: 0.6em 0px 0.5em; position: relative;">
<b>Change the URL console Path step by step:</b><div id="chitikaSelectBeacon21" style="float: left;">
</div>
<div id="chitikaSelectBeacon20" style="float: left;">
</div>
<div id="chitikaSelectBeacon19" style="float: left;">
</div>
<div id="chitikaSelectBeacon18" style="float: left;">
</div>
<div id="chitikaSelectBeacon17" style="float: left;">
</div>
<div id="chitikaSelectBeacon16" style="float: left;">
</div>
<div id="chitikaSelectBeacon15" style="float: left;">
</div>
<div id="chitikaSelectBeacon14" style="float: left;">
</div>
<div id="chitikaSelectBeacon13" style="float: left;">
</div>
<div id="chitikaSelectBeacon12" style="float: left;">
</div>
<div id="chitikaSelectBeacon11" style="float: left;">
</div>
<div id="chitikaSelectBeacon10" style="float: left;">
</div>
<div id="chitikaSelectBeacon9" style="float: left;">
</div>
<div id="chitikaSelectBeacon8" style="float: left;">
</div>
<div id="chitikaSelectBeacon7" style="float: left;">
</div>
<div id="chitikaSelectBeacon6" style="float: left;">
</div>
<div id="chitikaSelectBeacon5" style="float: left;">
</div>
<div id="chitikaSelectBeacon4" style="float: left;">
</div>
<div id="chitikaSelectBeacon3" style="float: left;">
</div>
<div id="chitikaSelectBeacon2" style="float: left;">
</div>
<div id="chitikaSelectBeacon1" style="float: left;">
</div>
</h2>
<br style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><br />
<ol style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">In the left pane of the Console, under </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Domain Structure</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, select the <a href="https://www.blogger.com/null" id="ch-link-3" rel="domain name|3" style="border-bottom-color: rgb(0, 129, 189) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: rgb(0, 129, 189) !important;">domain name</a></span></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">Select</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Configuration > General</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, and click</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Advanced</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">at the bottom of the <a href="https://www.blogger.com/null" id="ch-link-1" rel="page|1" style="border-bottom-color: rgb(0, 129, 189) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: rgb(0, 129, 189) !important;">page</a>.</span></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">In</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Console Context Path</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, enter the context path that you want to use.</span></li>
</ol>
<br style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"></span><span style="background-color: white; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">fyi:</span><br style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"></span><span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px; line-height: 18.200000762939453px;">http://localhost:7001/console</span><br style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px; line-height: 18.200000762939453px;"><br /></span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"></span><span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px; line-height: 18.200000762939453px;">You can change "console" context path.</span><br style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" /><span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px; line-height: 18.200000762939453px;"><br /></span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"></span><span style="background-color: white; color: #333333; font-family: monospace; font-size: 13px; line-height: 18.200000762939453px;"><br /></span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"></span><br />
<h3 style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
<span style="font-family: monospace;"><span style="font-size: large;">How To disable console:</span></span></h3>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<ul style="line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">under </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Domain Structure</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, select the <a href="https://www.blogger.com/null" id="ch-link-4" rel="domain name|4" style="border-bottom-color: rgb(0, 129, 189) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: rgb(0, 129, 189) !important;">domain name</a>.</span></li>
<li style="border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">Select </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Configuration > General</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, and click </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Advanced</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> at the bottom of the <a href="https://www.blogger.com/null" id="ch-link-2" rel="page|2" style="border-bottom-color: rgb(0, 129, 189) !important; border-bottom-style: dotted !important; border-bottom-width: 1px !important; color: rgb(0, 129, 189) !important;">page</a></span></li>
<li style="border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">Deselect </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Console Enabled</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">. Save it and restart the admin server.</span></li>
</ul>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<span style="font-family: monospace; font-size: large;"> </span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<b><span style="font-family: monospace;">Note: If you disable the console, you will not access the admin console.It will be useful for </span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">added security measure in a production environment.</span></b></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<span style="font-family: monospace; font-size: large;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">
<h1 class="topictitle1" style="clear: left; font-family: Arial, Helvetica, sans-serif; font-weight: normal; margin: 0px 0px 13.483333587646484px 26.96666717529297px; position: relative;">
<span style="font-size: medium;">How to configure monitoring refresh rate:</span></h1>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif;">Top of the right pane of the Administration Console, click </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Preferences</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">.</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif;">User Preferences</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> page, in the </span><b style="font-family: Verdana, Arial, Helvetica, sans-serif;">Refresh Interval</b><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> box, we can set the value (sec).</span></div>
<div>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-size: medium;">How to record WLST script : </span><div id="chitikaSelectBeacon45" style="float: left;">
</div>
<div id="chitikaSelectBeacon44" style="float: left;">
</div>
<div id="chitikaSelectBeacon43" style="float: left;">
</div>
<div id="chitikaSelectBeacon42" style="float: left;">
</div>
<div id="chitikaSelectBeacon41" style="float: left;">
</div>
<div id="chitikaSelectBeacon40" style="float: left;">
</div>
<div id="chitikaSelectBeacon39" style="float: left;">
</div>
<div id="chitikaSelectBeacon38" style="float: left;">
</div>
<div id="chitikaSelectBeacon37" style="float: left;">
</div>
<div id="chitikaSelectBeacon36" style="float: left;">
</div>
<div id="chitikaSelectBeacon35" style="float: left;">
</div>
<div id="chitikaSelectBeacon34" style="float: left;">
</div>
<div id="chitikaSelectBeacon33" style="float: left;">
</div>
<div id="chitikaSelectBeacon32" style="float: left;">
</div>
<div id="chitikaSelectBeacon31" style="float: left;">
</div>
<div id="chitikaSelectBeacon30" style="float: left;">
</div>
<div id="chitikaSelectBeacon29" style="float: left;">
</div>
<div id="chitikaSelectBeacon28" style="float: left;">
</div>
<div id="chitikaSelectBeacon27" style="float: left;">
</div>
<div id="chitikaSelectBeacon26" style="float: left;">
</div>
<div id="chitikaSelectBeacon25" style="float: left;">
</div>
<div id="chitikaSelectBeacon24" style="float: left;">
</div>
<div id="chitikaSelectBeacon23" style="float: left;">
</div>
<div id="chitikaSelectBeacon22" style="float: left;">
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
1. Specify the recorded wlst script file name (optional) in preferences-> WLST SCRIPT RECORDING</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
2. Start recording.</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: center;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ZwZrSNk7jfm3IYx8wGFqNGe9GWMje9CWQ-AY5-73YP5uCkltKxQlP3UCZXZyRBg7PxjZ_lp5z09zqoK9EeaW93IJrqTVoyL6nIP7Hpaj662F0Q-6HjYqdzs30oHg9mIWst7B1wgmO_A/s1600/wlst+recording1.png" imageanchor="1" style="color: #015782; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4ZwZrSNk7jfm3IYx8wGFqNGe9GWMje9CWQ-AY5-73YP5uCkltKxQlP3UCZXZyRBg7PxjZ_lp5z09zqoK9EeaW93IJrqTVoyL6nIP7Hpaj662F0Q-6HjYqdzs30oHg9mIWst7B1wgmO_A/s1600/wlst+recording1.png" style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; padding: 8px; position: relative;" width="320" /></a></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;">You cannot remove or undo a command once it has been recorded. Instead, you can edit the script file after you stop recording or you can set your preferences to overwrite the script file and re-record the commands.</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;">3. Stop recording</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;">If you click again the record option it will end the session.</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left;">fyi:</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="background-color: #f6f6f6; color: green; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 11px; text-align: start;">The recording session has ended. Script recorded to D:\New Folder\user_projects\domains\test\Script1355000778567.py.</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<span style="background-color: #f6f6f6; color: green; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 11px; text-align: start;"><br /></span></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
If you want to view recorded commands , you can view like goto preferences->wlst script recording->control</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
fyi:</div>
<div style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: justify;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.200000762939453px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg23U76wYbmx-PUmTJJo1H2Upn83mzumsPimRKtcbIOwZXzIpZq46yJxA8ylHk54RYiV7LPq9MFWbyqgIfS-qd-s3yyfHQ-InRGdOf6zSCzP2gowa7K3S6Wfw-86QQWY-Z7oTXQbA9FW2Q/s1600/wlstrecording2.png" imageanchor="1" style="color: #015782; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg23U76wYbmx-PUmTJJo1H2Upn83mzumsPimRKtcbIOwZXzIpZq46yJxA8ylHk54RYiV7LPq9MFWbyqgIfS-qd-s3yyfHQ-InRGdOf6zSCzP2gowa7K3S6Wfw-86QQWY-Z7oTXQbA9FW2Q/s1600/wlstrecording2.png" style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; padding: 8px; position: relative;" width="320" /></a></div>
</div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-22344245488960083942014-02-11T12:51:00.001-08:002014-02-11T12:53:05.214-08:00How to enable Nagios Serivce Acknowledgement Comments in Emails?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="font-family: Arial, sans-serif;"><span style="font-size: 10.5pt;">If you would like to see </span><span style="font-size: 14px;">acknowledgement</span><span style="font-size: 10.5pt;"> comments
in the Nagios email alerts that get sent so that the other admins do not need
to login to Nagios GUI and view the comment, You need to do some changes in the
commands.cfg file.<o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">What to do?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">Modify the command “notify-service-by-email” in
the commands.cfg file. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">You just need to add “\nNotes:
$SERVICEACKCOMMENT$” before “/bin/mail” as shown in below command
definition:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"># vim /usr/local/nagios/etc/objects/commands.cfg<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"># 'notify-service-by-email' command definition<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">define command{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"> command_name notify-service-by-email<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"> command_line /usr/bin/printf
"%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$\n</span><span style="background-color: #ffe599; font-family: Arial, sans-serif; font-size: 10.5pt;">\nNotes: $SERVICEACKCOMMENT$</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">" | /bin/mail
-s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"> Save and exit.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"><br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">Thats it, reload nagios service - /etc/init.d/nagios reload<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;">Now acknowledge any WARNING/CRITICAL alert and
check the mail along with the comment/acknowledgement.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Arial, sans-serif; font-size: 10.5pt;"><o:p><br /></o:p></span></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-82260746592098935442014-01-22T21:44:00.000-08:002014-01-22T21:51:34.301-08:00Fix for OpenManage 7.3.2 issue<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="background-color: white; border-color: rgb(226, 226, 226); border-style: solid; border-width: 0px 0px 1px; color: #630000; font-family: arial, verdana, sans-serif; font-size: 18px; height: auto; line-height: 1em; margin: 1.25em -10px 0.35em; padding: 0.25em 10px;">
ERROR: (SNMP) OpenManage is not installed or is not working correctly</h3>
<h3 style="background-color: white; border-color: rgb(226, 226, 226); border-style: solid; border-width: 0px 0px 1px; color: #630000; font-family: arial, verdana, sans-serif; font-size: 18px; height: auto; line-height: 1em; margin: 1.25em -10px 0.35em; padding: 0.25em 10px;">
<ol style="color: black; font-size: 14px; font-weight: normal; line-height: 20.474998474121094px; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">After upgrading OpenManage to version 7.3.2 on your server,OpenManage service checks from your monitoring tool(Nagios, Zabbix or op5) might fail and display an error message such as :</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">ERROR: (SNMP) OpenManage is not installed or is not working correctly</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">To fix this issue, log on to your server as root and run the following commands:</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">sed -r -i 's/^(SNMP)=disable$/\1=enable/' /opt/dell/srvadmin/etc/srvadmin-omilcore/install.ini (Here we are enabling SNMP)</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Remove dcsnmp.off file : </span><span style="background-color: transparent;">rm /opt/dell/srvadmin/var/lib/srvadmin-deng/dcsnmp.off</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">cd /opt/dell/srvadmin/sbin/</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Restart the server admin services : </span><span style="background-color: transparent;">srvadmin-services.sh restart</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Restart snmp daemon : service snmpd restart</span></li>
</ul>
</li>
<li style="background-color: transparent;">Now recheck the OpenManage services in your monitoring tool(Nagios, Zabbix or op5)</li>
</ol>
</h3>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-16123114013805942612014-01-19T07:11:00.000-08:002014-01-19T07:11:55.553-08:00How to install NRPE agent(Using Yum) on a Linux machine?<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;">Download and install repo packages:</span></span></div>
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;"><br /></span></span></div>
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;"><div>
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm</div>
<div>
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm </div>
</span></span></div>
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;"><br /></span></span></div>
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;">Now start the procedure:</span></span></div>
<div>
<span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 20.474998474121094px;"><br /></span></span></div>
<ol style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 20.474998474121094px; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">Install the below packages</span><span style="background-color: transparent;"></span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># yum install nrpe nagios nagios-plugins-all</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;"># chkconfig nrpe on</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">The nrpe configuration file is : /etc/nagios/nrpe.cfg</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Make the necessary changes to the nrpe config file, so that Nagios server can communicate to the client machine.</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># vim /etc/nagios/nrpe.cfg</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">allowed_hosts= 127.0.0.1,<Nagios server IP address></span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Also, define the below commands in the same nrpe.cfg file as shown below. So that you can use them while adding these to Nagios server for monitoring:</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% --local -X tmpfs -X none</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">command[check_memory]=/usr/local/sbin/check_memory.pl -C -u -w 90 -c 95</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Save and exit</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Restart nrpe service after the modifications done to the nrpe.cfg file.</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># /etc/init.d/nrpe restart</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Check whether the port 5666 is listening on localhost (the machine in which NRPE agent is installed) or not.</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># netstat -an | grep 5666</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Check whether you are able to telnet to port 5666 from </span><span style="background-color: transparent;"></span><strong>Nagios server</strong> <span style="background-color: transparent;"></span><span style="background-color: transparent;">or not</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># telnet <Client IP> 5666</span></li>
</ul>
</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">If telnet is not listening to port 5666 from Nagios server, then enable the port by writing below iptable rule:</span><ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;">Stop iptables: # /etc/init.d/iptables stop</span></li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Paste the below rule in the iptables file (# vi </span><span style="background-color: transparent;">/etc/sysconfig/iptables)</span></li>
<li style="background-color: transparent;">-A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT</li>
<li style="background-color: transparent;"><span style="background-color: transparent;">Save and exit.</span></li>
<li style="background-color: transparent;">Start iptables: /etc/init.d/iptables start</li>
</ul>
</li>
<li style="background-color: transparent;">Now check whether you are able to telnet to port 5666 from <strong>Nagios server</strong> or not<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"><span style="background-color: transparent;"># telnet <Client IP> 5666</span></li>
</ul>
</li>
</ol>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com1tag:blogger.com,1999:blog-7478543360278883006.post-50983730641266653042014-01-19T06:59:00.000-08:002014-01-19T06:59:37.798-08:00Upgrade Nagios core from 3.X version to 3.5 Howto?<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<span style="background-color: white; font-size: 14px; line-height: 20.474998474121094px;">Follow the below procedure to upgrade Nagios core 3.X version to 3.5:</span></h1>
<div style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 20.474998474121094px; margin-top: 1em;">
</div>
<ol style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 20.474998474121094px; margin-top: 0px;">
<li style="background-color: transparent;">Take the backup of your nagios folder:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># cd /usr/local/</li>
<li style="background-color: transparent;"># tar -cvzf nagios.bkp-yyyy-mm-dd.gz nagios/</li>
</ul>
</li>
<li style="background-color: transparent;">After taking backup,Remove the following old HTML files that were used by the web frontend.<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># rm -f /usr/local/nagios/share/{main,side,index}.html</li>
</ul>
</li>
<li style="background-color: transparent;">Download the source code tarball of the Nagios Core version 3.5 from URL: <a href="http://www.nagios.org/download/" style="background-color: transparent; border-color: rgb(88, 67, 139); border-style: none none dotted; border-width: 1px; color: #58438b; text-decoration: none;" target="_top">http://www.nagios.org/download/</a> and copy it to /opt directory in Nagios server</li>
<li style="background-color: transparent;">Change directory to /opt:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># cd /opt</li>
</ul>
</li>
<li style="background-color: transparent;">Extract the Nagios source code tarball:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># tar -xzvf nagios-3.5.tar.gz</li>
</ul>
</li>
<li style="background-color: transparent;">Change directory to nagios-3.5:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># cd nagios-3.5</li>
</ul>
</li>
<li style="background-color: transparent;">Now run the Nagios configure script:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># ./configure --with-command-group=nagcmd</li>
</ul>
</li>
<li style="background-color: transparent;">Next, Compile the Nagios source code using <strong>make all</strong> command</li>
<li style="background-color: transparent;">Install updated binaries, documentation, and web web interface using <strong>make install</strong> command</li>
<li style="background-color: transparent;">Verify the configuration files. Correct any errors shown here before proceeding with the next step:<ul style="background-color: transparent; margin-top: 0px;">
<li style="background-color: transparent;"># /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</li>
</ul>
</li>
<li style="background-color: transparent;">Restart Nagios service: <strong>/etc/init.d/nagios restart</strong></li>
<li style="background-color: transparent;">You are done. Now check your Nagios web interface using URL: <a href="http://%3Cnagios/" style="background-color: transparent; border-color: rgb(88, 67, 139); border-style: none none dotted; border-width: 1px; color: #58438b; text-decoration: none;" target="_top">http://<Nagios</a> server IP>/nagios</li>
</ol>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-30784103535155456732013-10-28T10:51:00.002-07:002013-10-28T10:53:41.653-07:00Redirect port 8080 traffic to port 80 How To?<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
Install Tomcat</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<hr style="background-color: #e2e2e2; border: none; color: #e2e2e2; font-size: 14px; height: 1px; line-height: 20.46875px;" />
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
These instructions will explain How to install Tomcat and configuring the web server to act as a proxy server to redirect port 8080 traffic to port 80:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
If the following packages are not installed, install them:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">yum install tomcat6</li>
<li style="background-color: transparent;">yum install java-1.6.0-openjdk</li>
<li style="background-color: transparent;">yum install httpd</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
How to check if they are installed or not:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">rpm -qa |grep<package name=""></package></li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Start the tomcat6 service:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">/etc/init.d/tomcat6 start</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Now Make this service to be run after restarting the Linux box as well by doing chkconfig:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">chkconfig tomcat6 on</li>
<li style="background-color: transparent;">chkconfig --list tomcat6</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<blockquote style="background-color: #fbfbfb; border-color: rgb(251, 251, 251) rgb(251, 251, 251) rgb(251, 251, 251) rgb(221, 221, 221); border-style: solid; border-width: 1px 0px 1px 3px; color: black; font-size: 14px; line-height: 20.46875px; padding: 0.5em 1.25em;">
tomcat6 0:off 1:off 2:on 3:on 4:on 5:on 6:off</blockquote>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Now access the tomcat home page using below URL:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">http://localhost:8080</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name=""></a></h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
Create a sample test page</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="_AN1"></a><a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="AN1"></a></h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="Create_a_sample_test_page"></a><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Create a directory called dev in the tomcat’s webapps folder</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">mkdir /var/lib/tomcat6/webapps/dev</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Create a test page in the dev directory</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">vim /var/lib/tomcat6/webapps/dev/test.html</li>
<li style="background-color: transparent;"><strong>Welcome to sample test page</strong></li>
<li style="background-color: transparent;">Save and exit.</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;">Now access the test page using below URL:</span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">http://localhost:8080/dev/test.html</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
If you want to access/see the directory listing from dev directory using a browser, Then we need to enable the listings in the web.xml file</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Open the web.xml file and change(/etc/tomcat6/web.xml)</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<param-name>listings</param-name><br />
<param-value>false</param-value></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
To</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<param-name>listings</param-name></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<param-value>true</param-value></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<strong><span style="text-decoration: underline;">Note: </span></strong>You can place all your required content in the webapps/dev directory and access them using http://localhost:8080/dev</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="_AN2"></a><a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="AN2"></a></h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="Redirecting_port_8080_traffic_to"></a>Redirecting port 8080 traffic to port 80</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Configure your copy of Apache so that it includes the mod_proxy module. If you are building from source, the easiest way to do this is to include the --enable-module=proxydirective on the ./configure command line.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
By default mod_proxy module will be installed and enabled when you install httpd using yum (yum install httpd). We need to verify whether the module is loaded or not in the httpd.conf file.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
After httpd installation, Check whether the module mod_proxy is installed or not. Generally the module location is:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">/usr/lib/httpd/modules/mod_proxy.so</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Check if the module is loaded in the httpd.conf file. If not already added for you, make sure that you are loading the mod_proxy module at Apache startup time, by using the following directives in your httpd.conf file:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;"><span class="twikiNewLink">LoadModule</span> proxy_module modules/mod_proxy.so</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Include two directives in your httpd.conf file for each web application that you wish to forward to Tomcat. For example, to forward an application at context path /dev:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;"><span class="twikiNewLink">ProxyPass</span> /dev http://<ip address or URL>:8080/dev</li>
<li style="background-color: transparent;"><span class="twikiNewLink">ProxyPassReverse</span> /dev http://<ip address or URL>:8080/dev</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;">Which tells Apache to forward URLs of the form </span><span style="color: black; font-size: 14px; line-height: 20.46875px;">http://<ip address or URL>/dev/* to the Tomcat connector listening on port 8080</span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Now save the httpd.conf file and restart/reload the service to effect the changes.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">/etc/init.d/httpd restart/reload</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;">Configure your Tomcat to include a special <Connector> element, with appropriate proxy settings.</span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Edit the file /etc/tomcat6/server.xml as:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<Connector port="8080" className="org.apache.catalina.connector.http.HttpConnector" protocol="HTTP/1.1"</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
connectionTimeout="20000"</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
redirectPort="8443"</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
proxyName="<IP address>"</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
proxyPort="80" /></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Which will cause servlets inside this web application to think that all proxied requests were directed to server IP address on port 80.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Save the file and exit.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Restart tomcat6 service to effect the changes - /etc/init.d/tomcat6 restart</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Now access the dev directory content using below URL:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">http://localhost/dev (Instead of http://localhost:8080/dev)</li>
</ul>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="_AN3"></a><a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="AN3"></a></h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<a href="http://www.blogger.com/blogger.g?blogID=7478543360278883006" name="Securing_the_tomcat_webapp"></a>Securing the tomcat webapp</h1>
<h1 style="background-color: white; color: #630000; font-family: arial, verdana, sans-serif; font-size: 24px; font-weight: normal; line-height: 1em; margin: 0px 0px 0.5em; padding: 0.15em 0px 0px;">
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
We need to enable the <span class="twikiNewLink">MemoryRealm</span>. We can do so by adding below line to the server.xml file inside our tomcat’s conf directory.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">vim /etc/tomcat6/server.xml</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;"><Realm className="org.apache.catalina.realm.MemoryRealm" /></span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Save and exit the file.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
We need to add a user and a role for our webapp inside the tomcat-users.xml file, which can be found in the same directory.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Edit the file as shown below:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;"># vim /etc/tomcat6/tomcat-users.xml</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;"><role rolename="admin-gui"/></span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<user username="<user>" password="<password" roles="admin-gui"/></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Save and exit</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
The next step will be to add the login information inside the webapp we want to protect. Open webapp’s web.xml file. Write the following lines in our web.xml (located inside the web-app element).</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;"># vim /etc/tomcat6/web.xml</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;"></welcome-file-list></span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<security-constraint></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<web-resource-collection></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<web-resource-name>dev</web-resource-name></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<url-pattern>/*</url-pattern></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</web-resource-collection></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<auth-constraint></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<role-name>admin-gui</role-name></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</auth-constraint></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</security-constraint></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<login-config></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<auth-method>BASIC</auth-method></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
<realm-name>dev</realm-name></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</login-config></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</web-app></div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Save and exit the file.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Restart tomcat6 - /etc/init.d/tomcat6 restart.</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
Now access below URL, So that it will prompt you for credentials:</div>
<div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;">http://localhost/dev</li>
</ul>
<span style="color: black; font-size: 14px; line-height: 20.46875px;">Enter below credentials which were entered in the tomcat-users.xml file earlier:</span><div style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 1em;">
</div>
<ul style="color: black; font-size: 14px; line-height: 20.46875px; margin-top: 0px;">
<li style="background-color: transparent;"><span class="twikiNewLink">UserName</span>: <user></li>
<li style="background-color: transparent;">Password: <password></li>
</ul>
</h1>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-75283635082737327482013-05-11T08:24:00.000-07:002013-05-11T08:24:48.417-07:00How to disable HTTP Trace & Track methods?<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
The TRACE and TRACK protocols are HTTP methods used in the debugging of webserver connections.</div>
<div>
<div>
<br /></div>
<div>
Although these methods are useful for legitimate purposes, they may compromise the security of your server by enabling cross-site scripting attacks (XST). By exploiting certain browser vulnerabilities, an attacker may manipulate the TRACE and TRACK methods to intercept your visitors’ sensitive data. The solution for this is to disable these methods on your webserver.</div>
</div>
<div>
<br /></div>
<div>
By default this method is enabled in Apache.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><u>Verification</u></b></div>
<div>
<b><u><br /></u></b></div>
<div>
Here is an example on how to check your webserver if HTTP TRACE is enabled.</div>
<div>
<br /></div>
<div>
<div>
[root@cluster2 ~]# telnet 127.0.0.1 80</div>
<div>
Trying 127.0.0.1...</div>
<div>
Connected to 127.0.0.1.</div>
<div>
Escape character is '^]'.</div>
<div>
TRACE / HTTP/1.1</div>
<div>
Host: 127.0.0.1</div>
<div>
Here Press ENTER twice!</div>
</div>
<div>
<div>
<br /></div>
<div>
HTTP/1.1 200 OK</div>
<div>
Date: Sat, 11 May 2013 14:46:59 GMT</div>
<div>
Server: Apache/2.2.3 (Red Hat)</div>
<div>
Connection: close</div>
<div>
Transfer-Encoding: chunked</div>
<div>
Content-Type: message/http</div>
<div>
<br /></div>
<div>
25</div>
<div>
TRACE / HTTP/1.1</div>
<div>
Host: 127.0.0.1</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
0</div>
<div>
<br /></div>
<div>
Connection closed by foreign host.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKuTMzeFQV36AwCBL7kWcERTtbb-en9Y7RzHaWIUEA90otFStqd10jmijij0vubVURCPkAmg_b_E4DTrhpAG5zCZPKaklMtYJI_oONymHviJeO7X2MGfNkGb3msKxMstzwVpNYCAaqOps/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKuTMzeFQV36AwCBL7kWcERTtbb-en9Y7RzHaWIUEA90otFStqd10jmijij0vubVURCPkAmg_b_E4DTrhpAG5zCZPKaklMtYJI_oONymHviJeO7X2MGfNkGb3msKxMstzwVpNYCAaqOps/s400/1.JPG" width="391" /></a></div>
<div>
<b><u><br /></u></b></div>
<div>
<br /></div>
<div>
<br /><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
To disable TRACE and TRACK HTTP methods on your Apache-powered webserver, add the following directives to your main configuration file /etc/httpd/conf/httpd.conf<br />
<br />
<br />
<b>RewriteEngine on</b><br />
<b>RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)</b><br />
<b>RewriteRule .* - [F]</b><br />
<br />
These directives disable the TRACE and TRACK methods via the following process:<br />
<br />
<b>RewriteEngine on</b> — enables Apache’s rewrite module (this directive is not required if already present in your htaccess file)<br />
<br />
<b>RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)</b> — targets all TRACE and TRACK request methods for the following rule<br />
<br />
<b>RewriteRule .* - [F]</b> — return a 403 Forbidden error response for all matched conditions (i.e., all TRACE and TRACK methods)<br />
<br />
With these rules in place, your site is protected against one more potential security vulnerability<br />
<br />
So add these 3 lines as shown below:<br />
<br />
<b># vim /etc/httpd/conf/httpd.conf</b><br />
<br />
<br />
<b><VirtualHost www.example.com></b><br />
<b>...</b><br />
<b># disable TRACE in the www.example.com virtual host</b><br />
<b>RewriteEngine on</b><br />
<b>RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)</b><br />
<b>RewriteRule .* - [F]</b><br />
<b></VirtualHost></b><br />
<b><br /></b>
<b>Save & Exit</b><br />
<b><br /></b>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_hUmEAJ41oHzOViMZvpD_ISOF6FjwOmkSvR5_nY8qidDr6k0-6x7ClIRBvyKZxcbTuaCSgtCYqXYr4fc-f8hdI3Y-KMMOCdUzeSHP0TboVUWry6eop7_ziPKbWVx21qrNJmcyquFyMWc/s1600/2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_hUmEAJ41oHzOViMZvpD_ISOF6FjwOmkSvR5_nY8qidDr6k0-6x7ClIRBvyKZxcbTuaCSgtCYqXYr4fc-f8hdI3Y-KMMOCdUzeSHP0TboVUWry6eop7_ziPKbWVx21qrNJmcyquFyMWc/s400/2.JPG" width="400" /></a></div>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b><br /></b></u>
<u><b>Note:</b></u><br />
If you have N number of Virtual Hosts configured, Then you need to do the same for all Virtual Hosts.<br />
<b>mod_rewrite must be active for these directives to be accepted.</b><br />
<br />
<br />
<br />
Now restart your apache service <b>/etc/init.d/httpd restart</b><br />
<b><br /></b>
Here is an example on how to check your webserver if HTTP TRACE is disabled:<br />
<br />
<br />
[root@cluster2 ~]# telnet 127.0.0.1 80<br />
Trying 127.0.0.1...<br />
Connected to localhost.localdomain (127.0.0.1).<br />
Escape character is '^]'.<br />
TRACE / HTTP/1.1<br />
Host: 127.0.0.1<br />
Here Press ENTER twice!<br />
<br />
HTTP/1.1 403 Forbidden<br />
Date: Sat, 11 May 2013 15:08:59 GMT<br />
Server: Apache/2.2.3 (Red Hat)<br />
Accept-Ranges: bytes<br />
Content-Length: 3985<br />
Connection: close<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmZ1htr3cgNIONYv42sdAcHz1Ew68BDdmYunAcClXKE08ehgwb3Ta_zLdnldj3ARByS0ulUJE5Q4yR1yx95oi5UsvxqqiT6EcGvx2147gyMNhiYRQ8wXYRfMdD1uynY4sZt6lVXR4FYCU/s1600/3.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmZ1htr3cgNIONYv42sdAcHz1Ew68BDdmYunAcClXKE08ehgwb3Ta_zLdnldj3ARByS0ulUJE5Q4yR1yx95oi5UsvxqqiT6EcGvx2147gyMNhiYRQ8wXYRfMdD1uynY4sZt6lVXR4FYCU/s640/3.JPG" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Also verify the apache access log file:</div>
<div>
<br /></div>
<div>
<div>
<b><u>Before TRACE disable:</u></b></div>
<div>
<br /></div>
<div>
127.0.0.1 - - [11/May/2013:07:31:49 -0700] "<b>TRACE / HTTP/1.1" 200</b> 37 "-" "-"</div>
<div>
<br /></div>
<div>
<b><u>After TRACE disable</u></b></div>
<div>
<br /></div>
<div>
127.0.0.1 - - [11/May/2013:08:04:51 -0700] "<b>TRACE / HTTP/1.1" 403</b> 3985</div>
</div>
<div>
<br /></div>
<div>
So Now your site is protected against one more potential security vulnerability...... :)</div>
<br />
<br />
</div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-91912400040151745212013-04-24T07:14:00.000-07:002013-04-24T07:14:28.397-07:00How to install JDK-1.6 and Tomcat 7 on RHEL/CentOS?<div dir="ltr" style="text-align: left;" trbidi="on">
This is a small article describes how to install JDK-1.6 and Tomcat 7 on a Linux box.<br />
<br />
<b><u>Prerequisites</u></b><br />
<b><u><br /></u></b>
1. jdk-6u39-linux-i586.bin<br />
2. apache-tomcat-7.0.39.tar.gz<br />
<br />
Download the files using below URLs<br />
<br />
<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</a><br />
<a href="http://tomcat.apache.org/download-70.cgi#7.0.39">http://tomcat.apache.org/download-70.cgi#7.0.39</a><br />
<br />
According to my configuration I have downloaded both the files to /opt folder.<br />
<br />
After downloading install JDK as shown below:<br />
<br />
<br />
<b>[root@cluster1 ~]# cd /opt/</b><br />
<b>[root@cluster1 opt]# ls -l</b><br />
<br />
<b>-rw-r--r-- 1 root root 71756435 Apr 24 06:18 jdk-6u39-linux-i586.bin</b><br />
<div>
<b><br /></b></div>
<div>
<b>Provide the execute permission to the bin file</b></div>
<div>
<b><br /></b></div>
<div>
<div>
<b>[root@cluster1 opt]# chmod +x jdk-6u39-linux-i586.bin</b></div>
</div>
<div>
<b><br /></b></div>
<br />
<br />
<br />
<b>[root@cluster1 opt]# ls -l jdk-6u39-linux-i586.bin</b><br />
<b>-rwxr-xr-x 1 root root 71756435 Apr 24 06:18 jdk-6u39-linux-i586.bin</b><br />
<div>
<br /></div>
<div>
Now execute the below command to install JDK:</div>
<div>
<br /></div>
<div>
<b>[root@cluster1 opt]# ./jdk-6u39-linux-i586.bin</b></div>
<div>
<b><br /></b></div>
<div>
<div style="font-weight: bold;">
[root@cluster1 opt]# ./jdk-6u39-linux-i586.bin</div>
<div style="font-weight: bold;">
Unpacking...</div>
<div style="font-weight: bold;">
.</div>
<div style="font-weight: bold;">
.</div>
<div style="font-weight: bold;">
.</div>
<div style="font-weight: bold;">
<br /></div>
<div style="font-weight: bold;">
<div>
Press Enter to continue..... (Press enter key here to complete the unpacking)</div>
</div>
<div style="font-weight: bold;">
<br /></div>
<div>
Now You observe there is a folder created in /opt folder with the name jdk1.6.0_39</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# ll</b></div>
<div>
<b>drwxr-xr-x 8 root root 4096 Apr 24 06:23 jdk1.6.0_39</b></div>
<div>
<b>-rwxr-xr-x 1 root root 71756435 Apr 24 06:18 jdk-6u39-linux-i586.bin</b></div>
</div>
<div>
<br /></div>
<div>
<b><u>Now download and install tomcat using below URL:</u></b></div>
<div style="font-weight: bold;">
<br /></div>
<div>
<b><a href="http://tomcat.apache.org/download-70.cgi#7.0.39">http://tomcat.apache.org/download-70.cgi#7.0.39</a></b></div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# wget http://apache.techartifact.com/mirror/tomcat/tomcat-7/v7.0.39/bin/apache-tomcat-7.0.39.tar.gz</b></div>
</div>
<div>
<br /></div>
<div>
Now extract the tar ball using below command:</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# tar -zxvf apache-tomcat-7.0.39.tar.gz</b></div>
</div>
<div>
<br /></div>
<div>
Now check the folder apache-tomcat-7.0.39 in /opt directory.</div>
<div>
<b><br /></b></div>
<div>
<b>[root@cluster1 opt]# ls -l</b></div>
<div>
<div>
<b>total 77824</b></div>
<div>
<b>drwxr-xr-x 9 root root 4096 Apr 24 06:25 apache-tomcat-7.0.39</b></div>
<div>
<b>-rw-r--r-- 1 root root 7831716 Apr 24 06:24 apache-tomcat-7.0.39.tar.gz</b></div>
<div>
<br /></div>
</div>
<div>
The tomcat startup and shutdown scripts are located in below paths:</div>
<div>
<br /></div>
<div>
<b>Startup script path: /opt/apache-tomcat-7.0.39/bin/startup.sh</b></div>
<div>
<b>Shutdown script path: /opt/apache-tomcat-7.0.39/bin/shutdown.sh</b></div>
<div>
<b><br /></b></div>
<div>
Now one more step ahead to complete this configuration.</div>
<div>
You need to <span style="background-color: white; color: #222222; font-family: arial, sans-serif;">setup Tomcat to run as a service. So create a service (file) as shown below:</span></div>
<div>
<span style="background-color: white; color: #222222; font-family: arial, sans-serif;"><br /></span></div>
<div>
<span style="background-color: white;"><div style="color: #222222; font-family: arial, sans-serif; font-weight: bold;">
[root@cluster1 opt]# vim /etc/init.d/tomcat7</div>
<div style="color: #222222; font-family: arial, sans-serif; font-weight: bold;">
<br /></div>
<div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>#!/bin/bash<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b># description:
Tomcat Start Stop Restart<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b># processname:
tomcat<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b># chkconfig:
234 20 80<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>JAVA_HOME=/opt/jdk1.6.0_39/
<u># This is your java home path</u><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>export
JAVA_HOME<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>PATH=$JAVA_HOME/bin:$PATH<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>export PATH<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>CATALINA_HOME=/opt/apache-tomcat-7.0.39 <u>#
This is your tomcat home directory</u><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>case $1 in<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>start)<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>sh
$CATALINA_HOME/bin/startup.sh<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>;;<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>stop)<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>sh
$CATALINA_HOME/bin/shutdown.sh<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>;;<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>restart)<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>sh
$CATALINA_HOME/bin/shutdown.sh<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>sh
$CATALINA_HOME/bin/startup.sh<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>;;<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>esac<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #222222; font-family: Arial, sans-serif;"><b>exit 0</b><o:p></o:p></span></div>
<div class="MsoNormal" style="font-weight: bold; margin-bottom: 0.0001pt;">
<br /></div>
</div>
</span></div>
<div style="font-weight: bold;">
<br /></div>
<div style="font-weight: bold;">
Save and exit.</div>
<div style="font-weight: bold;">
<br /></div>
<div>
Now provide the execute permission to this service.</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# chmod +x /etc/init.d/tomcat7</b></div>
</div>
<div>
<br /></div>
<div>
Now Make this service to be run after restarting the Linux box as well by doing chkconfig:</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# chkconfig tomcat7 on</b></div>
<div>
<b>[root@cluster1 opt]# chkconfig --list tomcat7</b></div>
<div>
<b>tomcat7 0:off 1:off 2:on 3:on 4:on 5:on 6:off</b></div>
</div>
<div style="font-weight: bold;">
<br /></div>
<div>
Now all is set and it is the time to start your tomcat service and verify the site.</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# /etc/init.d/tomcat7 start</b></div>
<div>
<b>Using CATALINA_BASE: /opt/apache-tomcat-7.0.39</b></div>
<div>
<b>Using CATALINA_HOME: /opt/apache-tomcat-7.0.39</b></div>
<div>
<b>Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.39/temp</b></div>
<div>
<b>Using JRE_HOME: /opt/jdk1.6.0_39/</b></div>
<div>
<b>Using CLASSPATH: /opt/apache-tomcat-7.0.39/bin/bootstrap.jar:/opt/apache-tomcat-7.0.39/bin/tomcat-juli.jar</b></div>
</div>
<div>
<br /></div>
<div>
Verify the service is running or not:</div>
</div>
<div>
<br /></div>
<div>
<div>
<b>[root@cluster1 opt]# ps -ef | grep java</b></div>
<div>
<b>root 8873 1 8 07:05 pts/3 00:00:02 /opt/jdk1.6.0_39//bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-7.0.39/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-7.0.39/endorsed -classpath /opt/apache-tomcat-7.0.39/bin/bootstrap.jar:/opt/apache-tomcat-7.0.39/bin/tomcat-juli.jar -Dcatalina.base=/opt/apache-tomcat-7.0.39 -Dcatalina.home=/opt/apache-tomcat-7.0.39 -Djava.io.tmpdir=/opt/apache-tomcat-7.0.39/temp org.apache.catalina.startup.Bootstrap start</b></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;">We can now access the Tomcat Manager page at:</span><br style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;" /><br style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;" /><span style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;"><b>http://yourdomain.com:8080 or http://yourIPaddress:8080</b> and we should see the Tomcat home page.</span></div>
<div>
<span style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;"><br /></span></div>
<div>
<span style="background-color: white; font-family: 'Lucida Grande', lucida, Geneva, Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Lucida Grande, lucida, Geneva, Arial, sans-serif;">All the best.</span></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-61650883414597232602013-04-04T07:51:00.000-07:002013-04-04T07:51:39.582-07:00How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
This tutorial describes how to give users chrooted SSH and/or chrooted SFTP access on linux environment.<br />
Using this setup, the users cannot see your whole system. Your users will be jailed in a specific directory which they will not be able to break out off.<br />
<br />
If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail.<br />
<br />
In a typical sftp scenario when chroot sftp is not setup, if you use sftp, you can see whole file system based on the permissions assigned to you.<br />
<br />
If you want to give sftp access on your system to outside vendors to transfer files, you should not use standard sftp. Instead, you should setup Chroot SFTP Jail as explained below.<br />
<br />
<b><u>Non-Chroot SFTP Environment</u></b><br />
<b><u><br /></u></b>
In the following example (a typical sftp environment), user1 can sftp to the system, and view /etc folder and download the files from there:<br />
<br />
<b># sftp user1@station1.example.com</b><br />
<b>user1@station1.example.com's password:</b><br />
<b>sftp> pwd</b><br />
<b>Remote working directory: /home/user1</b><br />
<b><br /></b>
<b>sftp> ls</b><br />
<b>file1 abc.txt data </b><br />
<b><br /></b>
<b>sftp> cd /etc</b><br />
<b>sftp> ls -l passwd</b><br />
<b>-rw-r--r-- 0 0 0 3750 Dec 29 23:09 passwd</b><br />
<b><br /></b>
<b>sftp> get passwd</b><br />
<b>Fetching /etc/passwd to passwd</b><br />
<b>/etc/passwd 100% 2600 2.9KB/s 00:00</b><br />
<br />
<b><u>Chroot SFTP Environment</u></b><br />
<b><u><br /></u></b>
In the following example, user1 can sftp to the system, and view only the directory that you've designated for user1 to perform sftp (i.e /incoming).<br />
<br />
When user1 tries to perform ‘cd /etc’, it will give an error message. Since SFTP is setup in an chroot environment, user1 cannot view any other files in the system.<br />
<br />
<b># sftp user1@station1.example.com</b><br />
<b>user1@station1.example.com's password:</b><br />
<b>sftp> pwd</b><br />
<b>Remote working directory: /home/user1</b><br />
<b><br /></b>
<b>sftp> ls</b><br />
<b>sftp> cd /etc</b><br />
<b>Couldn't canonicalise: No such file or directory</b><br />
<br />
<b><u>So I believe you all understood what is Chroot SFTP environment is, let us see how to configure this.</u></b><br />
<b><u><br /></u></b>
<b><u>Creating a New Group</u></b><br />
<b><u><br /></u></b>
Create a group called sftpusers. Only users who belong to this group will be automatically restricted to the SFTP chroot environment on this system.<br />
<br />
<b># groupadd sftpusers</b><br />
<br />
<b><u>Create a new User or Modify an Existing User</u></b><br />
<br />
Let us say you want to create an user user1 who should be allowed only to perform SFTP in a chroot environment, and should not be allowed to perform SSH.<br />
<br />
Now create a new user and give password as shown below:<br />
<b><br /></b>
<b># useradd -g sftpusers -d /incoming -s /sbin/nologin user1</b><br />
<b># passwd user1</b><br />
<br />
Verify that the user got created properly or not<br />
<b># grep user1 /etc/passwd</b><br />
<b>user1:x:520:520::/incoming:/sbin/nologin</b><br />
<b><br /></b>
If you want to modify an existing user user2 and make him an sftp user only and put him in the chroot sftp jail, do the following:<br />
<br />
<b># usermod -g sftpusers -d /incoming -s /sbin/nologin user2</b><br />
<b><u><br /></u></b>
<b><u>Configure sftp-server</u></b><br />
<b><u><br /></u></b>
Modify the the /etc/ssh/sshd_config file and comment out the below line:<br />
<br />
<b># vim /etc/ssh/sshd_config</b><br />
<b>#Subsystem sftp /usr/libexec/openssh/sftp-server</b><br />
<b><br /></b>
Next, add the following line to the /etc/ssh/sshd_config file<br />
<b>Subsystem sftp internal-sftp</b><br />
Save and exit the file<br />
<br />
<b><u>Specify Chroot Directory for a Group</u></b><br />
<br />
You want to put only certain users (i.e users who belongs to sftpusers group) in the chroot jail environment. Add the following lines at the end of /etc/ssh/sshd_config<br />
<br />
<b># tail /etc/ssh/sshd_config</b><br />
<b>Match Group sftpusers</b><br />
<b> ChrootDirectory /sftp/%u</b><br />
<b> ForceCommand internal-sftp</b><br />
<br />
<b>Match Group sftpusers</b> – This indicates that the following lines will be matched only for users who belong to group sftpusers<br />
<br />
<b>ChrootDirectory /sftp/%u </b>– This is the path that will be used for chroot after the user is authenticated. %u indicates the user. So, for user1, this will be /sftp/user1.<br />
<br />
<b>ForceCommand internal-sftp</b> – This forces the execution of the internal-sftp and ignores any command that are mentioned in the ~/.ssh/rc file.<br />
<br />
<b>NOTE:</b> <b>The Match keyword is not supported in older versions (<5) on SSH so an upgrade of openssh will be necessary.</b><br />
<b><br /></b>
<b><u>Create sftp Home Directory</u></b><br />
<br />
Since we’ve specified /sftp as ChrootDirectory above, create this directory (which is equivalent of your /home directory)<br />
<br />
<b># mkdir /sftp</b><br />
<b># mkdir /sftp/user1</b><br />
<br />
So, /sftp/user1 is equivalent to / for the user1. When user1 sftp to the system, and performs “cd /”, they’ll be seeing only the content of the directories under “/sftp/user1” (and not the real / of the system). This is how the chroot works<br />
<br />
So, under this directory /sftp/user1, create any sub directory that you like user to see. For example, create a incoming directory where users can sftp their files.<br />
<br />
<b># mkdir /sftp/user1/incoming</b><br />
<b><br /></b>
<b><u>Setup Appropriate Permissions</u></b><br />
<b><u><br /></u></b>
For chroot to work properly, you need to make sure appropriate permissions are setup properly on the directory you just created above.<br />
<br />
Set the ownership to the user, and group to the sftpusers group as shown below.<br />
<b><br /></b>
<b># chown user1:sftpusers /sftp/user1/incoming</b><br />
<b><br /></b>
Now check the permissions of the directories as shown below:<br />
<br />
<b># ls -ld /sftp/user1/incoming</b><br />
drwxr-xr-x 2 user1 sftpusers 4096 Apr 04 18:31 /sftp/user1/incoming<br />
<br />
<b># ls -ld /sftp/user1</b><br />
drwxr-xr-x 3 root root 4096 Apr 04 18:31 /sftp/user1<br />
<br />
<b># ls -ld /sftp</b><br />
drwxr-xr-x 3 root root 4096 Apr 04 18:31 /sftp<br />
<br />
Now restart sshd and check/test your Chroot SFTP configuration<br />
<br />
<b># /etc/init.d/sshd restart</b><br />
<b><br /></b>
Now you can observe that when user1 does sftp, and does “cd /”, he can only see incoming directory.<br />
<br />
<b># sftp user1@station1.example.com</b><br />
<b>user1@station1.example.com's password:</b><br />
<br />
<b>sftp> pwd</b><br />
<b>Remote working directory: /incoming</b><br />
<br />
<b>sftp> cd /</b><br />
<b>sftp> ls</b><br />
<b>incoming</b><br />
<br />
When user1 transfers any files to the /incoming directory from the sftp, they’ll be really located under /sftp/user1/incoming directory on the system.<br />
<div>
<br /></div>
<div>
Good Luck..... :)</div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-78844023925696487462013-03-03T06:52:00.000-08:002013-03-03T06:52:39.650-08:00Monitoring Windows Machines using Nagios<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
This article describes how
you can monitor "private" services and attributes of Windows machines
like:<o:p></o:p></div>
<ul type="disc">
<li class="MsoNormal">CPU load<o:p></o:p></li>
<li class="MsoNormal">Disk usage<o:p></o:p></li>
<li class="MsoNormal">Memory usage<o:p></o:p></li>
<li class="MsoNormal">Service states<o:p></o:p></li>
<li class="MsoNormal">Running processes, etc …<o:p></o:p></li>
</ul>
<div class="MsoNormal">
Monitoring private services
or attributes of a Windows machine requires an agent to be installed on the
windows box. This agent acts as a proxy between the Nagios plugin that does the
monitoring and the actual service or attribute of the Windows machine. Without
installing an agent on the Windows box, Nagios would be unable to monitor
private services or attributes of the Windows box.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Before proceeding install
Nagios server using URL: <a href="http://boosturfuture.blogspot.in/2013/02/installation-and-configuration-of.html">http://boosturfuture.blogspot.in/2013/02/installation-and-configuration-of.html</a><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now install the <a href="http://sourceforge.net/projects/nscplus">NSClient++</a> addon on the
Wndows machine and using the <i>check_nt</i> plugin nagios will communicate
with the NSClient++ addon.<o:p></o:p></div>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Now follow the below
procedure:<o:p></o:p></span><br />
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Edit the main Nagios config file on the Nagios server:<o:p></o:p></span><br />
<span style="font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b># vi
/usr/local/nagios/etc/nagios.cfg<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
Remove the leading pound
(#) sign from the following line in the main configuration file: <o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg (Remove the #
symbol)<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial;">Save the file and exit.</span><o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial;">Now install the agent NSClient++ on the
remote windows box<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial;">You can download the agent from <a href="http://sourceforge.net/projects/nscplus/">http://sourceforge.net/projects/nscplus/</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<br />
<ul style="text-align: left;">
<li><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Unzip the NSClient++
files into a new C:\NSClient++ directory</span></li>
<li><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Open a command prompt and change to the C:\NSClient++
directory</span></li>
<li><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Register the NSClient++ system service with the
following command:</span></li>
</ul>
<br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> nsclient++ /install</span></pre>
<pre><ul style="text-align: left;">
<li><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Install the NSClient++ systray with the following </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;">command ('SysTray' is case-sensitive):</span></li>
</ul>
</pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> nsclient++ SysTray</span></pre>
<pre><ul style="text-align: left;">
<li><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Open the services manager and make sure the NSClientpp </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;">service is allowed to interact with the desktop (see the 'Log On' tab of the </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;">services manager). If it isn't already allowed to interact with the desktop,</span></li>
</ul>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">check the box to allow it to.</span></pre>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<img alt="NSClientpp" src="http://nagios.sourceforge.net/docs/3_0/images/nscpp.png" /><br />
<br />
<div class="MsoNormal">
Edit the NSC.INI file
(located in the C:\NSClient++ directory) and make the following changes:<o:p></o:p></div>
<ul type="disc">
<li class="MsoNormal">Uncomment all the modules listed in the [modules]
section, except for CheckWMI.dll and RemoteConfiguration.dll<o:p></o:p></li>
<li class="MsoNormal">Optionally require a password for clients by changing
the 'password' option in the [Settings] section.<o:p></o:p></li>
<li class="MsoNormal">Uncomment the 'allowed_hosts' option in the [Settings]
section. Add the IP address of the Nagios server to this line, or leave it
blank to allow all hosts to connect.<o:p></o:p></li>
<li class="MsoNormal">Make sure the 'port' option in the [NSClient] section
is uncommented and set to '12489' (the default port).<o:p></o:p></li>
</ul>
<div class="MsoNormal">
Start the NSClient++
service with the following command:<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
nsclient++
/start<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
If installed properly, a
new icon should appear in your system tray. It will be a yellow circle with a
black 'M' inside.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Success! The Windows
server can now be added to the Nagios monitoring configuration...<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Now it is the time for the configuration in the Nagios server<o:p></o:p></div>
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Calibri, sans-serif; font-size: 11pt;">Open
the<span class="apple-converted-space"> </span></span><i>windows.cfg</i><span class="apple-converted-space"> file
for editing.</span><o:p></o:p><br />
<span style="font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Add a new<span class="apple-converted-space"> </span>host definition for the Windows
machine that you're going to monitor. If this is the *first* Windows machine
you're monitoring, you can simply modify the sample host definition in<span class="apple-converted-space"> </span><i>windows.cfg</i>. Change the<span class="apple-converted-space"> </span><i>host_name</i>,<i>alias</i>, and<span class="apple-converted-space"> </span><i>address</i><span class="apple-converted-space"> </span>fields to appropriate values for the
Windows box.<o:p></o:p></span><br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;">define host{<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> use windows-server ; Inherit default values from a Windows server template (make sure you keep this line!)<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> host_name winserver (Your server name)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> alias My Windows Server</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> address XX.XX.XX.XX (Your server IP)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> }</span></pre>
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Calibri, sans-serif; font-size: 11pt;">Now
you can add some service definitions (to the same configuration file) in order
to tell Nagios to monitor different aspects of the Windows machine. If this is
the first Windows machine you're monitoring, you can simply modify the sample
service definitions in<span class="apple-converted-space"> </span></span><i>windows.cfg</i>.<o:p></o:p><br />
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Calibri, sans-serif; font-size: 11pt;">Add
the following service definition to monitor the uptime of the Windows server.</span><o:p></o:p><br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;">define service{<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> use generic-service<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> host_name winserver (Your windows server name as defined in the define host section)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> service_description Uptime</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> check_command check_nt!UPTIME</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> }</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Add the following
service definition to monitor the CPU utilization on the Windows server and
generate a CRITICAL alert if the 5-minute CPU load is 90% or more or a WARNING
alert if the 5-minute load is 80% or greater.<o:p></o:p></span><br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;">define service{<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> use generic-service</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> host_name winserver (Your windows server name as defined in the define host section)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> service_description CPU Load</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> check_command check_nt!CPULOAD!-l 5,80,90</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> }</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Add the following
service definition to monitor memory usage on the Windows server and generate a
CRITICAL alert if memory usage is 90% or more or a WARNING alert if memory
usage is 80% or greater.<o:p></o:p></span><br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;">define service{<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> use generic-service</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> host_name winserver (Your windows server name as defined in the define host section)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> service_description Memory Usage</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> check_command check_nt!MEMUSE!-w 80 -c 90</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> }</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Add the following service definition to monitor usage
of the C:\ drive on the Windows server and generate a CRITICAL alert if disk
usage is 90% or more or a WARNING alert if disk usage is 80% or greater.<o:p></o:p></span><br />
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;">define service{<o:p></o:p></span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> use generic-service</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> host_name winserver (Your windows server name as defined in the define host section)</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> service_description C:\ Drive Space</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90</span></pre>
<pre><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> </span><span style="font-family: Calibri, sans-serif; font-size: 11pt;"> }</span></pre>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;"><br /></span>
<span style="font-family: Calibri, sans-serif; font-size: 11pt;">Now save and exit the
file.<o:p></o:p></span><br />
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">Verify the sample Nagios
configuration files(Syntax verification)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"># /usr/local/nagios/bin/nagios -v
/usr/local/nagios/etc/nagios.cfg</span></b><span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";">If there are no errors, start Nagios.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 12.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"># service nagios start</span></b><span style="color: #222222; mso-bidi-font-family: Arial; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<o:p>Now check the Nagios GUI to check newly added host and services.</o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<o:p><br /></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com1tag:blogger.com,1999:blog-7478543360278883006.post-83598549747290866092013-03-03T06:02:00.002-08:002013-03-03T06:03:38.418-08:00How to Monitoring Linux/Unix Machines using Nagios<div dir="ltr" style="text-align: left;" trbidi="on">
Install Nagios using URL: http://boosturfuture.blogspot.in/2013/02/installation-and-configuration-of.html<br />
<br />
After installation follow below procedure:<br />
<br />
<br />
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">First define the contacts in the file </span><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt;">/usr/local//nagios/etc/objects/contacts.cfg
<o:p></o:p></span></h1>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define contact{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> contact_name nagiosadmin<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use generic-contact<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> alias Nagios Admin<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> email <enter the
notifying email ids separated by commas><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define contactgroup{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> contactgroup_name admins<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> alias Nagios Administrators<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> members nagiosadmin<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">The notification will be sent to members
mentioned in the nagiosadmin contacts.<o:p></o:p></span></h1>
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;"> </span></h1>
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">There are 2 ways to define services:<o:p></o:p></span></h1>
<h1 style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Arial;">1.<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">Service definition for local machine.<o:p></o:p></span></h1>
<h1 style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Arial;">2.<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">Service definition for remote host<o:p></o:p></span></h1>
<h1>
<u><span style="font-family: "Arial","sans-serif"; font-size: 11.0pt;">Service
definition for local machine<o:p></o:p></span></u></h1>
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; font-weight: normal; mso-bidi-font-weight: bold;">Before proceeding first you need to define a
hostgroup as shown below:<o:p></o:p></span></h1>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define hostgroup{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroup_name groupname1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> members server1,server2<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="font-family: "Arial","sans-serif"; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Now define a host:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define host {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use generic-host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> host_name server1 ; IP address/hostname of the
machine<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 45.8pt; text-indent: -45.8pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> alias server1 ; A longer name associated
with the host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> address XX.XX.XX.XX ; IP address of the host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroups groupname1 ; Host groups this host is associated
with<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<h1>
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; font-weight: normal; mso-bidi-font-weight: bold;"> </span></h1>
<div class="MsoNormal">
Now it is the time for defining services to be monitored on
the defined host:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Service definition
for PING<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define service{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use
generic-service,srv-pnp ;
Name of service template to use<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroup_name groupname1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> service_description PING<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> check_command check_ping!100.0,20%!500.0,60%<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> contact_groups admins<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Service definition
for website check<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define service{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use
generic-service,srv-pnp<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> host_name server1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> contact_groups admins<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> service_description www.your website.com<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> check_command check_website! www.your website.com '<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u>Service definition
for remote host<o:p></o:p></u></b></div>
<div class="MsoNormal">
Before proceeding you need to install a NRPE plugin on the
remote host.</div>
<br />
NRPE is an addon that allows you to execute <a href="http://nagios.sourceforge.net/docs/3_0/plugins.html"><span style="color: windowtext; text-decoration: none; text-underline: none;">plugins</span></a>
on remote Linux/Unix hosts. This is useful if you need to monitor local
resources/attributes like disk usage, CPU load, memory usage, etc. on a remote
host. Similiar functionality can be accomplished by using the <i>check_by_ssh</i>
plugin, although it can impose a higher CPU load on the monitoring machine -
especially if you are monitoring hundreds or thousands of hosts. <br />
Download the NRPE plugin on the Remote Host using below URL:<br />
<br />
<a href="http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz">http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz</a><br />
<br />
Now extract the tar ball: tar xvfz nrpe-2.13.tar.gz<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"># cd nrpe-2.13<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"># ./configure<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"># make all<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"># make install-plugin<o:p></o:p></span></div>
Now I want to check the remote machine disk space. <br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Remote Host Configuration
after installing NRPE<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<!--[if !supportLists]--><b><span style="font-family: "Arial","sans-serif"; mso-fareast-font-family: Arial; mso-font-kerning: 18.0pt;">1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal;"> </span></span></b><!--[endif]--><span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Define a NRPE command in the
config file <b>/usr/local/nagios/etc/nrpe.cfg </b>as shown below:<b><o:p></o:p></b></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt;">
<b><span style="font-family: "Arial","sans-serif"; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">command[check_disk]=/usr/local/nagios/libexec/check_disk
-w 20% -c 10% -p /<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: Arial; mso-font-kerning: 18.0pt;">2.<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Save and quit.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><u><span style="font-family: "Arial","sans-serif"; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Configuration on the Nagios server<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">Now define the host and the
service as shown below:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define Remote hostgroup{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroup_name Remote Host Groupname1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> members Remote server1,Remote server2<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define host {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use generic-host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> host_name Remote
Host1 ; IP address/hostname of the
machine<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 45.8pt; text-indent: -45.8pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> alias Remote
Host1 ; A longer name associated
with the host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> address XX.XX.XX.XX ; IP address of the host<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroups Remote
Host Groupname1 ; Host groups this host
is associated with<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">define service{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> use
generic-service,srv-pnp ;
Name of service template to use<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> hostgroup_name Remote Host Groupname1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> service_description Disk Size-Root<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> check_command check_nrpe!check_disk!20%!10%!/<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> contact_groups admins<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">The above service definition
confirms that we are checking the desk space for the members of the Remote Host
Groupname1 group.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 18.0pt;">You can also define the
service for a individual hosts instead of using groups.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now check for the configuration errors using below command</div>
<div class="MsoNormal">
<b><span style="font-family: "Arial","sans-serif";">#
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; mso-bidi-font-weight: bold;">If there are no errors restart the Nagios service<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="font-family: "Arial","sans-serif";">#
/etc/init.d/nagiosd restart<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Now Login to
the Web Interface using the below URL:<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="font-family: "Arial","sans-serif";"><br /></span></b></div>
<div class="MsoNormal">
<b><span style="font-family: "Arial","sans-serif";">http://<nagios server IP>/Nagios<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">You'll be
prompted for the username (nagiosadmin) and password you specified earlier.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Observe the
defined hosts and services in the GUI.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-16123824084155517682013-02-09T08:48:00.000-08:002013-02-09T08:52:31.314-08:00Installation of Nagios on CentOS<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Nagios is an open source computer system monitor, network monitoring and infrastructure monitoring software application. Nagios offers monitoring and alerting for servers, switches, applications, and services. It alerts users when things go wrong and alerts them again when the problem has been resolved.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Prerequisites to install Nagios</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Be as a root user and install the below packages:</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Apache</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">PHP</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">GCC compiler</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">GD development libraries</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Install the packages as show below:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># yum install httpd php gcc glibc glibc-common gd gd-devel</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Create a new nagios user account and give it a password(Let the password be example).</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># /usr/sbin/useradd -m nagios</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># passwd nagios</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Create a new nagcmd group for allowing external commands to be submitted through the web interface. </span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Add both the nagios user and the apache user to the group as shown below:</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># /usr/sbin/groupadd nagcmd</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># /usr/sbin/usermod -a -G nagcmd nagios</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># /usr/sbin/usermod -a -G nagcmd apache</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Download Nagios and the Plugins</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Create a directory for storing the downloads.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># mkdir /downloads</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># cd /downloads</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Download the source code tarballs of both Nagios and the Nagios plugins (visit <a href="http://www.nagios.org/download/">http://www.nagios.org/download/</a></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;"> for links to the latest versions).</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># nagios-<Version>.tar.gz</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># nagios-plugins-<Version>.tar.gz</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Compile and Install Nagios</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Extract the Nagios source code tarball.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># cd /downloads</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># tar xzvf nagios-<version>.tar.gz</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># cd nagios-<version></b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Run the Nagios configure script, passing the name of the group you created earlier like so:</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># ./configure --with-command-group=nagcmd</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Compile the Nagios source code.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make all</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Install binaries, init script, sample config files and set permissions on the external command directory.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install-init</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install-config</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install-commandmode</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;">Now t</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">he config files are located in the <b>/usr/local/nagios/etc</b> directory. These sample files should work fine for getting started with Nagios. You'll need to make just one change before you proceed.</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Open the <b>/usr/local/nagios/etc/objects/contacts.cfg</b> config file and change the email address associated with the nagiosadmin contact definition to the address you'd like to use for receiving alerts.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># vi /usr/local/nagios/etc/objects/contacts.cfg</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Configure the Web Interface</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Install the Nagios web config file in the Apache conf.d directory.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install-webconf</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you'll need it later.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Now Restart Apache to make the new settings take effect.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># service httpd restart (or) /etc/init.d/httpd restart</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Compile and Install the Nagios Plugins</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Extract the Nagios plugins source code tarball.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># cd /downloads</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># tar xzf nagios-plugins-<version>.tar.gz</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># cd nagios-plugins-<version></b></span></span></div>
<div class="MsoNormal">
<b style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;"># ./configure --with-nagios-user=nagios --with-nagios-group=nagios</b></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># make install</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Starting Nagios</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Add Nagios to the list of system services and have it automatically start when the system boots.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># chkconfig --add nagios</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># chkconfig nagios on</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Verify the sample Nagios configuration files(Syntax verification)</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">If there are no errors, start Nagios.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># service nagios start</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b><u>Modify SELinux Settings</u></b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">If your OS ships with SELinux (Security Enhanced Linux) installed and in Enforcing mode by default. This can result in "Internal Server Error"messages when you attempt to access the Nagios CGIs.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">See ifSELinux is in Enforcing mode.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># getenforce</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Make SELinux to Permissive mode.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># setenforce 0</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">To make this change permanent, you'll have to modify the settings in /etc/selinux/config and reboot.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Instead of disabling SELinux or setting it to permissive mode, you can use the following command to run the CGIs under SELinux enforcing/targeted mode:</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/</b></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b># chcon -R -t httpd_sys_content_t /usr/local/nagios/share/</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Now Login to the Web Interface using the below URL.You'll be prompted for the username (nagiosadmin) and password you specified earlier.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b>http://localhost/nagios/</b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">Happy Browsing..... :)</span></span></div>
<br /></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com1tag:blogger.com,1999:blog-7478543360278883006.post-90906267897660244482013-01-24T08:27:00.000-08:002013-01-24T08:27:42.551-08:00How to generate SSL Certificate & How to configure Secure Apache<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<b><u><span style="font-size: large;">Configuring Self Signed Certificate</span></u></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Install the below packages</div>
<div class="MsoNormal">
<b><u><br /></u></b></div>
<div class="MsoNormal">
# yum install openssl* -y</div>
<div class="MsoNormal">
# yum install mod_ssl* -y</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now open SSL configuration file and update the below entries:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
# vim /etc/pki/tls/openssl.cnf</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
dir =
/etc/pki/CA # Where everything
is kept</div>
<div class="MsoNormal">
certificate =
$dir/kalyan.crt # The CA certificate</div>
<div class="MsoNormal">
crl = $dir/kalyan.crl # The current CRL</div>
<div class="MsoNormal">
private_key =
$dir/private/kalyan.key # The private key</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now under [ req_distinguished_name ] section modify below
parameters as</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
countryName_default = IN</div>
<div class="MsoNormal">
stateOrProvinceName_default = AP</div>
<div class="MsoNormal">
localityName_default = Hyd</div>
<div class="MsoNormal">
0.organizationName_default = Example</div>
<div class="MsoNormal">
Now save and exit.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now create the required directories as shown below:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
cd /etc/pki/CA</div>
<div class="MsoNormal">
mkdir {certs,crl,newcerts}</div>
<div class="MsoNormal">
touch index.txt</div>
<div class="MsoNormal">
echo "01" > serial</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Be in /etc/pki/CA directory and run below commands:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b># (umask 077; openssl genrsa -out private/kalyan.key -des3 2048)</b></div>
<div class="MsoNormal">
Enter pass phrase for private/kalyan.key:redhat</div>
<div class="MsoNormal">
Verifying - Enter pass phrase for private/kalyan.key:redhat</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b># openssl req -new -x509 -key private/kalyan.key -days 365 > kalyan.crt</b></div>
<div class="MsoNormal">
Enter pass phrase for private/kalyan.key:redhat</div>
<div class="MsoNormal">
Country Name (2 letter code) [IN]:IN</div>
<div class="MsoNormal">
State or Province Name (full name) [AP]:AP</div>
<div class="MsoNormal">
Locality Name (eg, city) [Hyd]:Hyd</div>
<div class="MsoNormal">
Organization Name (eg, company) [Example]:Example</div>
<div class="MsoNormal">
Organizational Unit Name (eg, section) []:IT</div>
<div class="MsoNormal">
Common Name (eg, your name or your server's hostname) []:sample.kalyan.com</div>
<div class="MsoNormal">
Email Address []:ikalyanp@gmail.com</div>
<div>
<br /></div>
<div>
Now verify the certificate & key files in the below locations:</div>
<div>
<br /></div>
<div>
<div>
ls /etc/pki/CA/kalyan.crt</div>
<div>
ls /etc/pki/CA/private/kalyan.key</div>
</div>
<div>
<br /></div>
<div>
Now the SSL Self signed certificate was generated.</div>
<div>
<br /></div>
<div>
<b><u><span style="font-size: large;">Configuring Secure Apache</span></u></b></div>
<div>
<b><u><span style="font-size: large;"><br /></span></u></b></div>
<div>
Install the packages</div>
<div>
<br /></div>
<div>
<div class="MsoNormal">
# yum install httpd* -y</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Restart the service : service httpd restart</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Now host a sample site</div>
<!--EndFragment--><br /><br />
<br />
<div class="MsoNormal">
# vim /etc/httpd/conf/httpd.conf</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<VirtualHost *:80></div>
<div class="MsoNormal">
DocumentRoot /var/www/html</div>
<div class="MsoNormal">
ServerName sample.kalyan.com</div>
<div class="MsoNormal">
ErrorLog logs/kalyan-error_log</div>
<div class="MsoNormal">
CustomLog logs/kalyan-access_log common</div>
<div class="MsoNormal">
</VirtualHost></div>
<div>
<br /></div>
<div>
Save and exit the file</div>
<div>
<br /></div>
<div>
<div>
Create a sample html web page in /var/www/html directory</div>
<div>
# vim /var/www/html/index.html</div>
<div>
This is sample site</div>
<div>
Save and exit</div>
<div>
<br /></div>
<div>
Now it is the time to define the certificate and key files in the ssl.conf file</div>
<div>
<br /></div>
<div>
<div>
# vim /etc/httpd/conf.d/ssl.conf</div>
<div>
<br /></div>
<div>
line no 112</div>
<div>
SSLCertificateFile /etc/pki/CA/kalyan.crt</div>
<div>
<br /></div>
<div>
line no 119</div>
<div>
<div>
SSLCertificateKeyFile /etc/pki/CA/private/kalyan.key</div>
</div>
<div>
<br /></div>
<div>
save & exit </div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Now restart the apache service</div>
<div>
# /etc/init.d/httpd restart</div>
</div>
<div>
<br /></div>
<div>
<div>
Here you will be prompted for SSL key password. To avoid this follow the below procedure:</div>
<div>
Take a backup of the key file </div>
<div>
cp /etc/pki/CA/private/kalyan.key /etc/pki/CA/private/kalyan.key_bkp</div>
<div>
# cd /etc/pki/CA/private/</div>
<div>
<br /></div>
<div>
Now remove the password for the key using below command, Otherwise while restarting httpd service you will be prompted to enter the SSL key password</div>
<div>
<br /></div>
<div>
#openssl rsa -in kalyan.key_bkp -out kalyan.key</div>
<div>
Enter pass phrase for kalyan.key_bkp:redhat</div>
<div>
<br /></div>
<div>
Now restart the apache service and observer that you will not be prompted for password.</div>
<div>
# /etc/init.d/httpd restart</div>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<div>
If u want to redirect http request to https then do the following</div>
<div>
<br /></div>
<div>
# vim /etc/httpd/conf/httpd.conf</div>
<div>
<br /></div>
<div>
<VirtualHost *:80></div>
<div>
DocumentRoot /var/www/html</div>
<div>
ServerName kalyan.com</div>
<div>
ErrorLog logs/kalyan-error_log</div>
<div>
CustomLog logs/kalyan-access_log common</div>
<div>
Redirect / https://sample.kalyan.com</div>
<div>
</VirtualHost></div>
<div>
<br /></div>
<div>
save and exit </div>
<div>
<br /></div>
<div>
Restart the service.</div>
<div>
# service httpd restart</div>
<div>
<br /></div>
<div>
Now browse http://sample.kalyan.com & https://sample.kalyan.com</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Happy Browsing ...... :)</div>
</div>
<br />
<br />
<br />
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-18080100369491785612012-10-30T20:18:00.001-07:002012-10-30T20:18:11.082-07:00Configuring SVN Sub Version on CentOS<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]-->
<div class="MsoNormal" style="line-height: 150%; margin-left: 0in; text-align: left;">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 150%;">Setup SVN
subversion repository</span></u></b><span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial;"> </span></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0in; text-align: left;">
<br /></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial;">1. Install
below packages:</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># <b style="mso-bidi-font-weight: normal;">yum install mod_dav_svn subversion</b></span></div>
<div style="text-align: left; text-indent: -0.25in;">
<span style="font-weight: normal;">2.</span> <span style="font-family: "Calibri","sans-serif"; font-size: 12pt; font-weight: normal; letter-spacing: 0pt; line-height: 150%;">Modify Subversion
config file </span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; letter-spacing: 0pt; line-height: 150%;">/etc/httpd/conf.d/subversion.conf with below content</span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; font-weight: normal; letter-spacing: 0pt; line-height: 150%;"></span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">LoadModule dav_svn_module<span style="mso-spacerun: yes;"> </span>modules/mod_dav_svn.so</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">LoadModule authz_svn_module<span style="mso-spacerun: yes;"> </span>modules/mod_authz_svn.so</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<br /></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><Location /svn></span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">DAV svn</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">SVNParentPath /var/www/svn</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">AuthType Basic</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">AuthName "Subversion repositories"</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">AuthUserFile /etc/svn-auth-users</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Require valid-user</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></Location></span></div>
<div style="text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; font-weight: normal; letter-spacing: 0pt; line-height: 150%;"><span style="mso-list: Ignore;">3 3. <span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; font-weight: normal; letter-spacing: 0pt; line-height: 150%;">Add SVN
(Subversion) users</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># htpasswd -cm /etc/svn-auth-users user1</span></b></div>
<div style="margin-left: 0.5in; text-align: left;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></b></div>
<div style="text-align: left; text-indent: -0.25in;">
<b> <u><span style="font-weight: normal; mso-bidi-font-family: Arial; mso-fareast-font-family: Arial;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span>Create and configure SVN repository</u></b></div>
<div style="margin-left: 0.5in; text-align: left;">
<br /></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># mkdir /var/www/svn</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># cd /var/www/svn</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># svnadmin create vlrepo</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># chown -R apache.apache vlrepo</span></div>
<div style="margin-left: 0.5in; text-align: left;">
<br /></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0.5in; text-align: left;">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Note:</span></u></b><b style="mso-bidi-font-weight: normal;"><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"> SELinux should be in disable mode</span></b><span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 150%;"> </span></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 150%;">Now restart
the apache service</span></div>
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;"># service httpd restart</span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;">Go to<b> </b></span><span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;"><a href="http://localhost/svn/vlrepo">http://localhost/svn/vlrepo</a><b> </b><span style="mso-bidi-font-weight: bold;">address and you will be prompted for
credentials. Use “user1” user credentials to login.</span> </span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;">Now configure the repository.</span><span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;"> </span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;">To disable anonymous access and enable access control add following
rows to /var/www/svn/vlrepo/conf/svnserve.conf file:</span><br />
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">anon-access = none<span style="mso-spacerun: yes;"> </span></span></div>
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"> authz-db = authz</span><span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;"> </span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;">Now prepare the directories and files which needs to import to the
SVN repository.</span><br />
<div class="MsoNormal" style="line-height: 150%; margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 150%;"># mkdir -p
/VL/{Docs,IT,Tags}</span></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 150%;"># touch
/VL/Docs/doc{1..5}</span></div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt; line-height: 150%;"># touch
/VL/IT/file{1..5}</span></div>
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;"> # touch
/VL/Tags/tag{1..5}</span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold;">Now import the data to the repository</span><br />
<div style="margin-left: 0.5in; text-align: left;">
<br /></div>
<div style="margin-left: 0.5in; text-align: left;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"># svn import -m 'Initial import' /VL/ <a href="http://localhost/svn/vlrepo/">http://localhost/svn/vlrepo/</a></span></div>
<div style="margin-left: 0.5in; text-align: left;">
<br /></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Enter the root password if it prompts you.</span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Enter the repository username(user1)</span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Enter the user(user1) password.</span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Now you can see the data will be added to the repository.</span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Store password unencrypted (yes/no)? <b>no</b></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Now access the URL <b><span style="mso-spacerun: yes;"> </span></b></span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><a href="http://localhost/svn/vlrepo">http://localhost/svn/vlrepo</a> and observe the date. </span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<br /></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;">Happy Browsing .... :)</span><span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"></span></div>
<div style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;">
<span style="font-family: "Calibri","sans-serif"; font-size: 12pt;"><span style="mso-bidi-font-weight: bold;"></span></span></div>
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]--></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com1tag:blogger.com,1999:blog-7478543360278883006.post-53954826098994217962012-10-24T08:39:00.000-07:002012-10-24T08:39:45.842-07:00How code makes it into Red Hat Enterprise Linux?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxcWOPyDUTYdZ59ePmf-plrYeGDtYia1zVZaqqOP1zv37ovpCgWEyTqPHIxzwEVsyzF9r9Oexl8Xcy6wqSu7Q' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br /></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-49439622081171071562011-09-06T15:16:00.000-07:002013-01-25T05:49:42.910-08:00Using KVM virtualization in the enterprise: RHEV or RHEL?<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="line-height: 19px;"></span></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Red Hat Enterprise Linux and Red Hat Enterprise Virtualization both offer KVM virtualization, but there are important differences in their KVM management, features and implementation.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">RHEL goes smallRed Hat Enterprise Linux (RHEL) is a generic Linux server product that relies on KVM virtualization. It consists of a Linux kernel and lots of packages, including the Apache Web server and the MySQL database, as well as some KVM management tools. With RHEL 6, you can install and manage a few virtual machines (VMs), but it doesn’t deliver the best performance or an optimal KVM management platform. Still, in very small environments, RHEL 6 gives you everything you need for open source virtualization.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Enterprise-ready KVM virtualization</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If virtualization is a key component of your corporate IT infrastructure, you’ll need something that goes beyond merely managing a few VMs. For enterprise-level KVM virtualization, you need easy KVM management, high availability, optimal performance and other advanced features. Red Hat Enterprise Virtualization (RHEV) includes RHEV Manager (RHEV-M) -- a central KVM management platform for physical as well as virtual resources.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">RHEV-M helps you manage VMs and their disk images, installation ISOs, high-availability settings, VM templates and more -- all from a graphical Web interface. You can also manage two types of hypervisors with RHEV-M. RHEV comes with a standalone bare-metal hypervisor that’s based on RHEL and KVM virtualization, to be used as a managed physical node. Alternatively, if you want to manage VMs running on RHEL from RHEV, you can register RHEL servers to the RHEV-M console.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">RHEV 3.0 or RHEL 6?RHEL 6 is simply a Linux server that offers open source virtualization options, so you need RHEV to implement KVM virtualization in large corporate environments. </span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">RHEV 3.0, expected later this year, has a re-engineered core and is based on Java. In RHEV 3.0, you’ll find all the features of competing virtualization platforms such as VMware or Citrix XenServer. Plus, RHEV offers these functions for a fraction of the price.</span></div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-87098294234493051102011-08-25T08:32:00.000-07:002011-08-25T08:32:15.333-07:00Static Route in Ubuntu. How To?<div dir="ltr" style="text-align: left;" trbidi="on"><span class="Apple-style-span" style="background-color: white; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px;"></span><br />
<div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">1. Login in the system with the system administrator privilege.</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">2. Open the network configuration file with a editor. I will be using “vi editor” in this case.</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">example : “<strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">vi /etc/network/interfaces</strong>“</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">3. Go to last line and add your routing.</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">example “<strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0</strong>“</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">4. Save your changes and exit the editor.</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">5. Restart the network service with “<strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">/etc/init.d/networking restart</strong>“</div><div style="margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">6. Verify your routing by sending “<strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">route</strong>” command.</div></div>Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0tag:blogger.com,1999:blog-7478543360278883006.post-14906557957573242472011-08-24T13:21:00.000-07:002013-01-25T05:48:47.508-08:00What is the difference between Xen PV, Xen KVM and HVM?<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="background-color: black; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 21px;"></span><br />
<blockquote style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 10px; padding-right: 10px; padding-top: 10px; quotes: none; vertical-align: baseline;">
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Xen supported virtualization types</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Xen supports running two different types of guests. Xen guests are often called as domUs (unprivileged domains). Both guest types (PV, HVM) can be used at the same time on a single Xen system.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Xen Paravirtualization (PV)</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Paravirtualization is an efficient and lightweight virtualization technique introduced by Xen, later adopted also by other virtualization solutions. Paravirtualization doesn't require virtualization extensions from the host CPU. However paravirtualized guests require special kernel that is ported to run natively on Xen, so the guests are aware of the hypervisor and can run efficiently without emulation or virtual emulated hardware. Xen PV guest kernels exist for Linux, NetBSD, FreeBSD, OpenSolaris and Novell Netware operating systems.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
PV guests don't have any kind of virtual emulated hardware, but graphical console is still possible using guest pvfb (paravirtual framebuffer). PV guest graphical console can be viewed using VNC client, or Redhat's virt-viewer. There's a separate VNC server in dom0 for each guest's PVFB.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Upstream kernel.org Linux kernels since Linux 2.6.24 include Xen PV guest (domU) support based on the Linux pvops framework, so every upstream Linux kernel can be automatically used as Xen PV guest kernel without any additional patches or modifications.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
See XenParavirtOps wiki page for more information about Linux pvops Xen support.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Xen Full virtualization (HVM)</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Fully virtualized aka HVM (Hardware Virtual Machine) guests require CPU virtualization extensions from the host CPU (Intel VT, AMD-V). Xen uses modified version of Qemu to emulate full PC hardware, including BIOS, IDE disk controller, VGA graphic adapter, USB controller, network adapter etc for HVM guests. CPU virtualization extensions are used to boost performance of the emulation. Fully virtualized guests don't require special kernel, so for example Windows operating systems can be used as Xen HVM guest. Fully virtualized guests are usually slower than paravirtualized guests, because of the required emulation.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
To boost performance fully virtualized HVM guests can use special paravirtual device drivers to bypass the emulation for disk and network IO. Xen Windows HVM guests can use the opensource GPLPV drivers. See XenLinuxPVonHVMdrivers wiki page for more information about Xen PV-on-HVM drivers for Linux HVM guests.</div>
</blockquote>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
KVM is not Xen at all, it is another technology, where KVM is a Linux native kernel module and not an additional kernel, like Xen. Which makes KVM a better design. the downside here is that KVM is newer than Xen, so it might be lacking some of the features.</div>
</div>
Kalyan Kumar Pasupuletihttp://www.blogger.com/profile/15452237300997741180noreply@blogger.com0