Quantcast
Channel: Brain Book
Viewing all 195 articles
Browse latest View live

LINUX BONDING (TEAMING, LOAD BALANCING)

$
0
0

LINUX BONDING (TEAMING)

Linux Network bonding

Linux network Bonding is creation of a single bonded interface by combining 2 or more Ethernet interfaces. This helps in high availability of your network interface and offers performance improvement. Bonding is same as port trunking or teaming.

Bonding allows you to aggregate multiple ports into a single group, effectively combining the bandwidth into a single connection. Bonding also allows you to create multi-gigabit pipes to transport traffic through the highest traffic areas of your network. For example, you can aggregate three megabits ports into a three-megabits trunk port. That is equivalent with having one interface with three megabytes speed

Steps for bonding in Oracle Enterprise Linux and Redhat Enterprise Linux are as follows..

Step 1.

Create the file ifcfg-bond0 with the IP address, netmask and gateway. Shown below is my test bonding config file.

$ cat /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
IPADDR=192.168.1.12
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

Step 2.

Modify eth0, eth1 and eth2 configuration as shown below. Comment out, or remove the ip address, netmask, gateway and hardware address from each one of these files, since settings should only come from the ifcfg-bond0 file above. Make sure you add the MASTER and SLAVE configuration in these files.

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
# Settings for Bond
MASTER=bond0
SLAVE=yes

$ cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
# Settings for bonding
MASTER=bond0
SLAVE=yes

$ cat /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

Step 3.

Set the parameters for bond0 bonding kernel module. Select the network bonding mode based on you need The modes are
  • mode=0 (Balance Round Robin)
  • mode=1 (Active backup)
  • mode=2 (Balance XOR)
  • mode=3 (Broadcast)
  • mode=4 (802.3ad)
  • mode=5 (Balance TLB)
  • mode=6 (Balance ALB)
Add the following lines to /etc/modprobe.conf
# bonding commands
alias bond0 bonding
options bond0 mode=1 miimon=100

Step 4.

Load the bond driver module from the command prompt.

$ modprobe bonding

Step 5.

Restart the network, or restart the computer.

$ service network restart # Or restart computer

When the machine boots up check the proc settings.

$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.0.2 (March 23, 2006)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:13:72:80: 62:f0

Look at ifconfig -a and check that your bond0 interface is active. You are done!. For more details on the different modes of bonding.

To verify whether the failover bonding works..
  • Do an ifdown eth0 and check /proc/net/bonding/bond0 and check the “Current Active slave”.
  • Do a continuous ping to the bond0 ipaddress from a different machine and do a ifdown the active interface. The ping should not break.

modes of bonding

These modes determine the way in which traffic sent out of the bonded interface is actually dispersed over the real interfaces. Modes 0, 1, and 2 are by far the most commonly used among them.

Mode 0 (balance-rr)
This mode transmits packets in a sequential order from the first available slave through the last. If two real interfaces are slaves in the bond and two packets arrive destined out of the bonded interface the first will be transmitted on the first slave and the second frame will be transmitted on the second slave. The third packet will be sent on the first and so on. This provides load balancing and fault tolerance.

Mode 1 (active-backup)
This mode places one of the interfaces into a backup state and will only make it active if the link is lost by the active interface. Only one slave in the bond is active at an instance of time. A different slave becomes active only when the active slave fails. This mode provides fault tolerance.

Mode 2 (balance-xor)
Transmits based on XOR formula. (Source MAC address is XOR'd with destination MAC address) modula slave count. This selects the same slave for each destination MAC address and provides load balancing and fault tolerance.

Mode 3 (broadcast)
This mode transmits everything on all slave interfaces. This mode is least used (only for specific purpose) and provides only fault tolerance.

Mode 4 (802.3ad)
This mode is known as Dynamic Link Aggregation mode. It creates aggregation groups that share the same speed and duplex settings. This mode requires a switch that supports IEEE 802.3ad Dynamic link.

Mode 5 (balance-tlb)
This is called as Adaptive transmit load balancing. The outgoing traffic is distributed according to the current load and queue on each slave interface. Incoming traffic is received by the current slave.

Mode 6 (balance-alb)
This is Adaptive load balancing mode. This includes balance-tlb + receive load balancing (rlb) for IPV4 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the server on their way out and overwrites the src hw address with the unique hw address of one of the slaves in the bond such that different clients use different hw addresses for the server.



LoadBalancing on Centos 6:


vi /etc/modprobe.d/bonding.conf
#add below lines
alias bond0 bonding
options bond0 mode=3 miimon=100


vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
IPADDR=192.168.5.250
NETMASK=255.255.255.0
NETWORK=192.168.5.0
GATEWAY=192.168.5.5
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=3"
TYPE=unknown
IPV6INIT=no
NAME=bond0
PREFIX=24
DNS1=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
UUID=ad33d8b0-1f7b-cab9-9447-ba07f855b143



vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
TYPE=Ethernet
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
UUID=6fde6027-915b-4bf3-930d-e613ed8bc9cc
HWADDR=00:C0:9F:30:3B:9B


vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
TYPE=Ethernet
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth1
UUID=f123a6f6-b543-4156-8a11-268039eb312a
HWADDR=00:18:F8:0E:AD:A0



vi /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
HWADDR=F8:D1:11:C2:9C:42
TYPE=Ethernet
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth2
UUID=fb864ba7-c7a6-47ed-b9af-1f41f3ab1567
ONBOOT=yes



CentOS 6 Channel Bonding

Channel bonding (also known as “Ethernet bonding”) is a computer networking arrangement in which two or more network interfaces on a host computer are combined for redundancy or increased throughput.
mode=0 (Balance-rr)– This mode provides load balancing and fault tolerance.
mode=1 (active-backup)– This mode provides fault tolerance.
mode=2 (balance-xor)– This mode provides load balancing and fault tolerance.
mode=3 (broadcast)– This mode provides fault tolerance.
mode=4 (802.3ad)– This mode provides load balancing and fault tolerance.
mode=5 (balance-tlb)– Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.
mode=6 (balance-alb)– Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.


Note: Always append extra configuration in case of a rollback.

Configuring Channel Bonding

# cd /etc/sysconfig/network-scripts/
# vi ifcfg-bond0
We’ll be using mode=6 (balance-alb)
1
2
3
4
5
6
7
8
9
10
DEVICE=bond0USERCTL=noBOOTPROTO=noneONBOOT=yes
IPADDR=10.0.0.10NETMASK=255.255.0.0NETWORK=10.0.0.0BONDING_OPTS="miimon=100 mode=balance-alb"
TYPE=UnknownIPV6INIT=no
# vi ifcfg-eth0
1
2
3
4
5
6
DEVICE=eth0BOOTPROTO=noneONBOOT=yes
MASTER=bond0SLAVE=yes
USERCTL=no
# vi ifcfg-eth1
1
2
3
4
5
6
DEVICE=eth1BOOTPROTO=noneONBOOT=yes
MASTER=bond0SLAVE=yes
USERCTL=no
# vi ifcfg-eth2
1
2
3
4
5
6
DEVICE=eth2BOOTPROTO=noneONBOOT=yes
MASTER=bond0SLAVE=yes
USERCTL=no
Due to the fact that /etc/modprobe.conf has been deprecated in CentOS 6, the process of bonding network interfaces has changed a bit.
Now instead of defining your bond in your /etc/modprobe.conf, you define it in /etc/modprobe.d/bonding.conf
# vi /etc/modprobe.d/bonding.conf
Append the following onto the end out your modprobe config file
1
alias bond0 bonding
# service network restart



HOW TO RESET MYSQL ROOT PASSWORD

$
0
0
login with root user
mysql -h 127.0.0.1 -u root

run below query to reset password
mysql> SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');

INSTALL OR UPGRADE FLASH PLAYER ON LINUX

$
0
0
Download FlashPlayer from below URL 

http://get.adobe.com/flashplayer

install_flash_player_xx_linux_xxx.tar.gz

tar -xzvf  install_flash_player_xx_linux_xxx.tar.gz

mkdir  ~/.mozila/plugins
or 
sudo ~/.mozila/plugins
or 
search the path of mozila as it is hidden folder as .mozila

mv libflashplayer.so ~/.mozila/plugins

restart firefox and check addons




Apache2 fully qualified domain name issue

$
0
0
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName




vi /etc/apache2/conf.d/fqdn
ServerName localhost



save it and restart the apache2

NOTE: localhost or whichever name of your server


service apache2 restart

issue will be resolved


LAMP PHPMYADMIN WITHOUT PASSWORD

$
0
0
vi /etc/phpmyadmin/config.inc.php
uncomment below line

// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

save the file and restart the mysql server

service mysql restart

go to phpmyadmin users tab and remove the password for root user

logout and login again it will allow you root login without password

SET LOCALTIME IN LAMP

$
0
0
vi /etc/php5/apache2/php.ini
find date section

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
date.timezone =Asia/Karachi

uncomment date.timzone line and add your local time at the end

restart apache2 and mysql server

service apache2 restart && service mysql restart && echo $?

echo $?     To check the command status

check times in web sites and it will be as per your local time

HOW LINUX MACHINE JOIN WINDOWS DOMAIN

$
0
0
To join linux machine to windows domain with (Centrify-express)

Download centrify packages from below url:

Download below packages:
Centrify Agent for OS 32-bit
Centrify-Enabled Samba for OS 32-bit
Centrify-Enabled Kerberos Tools for OS 32-bit

Extract all
Tar –xzvf centrify*.tar.gz

or extract one by one


Chmod a+x install-express.sh
Sudo su
./install-express.sh

You need domain name, domain administrator (user), and password.

NOTE: If it joined then checks with below tool
Adinfo

NOTE: If not joined to domain then use below tool to join it again
Adjoin –w domainname

NOTE: To check the domain
Adcheck   domainname


OR
UBUNTU REPOSITORIES
Install it through Ubuntu partner repositories

For lucid
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

For maverick
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

For natty
sudo add-apt-repository "deb http://archive.canonical.com/ natty partner"

sudo apt-get install centrifydc

NOTE: If not joined to domain then use below tool to join it again
Adjoin –w domainname

You need domain name, domain administrator (user), and password.
NOTE: If it joined then checks with below tool
Adinfo

NOTE: To check the domain

Adcheck   domainname

LINUX ACTIVE PORTS LIST COMMAND

$
0
0
To view Linux active ports

To list all active ports
netstat -l Active

To list listening ports
netstat --listen -A inet

To list -t for TCP and -u for UDP ports
netstat -n -A inet -t | -u

OR

To list all active portslsof -i

To list ipv4 TCP active ports
lsof -i4TCP

To list ipv4 UDP active ports
lsof -i4UDP



To get PID of a process
ps -ef | grep firefox

OR

pgrep firefox

pgrep ssh



ENABLE OR DISABLE A SERVICE FROM STARTUP IN UBUNTU

$
0
0
DISABLE A SERVICE FROM AUTOSTART IN UBUNTU
update-rc.d apache2 disable

ENABLE A SERVICE FROM AUTOSTART IN UBUNTU
update-rc.d apache2 enable

OR 

PERMANENTLY REMOVE FROM STARTUP
update-rc.d -f apache2 remove

ADD STARTUP SCRIPT AGAIN AFTER REMOVING
update-rc.d apache2 defaults


To add in stratup in RedHat/Fedora/Centos
chkconfig --add httpd


APT/DPKG LOCKED ERROR

$
0
0

E: Could not get lock /var/lib/apt/lists/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.

E: Could not get lock /var/lib/dpkg/lock
E: Unable to lock the administration directory (/var/lib/dpkg/)

You can force the lock off by removing the file, but it's not recommended without first closing the program that's holding the lock safely, since you could cause corruption or interrupt an installation (bad). The command provided below should close the program that holds the lock and then remove the lock but won't protect you from install interruption:

Ctrl + Alt + F2    (To go to tty2 session to run below commands)

fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock

fuser -cuk /var/cache/apt/archives/lock; sudo rm -f /var/cache/apt/archives/lock

OR 
Remove lock files directly

sudo rm /var/lib/dpkg/lock

sudo rm /var/cache/apt/archives/lock

OR
kill the process holding lock files
ps -e | grep -e apt -e dpkg | grep -v grep

kill [PID OF APT, DPKG]

Then Run Below Commands Perspectively
For aptitude run
apt-get -f install

For dpkg run
dpkg --configure -a

UPGRADE LINUX MINT 15 TO 16

$
0
0
HOW TO UPGRADE THE LINUX MINT 15 TO LINUX MINT 16
To upgrade, First, open a terminal and run this command to check repositories
    inxi -r

This will show you your full repositories configuration, showing you which repositories are configured in which file. Note the files to edit from below tip and edit those files as root (`sudo nano filename`).
 
deb http:/archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse

The word raring here denotes the distribution name for the Ubuntu package base used by Linux Mint 15. On any line where the word "raring" is there, replace it with "saucy". On any line where instead the word "olivia" is there, replace it with "petra". That's it.

Afterwards you run the command:
    apt update && apt dist-upgrade

COMPILE LINUX KERNEL

$
0
0
COMPILE LINUX KERNEL STEP BY SETP

1. Switch to "src" directory
# cd /usr/src

2. Download any latest stable version of kernel
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.12.1.tar.xz

3. untar the kernel
# tar -xzJf linux-3.12.1.tar.xz

4. Configure the Kernel
The kernel contains nearly 3000 configuration options. To make the kernel used by most people on most hardware, the Linux distro like Ubuntu, Fedora, Debian, RedHat, CentOS, etc, will generally include support for most common hardware. You can take any one of configuration from the distro, and on top of that you can add your own configuration, or you can configure the kernel from scratch, or you can use the default config provided by the kernel

# cd linux-3.12.1

# make menuconfig

NOTE: You should have installed “libncurses and libncurses-devel” packages for this command to work


We will use the default config provided by the kernel. So select “Save” and save the config in the file name “.config”.


Press "ok" to save .config

Press "exit" to exit the utility


This will save .config file in current directory. The file looks like below.
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.12.1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

......................


5. Compile linux kernel (it will take almost 40Min)
# make

compile the kernel modules
# make modules

install the kernel modules
# make modules_install

At this point, you should see a directory named /lib/modules/3.12.1/ in your system

6. Install the kernel

install the kernel on your system
# make install


The make install command will create the following files in the /boot directory.


vmlinuz-3.12.1 – The actual kernel
System.map-3.12.1 – The symbols exported by the kernel
initrd.img-3.12.1 – initrd image is temporary root file system used during boot process
config-3.12.1 – The kernel configuration file

The command “make install” will also update the grub.cfg by default. So we don’t need to manually edit the grub.cfg file.


7. Boot Linux to the new Kernel


To use the new kernel that you just compiled, reboot the system.

# reboot  | init 6

After reboot you can check the kernel version

# uname -r
3.12.1

BUGZILLA INSTALLATION ON CENTOS 6

$
0
0
Bugzilla Installation and Configuration on Centos 6

1. Download latest stable bugzilla version from the website.

2. Disable selinux
# vi /etc/selinux/config
set SELINUX=disabled

3. Install required components
# yum install perl*
# yum install httpd*
# yum install mysql-server*
# yum install mod_perl-devel

4. Check the version of following to check compatibility
# perl -v
# rpm -qa | grep httpd
# rpm -qa | grep mysql

5. Change to the apache directory from where it serves files
# cd /var/www/html/
# tar xvfz bugzilla-4.0.2.tar.gz

6. Rename the directory and set permissions
# mv bugzilla-4.0.2/ bugzilla
# chmod -R 777 bugzilla

7. Switch to bugzilla directory and run checksetup.pl
# cd /var/www/html/bugzilla/
# ./checksetup.pl

8. Install any missing modules
# /usr/bin/perl install-module.pl –all

9. Display all package
# ./checksetup.pl –check-modules

10. Setup accordingly in mysql
Login as root
# mysql -u root -p

Create the database for bugs in the mysql terminal by using the following sql
# create database bugs;

Create the user bugs
# create user bugs identified by ‘password’;

Grant the permissions to user bugs on bugs database
# GRANT ALL PRIVILEGES ON bugs.*TO 'bugs'@'localhost' IDENTIFIED BY 'password';
# GRANT ALL PRIVILEGES ON bugs.*TO 'bugs'@'%' IDENTIFIED BY 'password';

11. Edit localconfig of bugzilla
# cd /var/www/html/bugzilla
# vim localconfig
set the bugs password
$db_pass = ‘password’;

#./checksetup.pl

Enter the e-mail address of the administrator: xxxxxxxxxxxxx
Enter the real name of the administrator: xxxxxxxxxxxxxxxxxxx
Enter a password for the administrator account: xxxxxxxxxxxxxx
Final checksetup.pl execution:

#./checksetup.pl
Now that you have installed Bugzilla,
http://localhost/bugzilla


12. Apache setup
Configure Port and DocumentRoot
Listen 80

DocumentRoot "var/www/html"



Find the line
DirectoryIndex index.html index.html.var
Change it to
DirectoryIndex index.html index.html.var index.cgi

Add the following lines
Options Indexes FollowSymLinks ExecCGI

Add the following lines in httpd.conf below the ScriptAlias section and comment previous Script Alias section including <Directory> of ScriptAlias
##
#Added for bugzilla
##
ScriptAlias /cgi-bin/ "/var/www/html/bugzilla/"

PerlSwitches -w -T
PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl

<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride All
</Directory>

restart apache:

#/etc/init.d/httpd restart

13. MySql setup
vi /etc/my.cnf

Set below lines in [mysqld] section
max_allowed_packet = 4M
ft_min_word_len=2

Tryhttp://localhost/bugzilla and have fun!

VMWARE PLAYER INSTALLATION ON LINUX MINT

$
0
0
How to install VMware player on Linux Mint

Download VMware Player for your OS from below link
https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0

## Install some packages needed by VMware Player
sudo apt-get install build-essential linux-headers-`uname -r`

## move to the directory where you downloaded the VMware Player 
cd /home/user/Downloads

## Start VMware Player graphical installation with below command
gksudo bash ./VMware-Player-6.0.1-1379776.x86_64.bundle

Follow the graphical instructions 

Accept Terms and Conditions --> Next

Startup update --> Next

Anonymous usage data sending --> Next

Optional registration key --> Next 

Finish 

HOW TO UNINSTALL VMWARE PLAYER FORM LINUX MINT
sudo vmware-installer -u vmware-player
or
vmware-installer -u vmware-player

and follow the graphical instructions to remove VMware Player completely.

VMWARE DATA CENTER VIRTUALIZATION CONCEPTS

$
0
0
VMware Data Center Virtualization Fundamentals
Availability                  Scalability
Optimization               Management

Conversion of hardware devices into software to reduce the power consumption and cooling cost

COMPONENETS OF VMWARE VSPHERE

Hypervisor
To provide virtual hardware (resources) to VMs

Type 1 Hypervisor (Bare-Metal)
Installed as the operating system (VMware ESXi)

VM      VM      VM      VM
VMware ESXi
HARDWARE

Type 2 Hypervisor (Hosted)
Installed as application (VMware workstation)

VM      VM      VM      VM
VMware Workstation
Windows or Linux OS
HARDWARE

vCenter Server
Multitier application designed keeping enterprise in mind capable of managing smallest to large organizations
If you want to manage multiple ESXi hosts through single interface then use vCenter Server
Creating VMs
Adjusting VM configurations
Monitoring Performance
Configuring and Patching hosts

Can handle 1000 ESXi hosts
Can handle 10000 VMs

Can deploy on single server or multiple
Can deploy it on windows or a virtual appliance

Components
Identity management server
Database server
Application server
Web server
VMware vSphere Web Client

vCenter is Centralized platform for management features
vMotion
DRS
DPM
Storage vMotion
Storage DRS
vSphere Data Protection
High Availability (HA)
Fault tolerance (FT)
vSphere Replication

vCenter Operations Manger
To monitor performance, capacity and risks to alert you before something occur. It dynamically adjust thresholds

vCenter Configuration Manager
It discover, review and monitor changes in ESXI and VM’s and also for compliance.

vCenter Site Recovery Manager (SRM)
To replicate the whole site for disaster recovery

VMware vCenter Server   +   Site Recovery Manager
VM      VM      VM      VM      VM      VM      VM      VM
VMware vSphere
HARDWARE
STORAGE

vMotion
Allows you to migrate running VM from one ESXi host to another
It load balance ESXi host
It can operate without shared storage

Distributed Resource Scheduler (DRS)
Monitors the memory and cpu load on ESXi hosts for performance.  Maintains rules to match business objective like particular VM must run on a specific ESXi host.

VMware DRS dynamically balances computing capacity across a collection of hardware resources aggregated into logical resource pools, continuously monitoring utilization across resource pools and intelligently allocating available resources among the virtual machines based on pre-defined rules that reflect business needs and changing priorities.

Distributed Power Management (DPM)
Monitor the utilization of ESXi hosts and put it down or up (lan wake) as required

Storage vMotion
Moves VM from one datastore to another in running state
Migrate from any storage type to another
Move from Local to shared storage

Storage DRS
Load balancer of storage device
Monitor I/O of storage devices and spread the load as needed for smooth working

Storage I/O Control
Feature of vCenter server to keeps all VMs to perform at normal level (balance I/O control)

vSphere Data Protection (VDP)
Help to backup VMs
Leverages data duplicaton
VADP – open set of APIs (allows third party software to create image-based backup of VMs)

VMs create image-based backup as Bare-metal backup in the physical world
Easily restore individual files from that image-based backup

High Availability (HA)
Can restart VM for you
Can monitor services and applications

Fault Tolerance (FT)
Allows you to perpetually mirror your running VM to another ESXi host
If an ESXi host failed, your VM will run on another ESXi host
Easy to configure

vSphere Replication (VR)
Allows you to copy your VMs to a remote location
Allows you to recover from multiple point of time
You can monitor the status of the replication
Easily configurable through vSphere web client

vFlash
A pool of SSD in ESXi hosts to improve VMs disk read performance while reducing loads on the SAN

vSphere Storage Appliance (VSA)
It allows you to create share storage from the local storage devices in ESXI host. It also replicates the data between ESXI hosts.

Datastores
VMs are stored in logical volumes called data stores

Data store types
VMFS – built on local ISCSI, FC or FCoE
NFS – built on NAS devices

Shared Storage
Multiple ESXi hosts access the same storage (storage array). It used to store VMs and ISO files.

Features that use Shared Storage
DRS – Distributed Resource Scheduler
DPM – Distributed Power Management
Storage DRS
HA – High Availability
FT – Fault Tolerance

Storage Types
FC – Fiber Channel
FCoE – Fiber Channel over Ethernet
iSCSI – internet Small Computer System Interface
NFS – Network File System
Local

VIRTUAL NETWORKING
Each VM and ESXi host from the network has an address and virtual network cards

Virtual Switch Types
Standard virtual switch architecture
Manages virtual machine and networking at the host level

Distributed virtual switch architecture
Manages virtual machine and networking at datacenter level

Features
VLANS
Traffic Shaping
Port mirroring
QoS, DSCP
CDP/LLDP

vSphere 5.5 Editions and features

vSphere Edition
ESXi hypervisor
vMotion
High Availability
Data Protection
vSphere Replication
Storage vMotion
Fault Tolerance
DRS
DPm
Storage DRS
Distributed Switch
Essentials
X










Essentials Plus
X
X
X
X
X






Standard
X
X
X
X
X
X
X




Enterprise
X
X
X
X
X
X
X
X
X


Enterprise Plus
X
X
X
X
X
X
X
X
X
X
X




MAGENTO ON LINUX

INSTALL OR UPDATE LIBREOFFICE 4.1 ON LINUX MINT

$
0
0
INSTALL/UPDATE LIBREOFFICE 4.1 ON LINUX MINT

libreoffice writer not keeping images
libreoffice not saving pictures

update it to libreoffice 4.1 to hold the images upon save.

## Open Terminal
## add a repository to install or update libreoffice 4.1
sudo add-apt-repository ppa:libreoffice/libreoffice-4-1

## update sources
sudo apt-get update


## install libreoffice 4.1
sudo apt-get install libreoffice

when u completed it.

## remove the ppa of libreoffice 4.1
sudo add-apt-repository -r ppa:libreoffice/libreoffice-4-1


OS FINGERPRINTING (Get OS Version of Remote PC)

$
0
0
OS Fingerprinting Tools

Requirements
1. ICMP (ping) must be allowed from Source to Destination
2. Any Single port must be opened on Destination

Optional: Firewall may be active or not

## NMAP to get remote OS version
nmap -O 192.168.1.x

nmap -O -Pn 192.168.1.x

##PC with Active Firewall use below command
##(if any one port is open then it will show the OS version)
nmap -O -Pn -F -sT 192.168.1.x

NOTE: ICMP must be allowed from source to destination
## XPROBE2 to get remote OS version
XPROBE2 192.168.1.x

## PING to guess remote OS version
ping 192.168.0.x

it will return a TTL value match below table for remote OS








Operating System (OS)IP
Initial TTL
TCP
window size
Linux (kernel 2.4 and 2.6)645840
Google's customized Linux645720
FreeBSD6465535
Windows XP12865535
Windows 7, Vista and Server 20081288192
Cisco Router (IOS 12.4)2554128

NOTE: Below Tools are not tested
## Windows Command to get OS Version of Remote PC 
WMIC /NODE:hostname OS
WMIC /NODE:hostname OS > C:\OS.txt
systeminfo /s IP.ADDRESS /u UserOnRemotePc
systeminfo /s 172.16.23.108 /u Student
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName <ipaddr_or_hostname> | Format-List -Property *
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName <ipaddr_or_hostname> | Format-List -Property Name, OSArchitecture, SerialNumber

Vulnerability Management Training & Certification Free

Happy New Year 2014

$
0
0
Happy New Year 2014....!
May Allah Bless Health and Peace to Everyone for each coming day.....!


Viewing all 195 articles
Browse latest View live