Wednesday, September 12, 2012

How to setup dialup settign for Sri Lanka



Run --> pppconfig as sudu user
Select --> create new connection
Leave the default name "provider"
Select "User Dynamic DNS"
Select "PAP"
Enter the login mane as --> user@pre.sltnet
Replace the password --> passwd
Select the speed as --> 115200 (default)
Select "Tone" dialing
Enter the phone number --> dailupnumber
Select the the modem device as /dev/ttyACM0
Finish the config wizard and exit

To forcefully place the dial-up enter below command in the console --> pon  (to switch off  the dial-up use poff)

Tuesday, January 31, 2012

install and configure Webalizer


To install Webalizer open up a terminal and enter the following commands:
$ sudo aptitude update 
$ sudo aptitude install webalizer

Webalizer didn't work right away, so I found a fix for it.

Edit webalizer.conf with your favorite editor:
$ vi /etc/webalizer/webalizer.conf
Find the following:
LogFile /var/log/apache/access.log.1
I'm using apache2 so replace the line with:
LogFile /var/log/apache2/access.log
Save and exit.

To run webalizer, enter this command:
sudo webalizer
and then go to http://localhost/webalizer/


Run webalizer as a cronjob. This has to be run as root: Edit the root cronjobs by running the command:

$sudo crontab -e and add the line:

0 * * * * weblize



Friday, November 18, 2011

mysql database backup and restore


today i am going to show how to get mysql backup and also how to restore it.

example -

all database full backup

        mysqldump -u root -p --all-databases >  all.sql

 only one(database name -kasun) database   

        mysqldump -u root -p kasun >  kasun.sql 

 restore database

  mysql -u root -p kasun <  kasun.sql

  mysql -u root -p --all-databases < all.sq  

  

thaz for all..:)

Thursday, November 10, 2011

How to load an IOS into a Cisco router using the rommon mode

To load an IOS onto a router using ROMmon mode via Ethernet cable:
  1. Start the TFTP server (make sure the file path is correct and that you allow both transfer and receive)
  2. Connect to the router via Ethernet cable (an Ethernet cable is preferred due to the large size of the file and the maximum speed that data can travel over the console cable)
¨ Before the IOS is loaded it is important to make sure that your router has enough memory to support the IOS. The router will allow an IOS to be loaded even if there is not enough memory, in this case a smaller IOS will have to be loaded.
  1. At the rommon prompt enter the following commands (commands are case sensitive, and the use of the directional arrows and tab auto complete function is not allowed):

IP_ADDRESS=IP address of the Ethernet port
IP_SUBNET_MASK=subnet mask of the Ethernet port
DEFAULT_GATEWAY=the default gateway
TFTP_SERVER=the IP of the TFTP server (your local computer)
TFTP_FILE=the file name of the IOS file
tftpdnld
  1. The router will then issue a warning message:
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
  1. Enter y, and the IOS will load
  2. Once loaded you must boot up the new IOS by issuing the boot command


To load an IOS onto a router using ROMmon mode via the Cisco console cable:
  1. Connect to the router using the light blue Cisco console cable (make sure the RJ-45 connector is plugged into the console port on the router) using the 9600-8-N-1 settings. The next two steps (changing the console baud rate) are optional.
  2. In ROMmon mode, change the baud rate to 15200 using the confreg command.
rommon 1>confreg
Configuration Summary
enabled are:
break/abort has effect
console baud: 9600
boot: the ROM monitor
¨ The router will guide you through changing the registry. You want to press y to chang the configuration. The only other change you need to make is the change to the console baud rate, set that to 7 (115200).
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
enable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
disable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
change the boot characteristics? y/n [n]:

Configuration Summary
enabled are:
break/abort has effect
console baud: 115200
boot: the ROM Monitor
 do you wish to change the configuration? y/n [n]:
You must reset or power cycle for new config to take effect.
 rommon 2>

  1. When you reset the router in your console window you will see characters that you cannot read. You have to stop the session and set your baud rate to 115200. This will let you increase the speed that you use to transfer the file.
  2. At the rommon prompt enter xmodem -c {filename}
  3. When prompted, enter y to continue
  4. From your hyperterminal prompt, click on transfter then send file
  5. Select the IOS image then change the protocol to xmodem via the dropdown box then click send.
  6. After the IOS has been downloaded, change the boot order by using the confreg 0x2102 command.

Tuesday, November 8, 2011

Recover MySQL root Password

Do you forgot your mysql root password ?...... that was big trouble for you..
don't think about that . you can use following command to recover that password.

1: Stop the MySQL server process.

# /etc/init.d/mysql stop


(output - Stopping MySQL database server: mysqld. )


2: Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password.

# mysqld_safe --skip-grant-tables &

3: Connect to mysql server using mysql client:

# mysql -u root



4: setup new password

mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit


5: Stop MySQL Server:

    # /etc/init.d/mysql stop

6: start mysql server

# /etc/init.d/mysql start
# mysql -u root -p




finally apply your new password and get some fun..
thank you.....:)


Thursday, November 3, 2011

Typical Linux boot process

These days lot of people interest in Linux OS. but some of them don't know about boot process of Linux OS.so that i try to give you brief idea of boot process in Linux.I think thats better help for you.


The following are the 6 high level stages of a typical Linux boot process.

1. BIOS

  • BIOS stands for Basic Input/Output System
  • Performs some system integrity checks
  • Searches, loads, and executes the boot loader program.
  • It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence.
  • Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
  • So, in simple terms BIOS loads and executes the MBR boot loader.

2. MBR

  • MBR stands for Master Boot Record.
  • It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
  • MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.
  • It contains information about GRUB (or LILO in old systems).
  • So, in simple terms MBR loads and executes the GRUB boot loader.

3. GRUB

  • GRUB stands for Grand Unified Bootloader.
  • If you have multiple kernel images installed on your system, you can choose which one to be executed.
  • GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.
  • GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
  • Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS.
  • #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    hiddenmenu title
    CentOS (2.6.18-194.el5PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5PAE
    ro root=LABEL=/
    initrd /boot/initrd-2.6.18-194.el5PAE.img
  • As you notice from the above info, it contains kernel and initrd image.
  • So, in simple terms GRUB just loads and executes Kernel and initrd images.

4. Kernel

  • Mounts the root file system as specified in the “root=” in grub.conf
  • Kernel executes the /sbin/init program
  • Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
  • initrd stands for Initial RAM Disk.
  • initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.

5. Init

  • Looks at the /etc/inittab file to decide the Linux run level.
  • Following are the available run levels
    • 0 – halt
    • 1 – Single user mode
    • 2 – Multiuser, without NFS
    • 3 – Full multiuser mode
    • 4 – unused
    • 5 – X11
    • 6 – reboot
  • Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
  • Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
  • If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that.
  • Typically you would set the default run level to either 3 or 5.

6. Runlevel programs

  • When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
  • Depending on your default init level setting, the system will execute the programs from one of the following directories.
    • Run level 0 – /etc/rc.d/rc0.d/
    • Run level 1 – /etc/rc.d/rc1.d/
    • Run level 2 – /etc/rc.d/rc2.d/
    • Run level 3 – /etc/rc.d/rc3.d/
    • Run level 4 – /etc/rc.d/rc4.d/
    • Run level 5 – /etc/rc.d/rc5.d/
    • Run level 6 – /etc/rc.d/rc6.d/
  • Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.
  • Under the /etc/rc.d/rc*.d/ direcotiries, you would see programs that start with S and K.
  • Programs starts with S are used during startup. S for startup.
  • Programs starts with K are used during shutdown. K for kill.
  • There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.
  • For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.

Tuesday, November 1, 2011

configure Phpmyadmin

PhpMyAdmin is a nice database management and administration tool, it is easy to install it, but some people are having problems making it work under apache, that’s because it needs configuration. if you want to more know about Lamp installation you can use my past blogs.

Just in case you haven’t installed phpMyAdmin yet, type the following line in the Terminal:
apt-get install phpmyadmin

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf, first type the following command to open up this file:
gksudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf

Now restart Apache:
sudo /etc/init.d/apache2 restart

Point your browser to: http://domain/phpmyadmin, you should be able to see the phpMyAdmin landing page now

get some fun with phpmyadmin.....:)

Wednesday, August 10, 2011

SSH login without password


First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:

a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A
Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):

a@A:~> ssh b@B mkdir -p .ssh
b@B's password:
Finally append a's new public key to b@B:.ssh/authorized_keys and enter b's password one last time:

a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
b@B's password:
From now on you can log into B as b from A as a without password:

a@A:~> ssh b@B hostname
B

Thursday, August 4, 2011

differential backup

when you run following command first you get full backup files.then other all running times you can get only updates...

tar -cz -g snapshot_file -f $dest/$archive_file $backup_files

changing destination is more important .using that you can get only updates for this backups..

:)

Tuesday, July 26, 2011

how to get backup in Linux server

for this problem i use shell script to get incremental and daily backups.In this cause i use cron tab for run that script at that time.

shell script 1 - daily backup(test.sh)


####################################



echo "Starting to get incremental backup"
date=`date +%Y%m%d`
rsync --delete -avh /home/kasun/Desktop/new /home/kasun/Desktop/back-$date

Long listing of files in $dest to check file sizes.
ls -lh $dest

echo "Full Backups_done.." | mail -s "incremental Done at kasun " kasunmanduraeng@gmail.com
sendmail -q
##############################################

test2.sh....full backup

###############################################
# What to backup.
backup_files="/home/kasun/Desktop/new"

# Where to backup to.
dest="/home/kasun/Desktop/test"

# Create archive filename.
day=$(date +%Y%m%d)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
day1=$(date +%d)
yday1=$((day1-1))
date1=$(date +%Y%m)


remove="$hostname-$date1$yday1.tgz"
# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo

# Backup the files using tar.
tar czf $dest/$archive_file $backup_files ###daily back up
#remove after 2 days backups

echo $dest/$archive_file $backup_files
rm $dest/$remove

# Print end status message.
echo
echo "Backup finished"
date


echo "Full Backups_done.." | mail -s "daily full Done at kasun " kasunmanduraeng@gmail.com
sendmail -q
##################################

after getting back receive notification mail.


Edit cron tab........

in command line type..


crontab -e

then edit crontab(you can edit /etc/crontab also)

00 00 * * * root /root/test.sh ##every hour ur incremental backup process running
00 00 00 * * root /root/test2.sh## every day for bacup running

Friday, April 8, 2011

shell scripts for CGI with Linux

program name:- test.sh , directory:/var/www/cgi-bin

#!/bin/sh
# test.sh
# Environment Variable
echo Content-Type: text/plain ; charset=ISO-8859-1
echo
pwd
ls -l
exit

save and run in web browser (http://localhost/cgi-bin/test3.sh) .out put show in following image
enjoy with CGI programing

Friday, April 1, 2011

Install and configure gns3 in linux(fedora)

First we'll have to install dependencies

[user@kasun ~]$ su

Password: (Type in your root password here)

[root@kasun /]# yum install python python-devel xorg-x11-proto-devel libXext-devel

[root@kasun /]# yum install gcc-c++

Now we'll download and install Qt4

[root@kasun /]#cd /tmp

[root@kasun tmp#wget http://ftp.uludag.org.tr/pub/source/2009/qt-x11-opensource-src-4.5.1.tar.gz

[root@kasun tmp]#tar xzf qt-x11-opensource-src-4.5.1.tar.gz

[root@kasun tmp]# cd qt-x11-opensource-src-4.5.1

[root@kasun qt-x11-opensource-src-4.5.1]#./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support

[root@kasun qt-x11-opensource-src-4.5.1]#gmake <====This might take 2-3 hrs.

[root@kasun qt-x11-opensource-src-4.5.1]#gmake install <====Another 30 mins or so

[root@kasun qt-x11-opensource-src-4.5.1]#PATH=/usr/local/Trolltech/Qt-4.5.1/bin:$PATH

[root@kasun qt-x11-opensource-src-4.5.1]#export PATH


Next we'll install SIP

[root@kasun qt-x11-opensource-src-4.5.1]#cd ..

[root@kasun tmp]#wget http://ftp.uludag.org.tr/pub/source/2009/sip-4.8.1.tar.gz

[root@kasun tmp]#tar xzf sip-4.8.1.tar.gz

[root@kasun tmp]#cd sip-4.8.1

[root@kasun sip-4.8.1]#python configure.py

[root@kasun sip-4.8.1]#make

[root@kasun sip-4.8.1]#make install


Next we'll Install PyQt4

[root@kasun sip-4.8.1]#cd ..

[root@kasun tmp]#wget http://ftp.uludag.org.tr/pub/source/2009/PyQt-x11-gpl-4.5.2.tar.gz

[root@kasun tmp]#tar xzf PyQt-x11-gpl-4.5.2.tar.gz

[root@kasun tmp]#cd PyQt-x11-gpl-4.5.2

[root@kasun PyQt-x11-gpl-4.5.2]#python configure.py

[root@kasun PyQt-x11-gpl-4.5.2]#make <=== more time

[root@kasun PyQt-x11-gpl-4.5.2]#make install


We are done with compiling part, now lets download GNS3 source files

[root@kasun tmp]#cd /opt

[root@kasun opt]#wget http://space.dl.sourceforge.net/project/gns-3/GNS3/0.7.2/GNS3-0.7.2-src.tar.bz2

[root@kasun opt]#tar -xjvf GNS3-0.7.2-src.tar.bz2 && rm GNS3-0.7.2-src.tar.bz2

[root@kasun opt]#mv GNS3-0.7.2-src /opt/GNS3


Create the following directories:
These directories will be used by GNS3 – such as projects – where your working projects will be stored, cache, temp, IOS images, etc.

[root@kasun opt]#cd /opt/GNS3
[root@kasun GNS3]#mkdir Dynamips
[root@kasun GNS3]#mkdir IOS
[root@kasun GNS3]#mkdir Project
[root@kasun GNS3]#mkdir Cache
[root@kasun GNS3]#mkdir tmp
[root@kasun GNS3]#chmod o+rw -R ./Project
[root@kasun GNS3]#chmod o+rw -R ./tmp
[root@kasun GNS3]#chmod o+rw -R ./IOS

Download binary of dynamips and make it executable

[root@kasun GNS3]#cd Dynamips

[root@kasun Dynamips ]#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin

[root@kasun Dynamips ]#chmod +x ./dynamips-0.2.8-RC2-x86.bin



You can create a desktop shortcut by right-clicking on the desktop and select “Create Launcher..”, Name it GNS3 and in the command section type in

python "/opt/GNS3/gns3"

Double click to open GNS3 and we will edit the default settings. If you don’t want to use desktop icons you can create a launcher from your programs menu by right clicking on the Main Menu, selecting Edit Menu. Select New Item on the right and you will be presented with the same window where you type in the above. From there you can move the launcher into any menu section of your choice.

Fire up GNS3

* Go to edit | preferences and in the ‘Terminal command:’ section type in:
gnome-terminal -t %d -e 'telnet %h %p' > /dev/null 2>&1 &


* Under ‘Paths’ change the ‘Project directory:’ to
/opt/GNS3/Project
and the ‘IOS/PIX directory:’ to
/opt/GNS3/IOS

* Click on Dynamips tab on the left
For the ‘Executable path:’ type in
/opt/GNS3/Dynamips/dynamips-0.2.8-RC2-x86.bin

* Change the ‘Working directory:’ to
/opt/GNS3/tmp
Click on the Capture tab on the left

* For the ‘Working directory for capture files:’ change it to
/opt/GNS3/Project


woooow now you can rock with GNS 3 .....


Thursday, March 24, 2011

How to mount ntfs partition to redhat

1.Click on the "Applications" menu and choose "Terminal" from the "Accessories" group.
2.Type the command "su -" to become the root user. Enter the root password when prompted.
3.Add the "RPMforge" repository to your system--this allows your system to download and install NTFS support. Type the following commands:

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

rpm -K rpmforge-release-0.5.1-1.el5.rf.i386.rpm

rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm

4.Install the ntfs-3g package--this provides NTFS support. Type the command "yum install fuse fuse-ntfs-3g" and answer "yes" if prompted to import an encryption key or to install packages.

5. Issue the "mount" command to mount the NTFS partition.

If your NTFS partition is accessible from device /dev/sda3 and you want the partition to appear on /mnt, use the command "mount /dev/sda3 /mnt."

Friday, September 10, 2010

how to install ssh serve in Ubuntu

OpenSSh is opensource ssh server in Linux.


Ubuntu SSHD Installation

Type the following two command to install both ssh client and server:
# sudo apt-get install openssh-server openssh-client

SSHD Configuration

To be frank your server is ready by default. Just test it from your home computer or from same system with the command:
# ssh localhost
OR
# ssh user@your-server-ip-address

How do I use ssh client?

Assuming that your server hostname is userver.kasun.com and username is kasun, you need to type the following command:
# ssh kasun@userver.kasun.com
To stop ssh server, enter:
# sudo /etc/init.d/ssh stop
To start sshs server, enter:
# sudo /etc/init.d/ssh start
To restart ssh server, enter:
# sudo /etc/init.d/ssh restart



ssh and telnet

In networking world lot of people use ssh and telnet but they don't have more idea
in this protocol.actually one of my friend also ask me some question related with these things.Ok now you can follow this blog and get some idea.



SSH - secure shell(normally it use port 22)

SSH is network related protocol but it work in application layer which use SSL.SSL(443) make trusted relation ship.And also SSH Basically it is secured. It is most often used by network administrators as a remote login / remote control way to manage their business server.


#######for your knowledge--- SSL is most often used for transmitting credit card, tax, banking, or personal information to a business server.##########


Telnet - port 23-Application layer


Telnet is normal way u can connect to the server and work.Telnet send the data's in Ascii format and its not a secure shell.so we must't use telnet and ftp becoz hackers
can easy to identify our data.

Wednesday, September 8, 2010

difference between programming and scripting language

The primary difference between a "programming language" (C, C++, VB etc.) and a "scripting language" (PHP, ASP, JSP, JavaScript, VBScript)is that code written in a programming language needs to be compiled before it is run. Once it is compiled, it can be run any number of times.

Scripting languages, on the other hand, are interpreted at run-time. This means that every time you want to run the program, a separate program needs to read the code, interpret it, and then follow the instructions in the code. Compiled code has already been interpreted into machine language, so it is will typically execute faster because the conversion into machine language has already been done.


Interpreted vs complied source code



Interpreted language -

In interpreter to process the source code every time you want to run the program.This translate the source code down to a lower level for the computer's consumption as it goes along.we call the lower level language machine code.this codes are't human readable.


compiled language -
A compiled language , on the other hand ,such as C,uses a complier to do all this processing one time only before the code is ever run.After that ,you can run the machine code directly ,without needing the compiler any more.


Tuesday, September 7, 2010

How to use Internet Connection Sharing in Windowxp

How to use Internet Connection Sharing

To use Internet Connection Sharing to share your Internet connection, the host computer must have one network adapter that is configured to connect to the internal network, and one network adapter or modem that is configured to connect to the Internet.

On the host computer

On the host computer, follow these steps to share the Internet connection:
  1. Log on to the host computer as Administrator or as Owner.
  2. Click Start, and then click Control Panel.
  3. Click Network and Internet Connections.
  4. Click Network Connections.
  5. Right-click the connection that you use to connect to the Internet. For example, if you connect to the Internet by using a modem, right-click the connection that you want under Dial-up.
  6. Click Properties.
  7. Click the Advanced tab.
  8. Under Internet Connection Sharing, select the Allow other network users to connect through this computer's Internet connection check box.
  9. If you are sharing a dial-up Internet connection, select the Establish a dial-up connection whenever a computer on my network attempts to access the Internet check box if you want to permit your computer to automatically connect to the Internet.
  10. Click OK. You receive the following message:
    When Internet Connection Sharing is enabled, your LAN adapter will be set to use IP
    address 192.168.0.1. Your computer may lose connectivity with other computers on
    your network. If these other computers have static IP addresses, it is a good idea to set them
    to obtain their IP addresses automatically. Are you sure you want to enable Internet
    Connection Sharing?
  11. Click Yes.
The connection to the Internet is shared to other computers on the local area network (LAN). The network adapter that is connected to the LAN is configured with a static IP address of 192.168.0.1 and a subnet mask of 255.255.255.0

cache memory

"CACHE"............
in TI world cache memory is very important area.but lot of people haven't perfect idea in this area. i think if u can get some better idea follow this blog...

Cache Memory

Cache is a component that improves performance by transparently storing data such that future requests for that data can be served faster.



It has several types

CPU Cache -

Small memories on or close to the CPU can operate faster than the much larger main memory.

DISK Cache -

While CPU caches are generally managed entirely by hardware, a variety of software manages other caches. The page cache in main memory, which Is an example of disk cache, is managed by the operating system kernel.


WEB Cache -

is the Caching of web document to reduce bandwidth usage, server load, and perceived lag. A web cache stores copies of documents passing through it ,subsequent requests may be satisfied from the cache if certain conditions are met.