Friday, November 30, 2012

What is virtualization?


What is virtualization ?
Virtualization is nothing but creating a virtual which doesn’t have any physical parts such as desktop, cpu, hardisk i.e; we don’t have any physical maintance . By using virtualization we can build different operating systems as images . difference between normal and virtualization set up.

Here above shown set up for the normal and virtualization. But in virtualization we can run mutilple o.s (operating systems) in a single setup which will reduce the cost of the hardware and maintance

Tuesday, November 6, 2012

How to install nagios in ubuntu


How to install nagios in ubuntu

Nagios: Nagios is an open source application that monitors for computer network problems so that they can be fixed more quickly. Nagios was designed for use with the linux operating system, but it will also work under unix and most Unix-based systems. It is difficult to understand but very good tools to monitor the network and servers

#apt-get install apache2
#apt-get install libapache2-mob-php5
#apt-get install build-essentail
#apt-get install libgd2-xpm-dev

here create a user named nagios
#useradd -m -s /bin/bash nagios
#passwd nagios

#/usr/sbin/groupadd nagcmd
#/usr/sbin/usermod -a -G nagcmd nagios
#/usr/sbin/usermod -a -G nagcmd www-data
After this download the nagios from the nagios site
#wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz

#wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
#ls
#tar xvf nagios-3.2.3.tar.gz
#cd nagios-3.2.3
#./configure –with-command-group=nagcmd
#make all
#make install
#make install init
#make install-config
#make install-commandmode
here we will edit a file and palce the emailid of ours
#vi /usr/local/nagios/etc/objects/contacts.cfg
here we will install nagios web config with apache
#make install-webconf
create a nagios login password
#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
here restart the apache
#ls
tar xvf nagios-plugins-1.4.11.tar.gz
#cd nagios-plugins-1.4.11
#./configure –with-nagios-user=nagios –with-nagios-group=nagios
#make
#make install 
#ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

here we will restart the nagios
#/etc/init.d/nagios restart
after this go to browser and type http://localhost/nagios
username: nagiosadmin
password: which u given?
for more details click here

Sunday, November 4, 2012

cacti installation in ubuntu

About Cacti
Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of device
here we will show how we will install cacti in ubuntu

#apt-get install php5 php5-gd php5-mysql
after this install the cacti in ubuntu

#apt-get install cacti-spine
here the screen shots for the cacti installation is shown below
mysql password for the root user should be given
here repeat the mysql password

Configuring libphp-adodb in ubuntu
here we will select apache2 for the configuration of cacti

select yes for installation of cacti database packages in ubuntu

create a password for the database admin of cacti
reconfirm the password
then go to the browser and type http://localhost/cacti then it will be promting for the installation of the cacti
then install cacti installtion guide
then after this a login page will be created for the cacti
username: cacti
passwd: admin
reconfirm passwd: admin
after login to the page you can change the cacti password
after this the installation procedure for cacti is been shown with this u can monitor your local host and graphs of the loads
for more information login here





Sunday, October 28, 2012

How to install aptana in ubuntu 10.10


How to install aptana in ubuntu 10.10

installation of aptana version 3 is shown here
#sudo add-apt-repository ppa:ferramroberto/java
#sudo apt-get update
#sudo apt-get install sun-java6-jdk sun-java6-plugin
Download & install xulrunner for ubuntu 10.10
#wget -O xulrunner.deb http://launchpadlibrarian.net/70321863/xulrunner-1.9.2_1.9.2.17%2Bbuild3%2Bnobinonly-0ubuntu1_i386.deb

#sudo dpkg -i xulrunner.deb
Download and install aptana from here
#sudo unzip [name of Aptana Studio ZIP file here].zip -d /opt
#sudo mv /opt/Aptana\ Studio\ 3 /opt/aptana-studio-3

to get the desktop icon
#wget http://www.samclarke.com/wp-content/uploads/2011/11/AptanaStudio.desktop
#sudo mv AptanaStudio.desktop /usr/share/applications/AptanaStudio.desktop
how to create a aptana launcher in ubuntu
just right click then on create launcher
afterthis give the launcher name
and the path of the launcher /opt/aptana-studio-3/AptanaStudio3
then a launcher for aptana will be created on the Desktop
here the aptana will be install in ubuntu 10.10 

how to install aptana in ubuntu on 12.04


How to install aptana studio in ubuntu 12.04

install the required packages 
#sudo apt-get install openjdk-7-jdk libjpeg62 libwebkitgtk-1.0-0 git-core

#sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 git-core
#sudo add-apt-repository ppa:webupd8team/java
#sudo apt-get update
#sudo apt-get install oracle-java7-installer

after this download the aptana studio from here
after downloading extract the file to /opt

#sudo unzip [Aptana Studio ZIP file here].zip -d /opt

#wget http://www.samclarke.com/wp-content/uploads/2012/04/AptanaStudio3.desktop

#sudo mv AptanaStudio3.desktop /usr/share/applications/AptanaStudio3.desktop


after this aptana will be installaed in your system


how to create a aptana launcher in ubuntu

just right click then on create launcher
after this give the launcher name
and the path of the launcher /opt/aptana-studio-3/AptanaStudio3
then a launcher for aptana will be created on the Desktop


after installing go the the file > new > here create a new project wheather php, ruby etc,

if already existing project means create a project name with some xyz after this go to file > import here you can import alreday existing project in it

for any reference go through here




Friday, October 26, 2012

kill a process id (pid)


How to kill a process in linux

when you open a file or it it is not opening or any trouble with its process then you can simple kill the process in linux
to see the current running process in linux
#ps -aux
it will show the process like this

to kill the process simple kill the pid ( process id)
#kill pid
means if would like to kill a process runing on 2049 means do like this
#kill  -9 2049
here it will kills the 2049 pid

Friday, October 12, 2012

How to copy files and folders remotely in ubuntu


How to copy files and folders remotely in ubuntu

To copy the files and folders in ubuntu or in redhat first of all intsall the ssh packages for remote terminal login

for ubuntu
#apt-get -y install openssh-server openssh-client

for redhat
#yum install openssh-server openssh-client

if you want to get the files or folder in ubuntu and redhat
#scp -r root@remoteip:/remotepath /localpath
here it will get the copy from other remote system

if you would like to send the local copy to other means
#scp -r /localpath root@remoteip:/remotepath
here it will send the copy of local file to the remote system   

Wednesday, October 10, 2012

High Availability of linux servers using HEARTBEAT package in ubuntu


High Availability of linux servers using HEARTBEAT package in ubuntu

heartbeat package is used for high availability for the linux servers, here by configure it the load can be balanced and if any server goes down the other will take up easily by configuring. Here we will show to configure heartbeat package in ubuntu.
To install heartbeat pacakage and also pacemaker
#apt-get -y install heartbeat pacemaker

here server1 ip address 192.168.1.111 and hostname is sunny (server name or node)
another server2 ip address 192.168.1.222 and hostname is venky(server name or node)

first of all we will install nginx in ubuntu in server1 and server2
root@sunny:~# apt-get install nginx
root@venky:~# apt-get install nginx

after this we will create a dummy website and configure it, remove this default files in both the servers
root@sunny:~#rm -rf /etc/nginx/sites-available/defautls
root@sunny:~#rm -rf /etc/nginx/sites-enable/defaults
root@sunny:~#vim /etc/nginx/sites-available/basic
server {
listen 192.168.1.111:80;
server_name sunny.example.com;
access_log /var/log/nginx/basic.access.log;
error_log /var/log/nginx/basic.error.log;
location / {
root /var/www/basic;
index index.html index.htm;
}
}

then save
after this create a directory
root@sunny:~#mkdir /var/www/basic
root@sunny:~#vim /etc/www/basic/index.html
sunnys site server1

then save
then create a simulink
root@sunny:~#cd /etc/nginx/sites-enable/
root@sunny:~#ln -s ../sites-available/basic

Then restart the service
root@sunny:~#/etc/init.d/nginx restart

then here we do same in the server2 but little changes

root@venky:~#vim /etc/nginx/sites-available/basic
server {
listen 192.168.1.222:80;
server_name sunny.example.com;
access_log /var/log/nginx/basic.access.log;
error_log /var/log/nginx/basic.error.log;
location / {
root /var/www/basic;
index index.html index.htm;
}
}

then save
after this create a directory
root@venky:~#mkdir /var/www/basic
root@venky:~#vim /etc/www/basic/index.html
sunnys site this is your site two server2

then save
then create a simulink
root@venky:~#cd /etc/nginx/sites-enable/
root@venky:~#ln -s ../sites-available/basic

Then restart the service
root@venky:~#/etc/init.d/nginx restart

from here we will configure heart beat
root@sunny~# vim /etc/ha.d/ha.cf
autojoin none
bcast eth0
warntime 3
deadtime 6
initdead 60
keepalive 1
node sunny
node venky
crm respawn

then save
here we copy the same in server2
root@sunny~# scp /etc/ha.d/ha.cf venky:/etc/ha.d
root@sunny~# ( echo -ne "auth 1\n1 sha1 "; \
dd if=/dev/urandom bs=512 count=1 | openssl md5 ) \
> /etc/ha.d/authkeys
root@sunny:~# chmod 0600 /etc/ha.d/authkeys
root@sunny:~# scp /etc/ha.d/authkeys venky:/etc/ha.d
root@sunny:~# ssh chmod 0600 venky:/etc/ha.d/authkeys

here we will restart the service in both the servers
root@sunny:~# /etc/init.d/heartbeat restart
root@sunny:~# ssh venky /etc/init.d/heartbeat restart
here both the cluster must me up and known by each other to see this we use crm tool
root@sunny:~# crm_mon -1 | grep Online
root@sunny:~# crm configure
crm(live)configure# primitive site_one_ip IPaddr params ip=192.168.1.111 cidr_netmask="255.255.255.0" nic="eth0"
crm(live)configure# primitive site_two_ip IPaddr params ip=192.168.1.222 cidr_netmask="255.255.255.0" nic="eth0"
crm(live)configure# commit
crm(live)configure# exit

root@sunny:~# crm configure show
node $id="1876vbiu-g98iuhgiu09-7hb0-9775" sunny.example.com
node $id="iho1ih24-4g2jjiofnufcv0-fe98sdkf7-1as sunny.example.com
primitive site_one_ip ocf:heartbeat:IPaddr \
params ip="192.168.1.111" cidr_netmask="255.255.255.0" nic="eth0"
primitive site_two_ip ocf:heartbeat:IPaddr \
params ip="192.168.1.222" cidr_netmask="255.255.255.0" nic="eth0"
root@sunny:~# crm configure
crm(live)configure# location site_one_ip_pref site_one_ip 100: sunny.example.com
crm(live)configure# location site_two_ip_pref site_two_ip 100: sunny.example.com
crm(live)configure# commit
crm(live)configure# exit

root@sunny:~# crm configure
crm(live)configure# monitor site_one_ip 40s:20s
crm(live)configure# monitor site_two_ip 40s:20s
crm(live)configure# commit
crm(live)configure# exit

after to check check from the other system like this in local
local system is some xyz with 192.168.1.49
in this edit the /etc/hosts file
root@xyz:#vim /etc/hosts
192.168.1.111 sunny.example.com sunny
192.168.1.222 sunny.example.com venky
then save

then serach for the website with sunny.example.com
it will show “sunnys server1”
then disconnect the net from server1
then serach for sunny.example.com here the page will be redirected to the second server
it will display “sunny this is your server2”

Thursday, October 4, 2012

dns configuration in ubuntu


DNS (Domain naming system);
In the world of internet a human cant memorize each and every ip address of the websites, so the ip address of the site is resloved by the name so that the humans can memorize easily. For this purpose the dns is used it will resolve the website with ipaddress and viceversa. How to configure dns in ubuntu is shown below
my dns server ipaddress is 192.168.1.35 with the hostname ubuntu111
other system connected in lan are 192.168.1.34 with hostname ubuntu100
and other with ipaddress 192.168.1.28 with hostname venky
here I will reslove a fully qualified domain I.e; ubuntu111.team.com
for this we have to give the static ip for the server

#vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.35
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
broadcast 192.168.1.255
:wq!

Here also set hostname
#vim /etc/hostname
ubuntu111
:wq!

And also set hosts file
#vim /etc/hosts
192.168.1.35 ubuntu111.team.com ubuntu111
:wq!


then go to dns of your system
#vim /etc/reslov.conf
search team.com.
nameserver 192.168.1.35  #(it is the dns server ip address in which you are creating)#

Then install bind package
#apt-get install bind9 dnsutils

here we will edit two files /etc/bind/named.conf.options & /etc/bind/named.conf.local

#vim /etc/bind/named.conf.options

forwaders {
192.168.1.1; #(this is gateway of your router)
123.176.37.37; (this is the default of your dns server provided by internet seen in reslov.conf)
123.176.37.35;
8.8.8.8;
8.8.4.4;
};

save and quit

#vim /etc/bind/named.conf.local
zone "team.com"
{
type master;
file "/etc/bind/zones/team.com.db";
};
zone "1.168.192.in-addr.arpa"
{
type master;
file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";
};

save and quit

here we will create a directory named zone in bind
#mkdir /etc/bind/zones
#vim /etc/bind/zones/team.com.db

#vim /etc/bind/zones/ rev.1.168.192.in-addr.arpa

then we will restart the bind service
#/etc/init.d/bind9 restart

to check the dns is working or not type
#dig ubuntu111.team.com

#nslookup ubuntu111.team.com
#nslookup ubuntu100.team.com
#nslookup venky.team.com
here he have created the dns server successfully

Thursday, September 20, 2012

REMOTE HOST IDENTIFICATION HAS CHANGED!


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


do worry it can be fixed very simple just try out this command

#ssh-keygen -R (the remote ipaddress)
here it will now able to login to the remote using ssh

Saturday, September 15, 2012

How to create bootonly file for redhat 5,6


How to create bootonly file for redhat 5,6


here we will create a iso image file which has the only content from where to take the operating system through the network
How to create a boot only file in redhat, here shown below for rhel5, rhel6
first of all copy the isolinux folder from rhel6 dvd
keep the rhel6 dvd into the cd tray
then after

#cd /media/rhel6
#ls
here you can see all the dvd content, here you copy the isolinux folder at some of the location

#cp -rf /media/rhel6/isolinux /home/xyz/Desktop/
here it will copy the isolinux folder on to the desktop

#cd /home/xyz/Desktop
#chmod u+x isolinux/*
here it will give the execution permission for the isolinux folder

#mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot \-boot-load-size 4 -boot-info-table -R -J -v -T isolinux/

after this a file with name file.iso is created on the desktop
here the iso which is created is used like as a boot file, it will have the information of booting until from where to take the os
same procedure for the Rhel5
and copy this image into a cd to make as a bootonly cd

Network installation of redhat using nfs, ftp, http


Network installation of redhat using nfs, ftp, http

To create a network installation of redhat, you have to setup the ftp, nfs , http servers if want to setup click here
to setup network installation we should have to get the boot only image for this if you like to setup bootonly iso image clickhere
keep the boot only cd in the tray and make it boot
then it will be seen like this.











then give as follows 









to get the dump from the ftp server which has files in /var/ftp/pub










for http server give as below



for the nfs server give the url as 192.168.1.15
and path as /var/ftp/pub




















after this you will be able to install the linux in the system by using ftp nfs and http.

Wednesday, September 12, 2012

How to create a repo file and also make it as ftp,nfs,http server


How to create a repo file and also make it as ftp,nfs,http server

how to create a repository file then click here
after creating a repo file
then download the packages of vsftpd,nfs,httpd
#yum install vsftpd
#yum install nfs
#yum install httpd
after this go to
#vim /etc/exports
/var/ftp/pub *(ro,sync)
:wq!
Then asigin a static ip to your system from here
#system-config-network






























Then save
#cd /var/www/html
#ln -s ../../var/ftp/pub/
here we will create a link file for pub and html
here after this start all the services
#service nfs restart
#service vsftpd restart
#service httpd restart
then go to the browser and type your ip
like this
here you can see all the dump of rhel dvd in the browser
then go to browser and type
here you can see all the dump of the dvd in the browser


How to create a repository file for the rhel


How to create a repository file for the rhel


To create a repo file first dump all the rhel dvd in the /var/ftp/pub
put the rhel operating system dvd into the cd tray and then go to the path

#cd /media/rhel6/
then dump all the dvd content to the /var/ftp/pub
if this path not present then create it

#cd /var

#mkdir -p ftp/pub
here the file will be created
then dump here

#cp -rf /media/rhel6/* /var/ftp/pub
here all the dvd connect will be copied to th path /var/ftp/pub
here create a repo file

#vim /etc/yum.repos.d/server.repo
[server]
enabled=1
gpgcheck=0
:wq!

Here the repo file will be create, to check wheather its working or not then do like this
#yum list all
here it will show all the packages
then the repo file created succesfully

how to download torrentz videos in redhat


How to download the videos and files through torrentz in rhel


To download the videos from torrentz you can simply download the package named
#yum install transmission

here it will download the packages from the dump of the rhel6 dvd of your .repo file

after installaing go to application>internet>transmission bittorrent client

after this downlaod the torrentz files from the internet and just double click it it will be added to tranmission bit torrentz client directly .