Friday, December 3, 2010

Add favicon in blogger

A favicon (short for favorites icon), also known as a shortcut icon, website icon, URL icon, or bookmark icon is a 16×16 or 32×32 pixel square icon associated with a particular website or webpage.A web designer can create such an icon and install it into a website (or webpage) by several means, and most graphical web browsers will then make use of it. Browsers that provide favicon support typically display a page's favicon in the browser's address bar and next to the page's name in a list of bookmarks. Browsers that support a tabbed document interface typically show a page's favicon next to the page's title on the tab. Some programs allow the user to select an icon of their own from the hard drive and associate it with a website.

Here the steps that add favicon in blogger:

Step 1 : Upload your favicon in your photo sharing server (Here i use picasa).

Step 2 : Open your blogger Dashboard and go Design -- > Edit html

Step 3 : Copy following code and paste it above <b:skin><![CDATA[/*.

<link href='FavIcon_URL' rel='shortcut icon'/>
<link href='FavIcon_URL' rel='icon'/>

Step 4 : Replace FavIcon_URL with your favicon image location

Step 5 : Save.

Now see your icon on your browser.

Tuesday, November 23, 2010

Internet Explorer & Mozila Firefox Collection for Web Developers

Here the ultimate helpful application for Web Developer,

Utilu IE Collection
Internet Explorer is a browser developed by Microsoft. Utilu IE Collection contains multiple IE versions, which are standalone so they can be used at the same time. This is useful for web developers.

Utilu IE Collection contains the following versions of IE:
  • Internet Explorer 1.0 (4.40.308)
  • Internet Explorer 1.5 (0.1.0.10)
  • Internet Explorer 2.01 (2.01.046)
  • Internet Explorer 3.0 (3.0.1152)
  • Internet Explorer 3.01 (3.01.2723)
  • Internet Explorer 3.03 (3.03.2925)
  • Internet Explorer 4.01 (4.72.3110.0)
  • Internet Explorer 5.01 (5.00.3314.2100)
  • Internet Explorer 5.5 (5.51.4807.2300)
  • Internet Explorer 6.0 (6.00.2800.1106)
  • Internet Explorer 6.0 (6.00.2900.2180)
  • Internet Explorer 7.0 (7.00.5730.13)
  • Internet Explorer 8.0 (8.00.6001.18702)
Download here


Utilu Mozilla Firefox Collection
Utilu Mozilla Firefox Collection contains multiple versions of the free web browser Mozilla Firefox, which are standalone so they can be used at the same time. This is useful for web developers.

Utilu Mozilla Firefox Collection contains the following versions of Mozilla Firefox:

  • Mozilla Firefox 2.0.0.20
  • Mozilla Firefox 3.0.19.0
  • Mozilla Firefox 3.5.15.0
  • Mozilla Firefox 3.6.12.0
  • Mozilla Firefox 4.0.0.0 beta 7
Download here

For more details Go to http://utilu.com/

Source : http://utilu.com/

Monday, November 15, 2010

Advance user account Management

This is for who all are advance users,

By this you can modify any user details in your windows boxes...

Step 1 : Open Run window

Step 2 : Type "control userpasswords2" without double quotes.

Step 3 : You'll get window like as follows

Step 4 : You can add, edit and delete your user accounts

Tuesday, October 19, 2010

Linux Boot Process - Step by Step

In the early days, bootstrapping a computer meant feeding a paper tape containing a boot program or manually loading a boot program using the front panel address/data/control switches. Today's computers are equipped with facilities to simplify the boot process, but that doesn't necessarily make it simple.
The 20,000-foot view of the Linux boot process
When a system is first booted, or is reset, the processor executes code at a well-known location. In a personal computer (PC), this location is in the basic input/output system (BIOS), which is stored in flash memory on the motherboard. The central processing unit (CPU) in an embedded system invokes the reset vector to start a program at a known address in flash/ROM. In either case, the result is the same. Because PCs offer so much flexibility, the BIOS must determine which devices are candidates for boot.

The small program that starts this sequence of loading into RAM, is known as a bootstrap loader, bootstrap or boot loader. This small boot loader program's only job is to load other data and programs which are then executed from RAM. Often, multiple-stage boot loaders are used, during which several programs of increasing complexity sequentially load one after the other in a process of chain loading.

When a boot device is found, the first-stage boot loader is loaded into RAM and executed. This boot loader is less than 512 bytes in length (a single sector), and its job is to load the second-stage boot loader.
When the second-stage boot loader is in RAM and executing, a splash screen is commonly displayed, and Linux and an optional initial RAM disk (temporary root file system) are loaded into memory. When the images are loaded, the second-stage boot loader passes control to the kernel image and the kernel is decompressed and initialized. At this stage, the second-stage boot loader checks the system hardware, enumerates the attached hardware devices, mounts the root device, and then loads the necessary kernel modules. When complete, the first user-space program (init) starts, and high-level system initialization is performed.That's Linux boot in a nutshell. Now let's dig in a little further and explore some of the details of the Linux boot process.

System startup 
The system startup stage depends on the hardware that Linux is being booted on. On an embedded platform, a bootstrap environment is used when the system is powered on, or reset. Examples include U-Boot, RedBoot, and MicroMonitor from Lucent. Embedded platforms are commonly shipped with a boot monitor. These programs reside in special region of flash memory on the target hardware and provide the means to download a Linux kernel image into flash memory and subsequently execute it. In addition to having the ability to store and boot a Linux image, these boot monitors perform some level of system test and hardware initialization. In an embedded target, these boot monitors commonly cover both the first- and second-stage boot loaders.

Extracting the MBR

To see the contents of your MBR, use this command:
# dd if=/dev/hda of=mbr.bin bs=512 count=1
# od -xa mbr.bin The dd command, which needs to be run from root, reads the first 512 bytes from /dev/hda (the first Integrated Drive Electronics, or IDE drive) and writes them to the mbr.bin file. The od command prints the binary file in hex and ASCII formats.

In a PC, booting Linux begins in the BIOS at address 0xFFFF0. The first step of the BIOS is the power-on self test (POST). The job of the POST is to perform a check of the hardware. The second step of the BIOS is local device enumeration and initialization.

Given the different uses of BIOS functions, the BIOS is made up of two parts: the POST code and runtime services. After the POST is complete, it is flushed from memory, but the BIOS runtime services remain and are available to the target operating system.

To boot an operating system, the BIOS runtime searches for devices that are both active and bootable in the order of preference defined by the complementary metal oxide semiconductor (CMOS) settings. A boot device can be a floppy disk, a CD-ROM, a partition on a hard disk, a device on the network, or even a USB flash memory stick.

Commonly, Linux is booted from a hard disk, where the Master Boot Record (MBR) contains the primary boot loader. The MBR is a 512-byte sector, located in the first sector on the disk (sector 1 of cylinder 0, head 0). After the MBR is loaded into RAM, the BIOS yields control to it.

Stage 1 boot loader
The primary boot loader that resides in the Master Boot Record (MBR) is a 512-byte image containing both program code and a small partition table (see Figure 2). The first 446 bytes are the primary boot loader, which contains both executable code and error message text. The next sixty-four bytes are the partition table, which contains a record for each of four partitions (sixteen bytes each). The MBR ends with two bytes that are defined as the magic number (0xAA55). The magic number serves as a validation check of the MBR.

Anatomy of the MBR
The job of the primary boot loader is to find and load the secondary boot loader (stage 2). It does this by looking through the partition table for an active partition. When it finds an active partition, it scans the remaining partitions in the table to ensure that they're all inactive. When this is verified, the active partition's boot record is read from the device into RAM and executed. 

Stage 2 boot loader
The secondary, or second-stage, boot loader could be more aptly called the kernel loader. The task at this stage is to load the Linux kernel and optional initial RAM disk. 

GRUB stage boot loaders

The /boot/grub directory contains the stage1, stage1.5, and stage2 boot loaders, as well as a number of alternate loaders (for example, CR-ROMs use the iso9660_stage_1_5).

The first- and second-stage boot loaders combined are called Linux Loader (LILO) or GRand Unified Bootloader (GRUB) in the x86 PC environment. Because LILO has some disadvantages that were corrected in GRUB, let's look into GRUB.

The great thing about GRUB is that it includes knowledge of Linux file systems. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. It does this by making the two-stage boot loader into a three-stage boot loader. Stage 1 (MBR) boots a stage 1.5 boot loader that understands the particular file system containing the Linux kernel image. Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot loader is loaded and running, the stage 2 boot loader can be loaded.

With stage 2 loaded, GRUB can, upon request, display a list of available kernels (defined in /etc/grub.conf, with soft links from /etc/grub/menu.lst and /etc/grub.conf). You can select a kernel and even amend it with additional kernel parameters. Optionally, you can use a command-line shell for greater manual control over the boot process.

With the second-stage boot loader in memory, the file system is consulted, and the default kernel image and initrd image are loaded into memory. With the images ready, the stage 2 boot loader invokes the kernel image. 

Kernel
With the kernel image in memory and control given from the stage 2 boot loader, the kernel stage begins. The kernel image isn't so much an executable kernel, but a compressed kernel image. Typically this is a zImage (compressed image, less than 512KB) or a bzImage (big compressed image, greater than 512KB), that has been previously compressed with zlib. At the head of this kernel image is a routine that does some minimal amount of hardware setup and then decompresses the kernel contained within the kernel image and places it into high memory. If an initial RAM disk image is present, this routine moves it into memory and notes it for later use. The routine then calls the kernel and the kernel boot begins.

When the bzImage (for an i386 image) is invoked, you begin at ./arch/i386/boot/head.S in the start assembly routine (see Figure 3 for the major flow). This routine does some basic hardware setup and invokes the startup_32 routine in ./arch/i386/boot/compressed/head.S. This routine sets up a basic environment (stack, etc.) and clears the Block Started by Symbol (BSS). The kernel is then decompressed through a call to a C function called decompress_kernel (located in ./arch/i386/boot/compressed/misc.c). When the kernel is decompressed into memory, it is called. This is yet another startup_32 function, but this function is in ./arch/i386/kernel/head.S.

Manual boot in GRUB

From the GRUB command-line, you can boot a specific kernel with a named initrd image as follows:
grub> kernel /bzImage-2.6.14.2
  [Linux-bzImage, setup=0x1400, size=0x29672e]

grub> initrd /initrd-2.6.14.2.img
  [Linux-initrd @ 0x5f13000, 0xcc199 bytes]

grub> boot

Uncompressing Linux... Ok, booting the kernel.
If you don't know the name of the kernel to boot, just type a forward slash (/) and press the Tab key. GRUB will display the list of kernels and initrd images.

In the new startup_32 function (also called the swapper or process 0), the page tables are initialized and memory paging is enabled. The type of CPU is detected along with any optional floating-point unit (FPU) and stored away for later use. The start_kernel function is then invoked (init/main.c), which takes you to the non-architecture specific Linux kernel. This is, in essence, the main function for the Linux kernel.

Major functions flow for the Linux kernel i386 boot
With the call to start_kernel, a long list of initialization functions are called to set up interrupts, perform further memory configuration, and load the initial RAM disk. In the end, a call is made to kernel_thread (in arch/i386/kernel/process.c) to start the init function, which is the first user-space process. Finally, the idle task is started and the scheduler can now take control (after the call to cpu_idle). With interrupts enabled, the pre-emptive scheduler periodically takes control to provide multitasking.

During the boot of the kernel, the initial-RAM disk (initrd) that was loaded into memory by the stage 2 boot loader is copied into RAM and mounted. This initrd serves as a temporary root file system in RAM and allows the kernel to fully boot without having to mount any physical disks. Since the necessary modules needed to interface with peripherals can be part of the initrd, the kernel can be very small, but still support a large number of possible hardware configurations. After the kernel is booted, the root file system is pivoted (via pivot_root) where the initrd root file system is unmounted and the real root file system is mounted.

decompress_kernel output

The decompress_kernel function is where you see the usual decompression messages emitted to the display:
Uncompressing Linux... Ok, booting the kernel.

The initrd function allows you to create a small Linux kernel with drivers compiled as loadable modules. These loadable modules give the kernel the means to access disks and the file systems on those disks, as well as drivers for other hardware assets. Because the root file system is a file system on a disk, the initrd function provides a means of bootstrapping to gain access to the disk and mount the real root file system. In an embedded target without a hard disk, the initrdcan be the final root file system, or the final root file system can be mounted via the Network File System (NFS). 

Init
After the kernel is booted and initialized, the kernel starts the first user-space application. This is the first program invoked that is compiled with the standard C library. Prior to this point in the process, no standard C applications have been executed.

In a desktop Linux system, the first application started is commonly /sbin/init. But it need not be. Rarely do embedded systems require the extensive initialization provided by init (as configured through /etc/inittab). In many cases, you can invoke a simple shell script that starts the necessary embedded applications. 

Summary
Much like Linux itself, the Linux boot process is highly flexible, supporting a huge number of processors and hardware platforms. In the beginning, the loadlin boot loader provided a simple way to boot Linux without any frills. The LILO boot loader expanded the boot capabilities, but lacked any file system awareness. The latest generation of boot loaders, such as GRUB, permits Linux to boot from a range of file systems (from Minix to Reiser).

source : http://www.ibm.com/developerworks/linux/library/l-linuxboot/
                http://en.wikipedia.org

Monday, October 4, 2010

Connect Windows printer to Linux machine via samba

You can connect windows printer to Linux machine easily,

Before make a printer connection do following things,

In windows,


In Linux,

Do following,

  1. Open browser and type http://localhost:631 hit enter.
  2. Click Add Printer.
  3. Give Name for printer and click continue. ( Other are optional ).
  4. Choose Device from list (Windows Printer via SAMBA) and click continue.
  5. Give the  device URI , smb://[workgroup/]server[:port]/printer (workgroup and port are optional, printer is name of the printer in windows machine). Then click Continue. ex. smb://MYGROUP/10.1.1.20/HPOfficeJet
  6. Next want to choose correct printer model. Shound choose correct printer model. It it not in list, try to choose printer as much as close to your printer.
  7. That's all.

Wednesday, September 22, 2010

Samba configuration for Linux to windows file sharing

It's simple samba configuration for file sharing throw linux to windows,

You shound be the root user for install and configure samba in linux machine.

Here i used RedHat Enterprise Linux 5

Step 1 : Open terminal window, use command yum install samba* for install samba,

Step 2 : After install successfully open /etc/samba/smb.conf, in terminal

"#vim /etc/samba/smb.conf" and hit enter,

Step 3 : Find line "workgroup = MYGROUP", Change MYGROUP as your wish.
             * It's importent in printer sharing.

Step 4 : After that move to end of the file line,

Step 5 : Add following things,


[myshare]                                       # share name
comment = share's stuff               # just comment for share
path = /mnt/share                          # location of directory for share
valid users = user                         # user for share (Should be user in system)
public = no                                     # Public access, Local access without pass
writable = no                                 # For file
browsable = yes                            # For browse file
printable = no                                # For printer
hosts allow = 192.168.0.                # Which network should access share


Step 6 : Samba user creation / We can set different password for local system user and samba user.


#smbpasswd -a user                   [Type and hit enter, and give password for user]


Step 7 : That's all. You made it. Now want to start samba service.

#service smb start

#chkconfig smb on


Step 8 : Open you windows machine, open run window, Hit //[ip of linux machine]


Step 9 : It'll ask user name and password, use your samba user name and password for login. That's all.

Sunday, September 5, 2010

Windows printer sharing ( Network printer )

We can install printer in one machine and use it in all over local network,

Following the simple steps for to do it.

Step 1 : Add printer to printer list. If you installed printer driver, your PC can detect printer automaticly.

Step 2 : Right click the printer icon in Fax and Printer in Control Pannel. You have choice in list for printer sharing. Click it.

Step 3 : Give name to sharing printer, That's all.

Step 4 : Now you can access printer anywhere in local network by your printer installed system IP.


Additional,


Open run box in client machine and type //[ip address of printer installed machine] and hit enter.

A window will open with printer icon ( If there is no printer you didn't share printer properly)

Just double click it, It ask for add printer just click Ok or Yes.

Now you can see printer name in your file print options.

Monday, August 30, 2010

Hide partition drive from My Computer in Windows

Group Policy is a feature of the Microsoft Windows NT family of operating systems. Group Policy is a set of rules which control the working environment of user accounts and computer accounts. Group Policy provides the centralized management and configuration of operating systems, applications and users' settings in an Active Directory environment. In other words, Group Policy in part controls what users can and can't do on a computer system. Although Group Policy is more often seen in use for enterprise environments, it is also common in schools, smaller businesses and other kinds of smaller organizations. Group Policy is often used to restrict certain actions that may pose potential security risks, for example: to block access to the Task Manager, restrict access to certain folders, disable the downloading of executable files and so on.

Here we using group policy for hide Hide partition drive from My Computer in Windows. ( Here i using windows XP )

Step 1 : In run commend type gpedit.msc


Step 2 : Hit Enter, You'll get following window, This is group policy editor window,


Step 3 : Choose User Configuration, In Tree under user configuration choose Administrative Templates,


Step 4 : Under Administrative Templates, click windows Components and then Windows Explorer. Now in the right side of the window we ca find a text , Hide these specific drives in My Computer



Step 5 : Now double click it, You'll get a window like as follow. Here, First you want to click Enabled radio button, Then want to choose drive want to hide.



That's all. Now click ok and check you My Computer.

Windows Event Log Viewer

In Windows XP, an event is any significant occurrence in the system or in a program that requires users to be notified, or an entry added to a log. The Event Log Service records application, security, and system events in Event Viewer. With the event logs in Event Viewer, you can obtain information about your hardware, software, and system components, and monitor security events on a local or remote computer. Event logs can help you identify and diagnose the source of current system problems, or help you predict potential system problems.

Steps to go Event Viewer :

Step 1 : Go to run and in field type ' eventvwr ' ( without quotes )


Step 2 : You'll get following window, In this log are grouped as 5 categries ,

  • The application log is where applications / programs log their events. For example, when your virus scanner encounters a problem, it could bring this to your attention through the application log. The developers of the program are responsible for the type of events that are logged here. THAT is where you can often find VERY useful information about things that go wrong behind the curtains. Things that can dramatically slow down your pc.

  • The security log is used to bring valid and invalid logon attempts to your attention. Also file access, creation and deletion of files can be logged here. You need to have an account with administrative privileges to enable, use and specify which events are logged in the security log.

  • The system log , where you will find events logged by Windows system components. Can also reveal some VERY interesting troubleshooting information about your system.
Microsoft Office Diagnostics and Microsoft Office Sessions are used for Log MS-Office activities,

Step 3 : If you click the respective tree item in left you'll get log at right side of window,



About Events:

There are basically three types of events : information, warning and error.

  • Informative events : There's no need to worry about it. they just, well, inform you that something has happened, e.g. a driver has loaded or a service has started.

  • Warnings : Not critical. May be an indication of future problems, for instance when disk space is running low.

  • Errors : You should try to get rid of those. They indicate a significant problem, such as the failure of a critical task. For example when a system service fails to start. These can cause loss of data or functionality.


source : http://www.windows-help-central.com/windows-xp-event-log.html

Wednesday, August 25, 2010

Deleted File Recovery in Liunx - PhotoRec

PhotoRec is great tool for recover deleted files in Linux

PhotoRec is a data recovery software tool designed to recover lost files from digital camera memory (CompactFlash, Memory Stick, Secure Digital, SmartMedia, Microdrive, MMC, USB flash drives etc.), hard disks and CD-ROMs. It recovers most common photo formats, including JPEG, and also recovers audio files including MP3, document formats such as Open Office, Microsoft Office, PDF and HTML, and archive formats including ZIP.
PhotoRec does not attempt to write to the damaged media you are about to recover from. Recovered files are instead written to the directory from where you are running PhotoRec or any other directory you choose. PhotoRec is shipped with TestDisk.

Here steps for recover lost data:

Step 1 : As a root user, install PhotoRec by "yum install photorec" in RedHat Linux. After install type photorec in terminal window


Step2 : You'll get following screen


Step 3 : Here want to choose hard disk, Hit Enter for proceed, You'll get following,


Step 4 : Choose partition table type, Our normal table type is Intel ( Normally we using this only ). Next you'll get following page,


 Step 6 : Hit Search for go to next step, Hit options for advanced options, Hit File Opt for choose specified file type recovery.



Step 7 : After Hit Search , you'll get following window. This for choose file system type.This is one of useful option for linux file system,


Step 8 : Now want to choose place for store recoverd files, Don't use same partition for store files. This'll corrupted files and can't recover file successfully.


After completion of file recovery,Open destination directory and get files. Wait until file recovery completion.


By this i have successfully restored lost files. Use it by your one risk. Hope you can successfully restore your lost data. 

Please go PhotoRec official page for more information.

Recover Lost Partitions in Linux - TestDisk

TestDisk is great tool for recover lost partitions in Linux

TestDisk is a free data recovery utility. It was primarily designed to help recover lost data storage partitions and/or make non-booting disks boot-able again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally erasing a partition table).

Here steps for recover lost partition:

Step 1 : As a root user, install testdisk by "yum install testdisk" in RedHat Linux. Type testdisk in terminal.


Step2 : You'll get following screen


Step 3 : Use options for create or skip log files, After that you get following screen. Here we want to choose hard disk for recover lost partition,


Step 4 : Here i use single hard disk, Hit Enter for proceed, You'll get following


Step 5 : Choose partition table type, Our normal table type is Intel ( Normally we using this only ). Next you'll get following page,


 Step 6 : Use options for choose our need, Analyse'll show you list of partition


Step 7 : Hit Enter for Quick Search , This'll analyse our Hard Disk, This process is as shown in figure,


After completion of this, It'll show all partition as available.

By this i have successfully restored lost partitions. Use it by your one risk. Hope you can successfully restore your lost partitions. 

Please go TestDisk official page for more information.

Monday, May 10, 2010

Mount iso files in linux without cd/dvd disk

Here the command for mount iso files in linux without cd/dvd

Step 1 : Create a folder in /mnt/tempiso

Here i created a folder name as tempiso

Step 2 : mount -o loop testiso.iso /mnt/tempiso

Step 3 : Open /mnt/tempiso and get all files

Friday, May 7, 2010

Installing Firefox in Linux ( RHEL 5 )

Hi,
This is a simple method to install firefox in redhat Enterprise Linux 5
It also support all linux operating systems
Step 1 : Download Firefox from here http://www.mozilla.com/en-US/firefox/firefox.html
Step 2 : Extract files on desktop
Step 3 : Copy extracted ( firefox ) folder to /usr/local/share  [ Storing location is your wish ]
Step 4 : That's all. You made it. Now just double click 'firefox' inside firefox folder.
Step 5 : Open with terminal , It ask for default browser. Made it as default and creat a shortcut.

Saturday, May 1, 2010

Updating Firefox in Linux ( Simple method )

Step 1 : Just download new version of Firefox from mozilla.com

Step 2 : Downloaded file in .tar.bz2 extension.

Step 3 : Extract .tat.bz2 file in desktop

Step 4 : Copy all files from extracted folder

Step 5 : Paste into

/usr/lib/firefox_you current_version
folder

Step 6 : Rename this folder with new version ( Not important )

Step 7 : Run Firefox (Your desktop shortcut is enough to do it )

Step 8 : Now Firefox will upgrade


Enjoy new updated version.

It's not proper way to install Firefox in Linux.

It works very well in RHEL5

Installing fonts in RedHat Enterprise Linux 5 ( Simple Method )

Simple method

Step 1 : Just copy ".ttf " fonts to /usr/share/fonts/your_folder_name

Step 2 : Open terminal

Step 3 : Run following commend

#fc-cache /usr/share/fonts/your_folder_name

Step 4 : Logout user and login again


Enjoy

It's simple method and working well for me

Monday, April 26, 2010

Download website with wget in linux

wget is a nice tool for downloading resources from the internet. The basic usage is wget url:

wget http://linuxreviews.org/

Therefore, wget (manual page) + less (manual page) is all you need to surf the internet. The power of wget is that you may download sites recursive, meaning you also get all pages (and images and other data) linked on the front page:

wget -r http://linuxreviews.org/

But many sites do not want you to download their entire site. To prevent this, they check how browsers identify. Many sites refuses you to connect or sends a blank page if they detect you are not using a web-browser. You might get a message like:

Sorry, but the download manager you are using to view this site is not supported. We do not support use of such download managers as flashget, go!zilla, or getright

Wget has a very handy -U option for sites like this. Use -U My-browser to tell the site you are using some commonly accepted browser:

wget -r -p -U Mozilla http://www.stupidsite.com/restricedplace.html

The most important command line options are --limit-rate= and --wait=. You should add --wait=20 to pause 20 seconds between retrievals, this makes sure you are not manually added to a blacklist. --limit-rate defaults to bytes, add K to set KB/s. Example:

wget --wait=20 --limit-rate=20K -r -p -U Mozilla http://www.stupidsite.com/restricedplace.html

A web-site owner will probably get upset if you attempt to download his entire site using a simple wget http://foo.bar command. However, the web-site owner will not even notice you if you limit the download transfer rate and pause between fetching files.

Use --no-parent


--no-parent is a very handy option that guarantees wget will not download anything from the folders beneath the folder you want to acquire. Use this to make sure wget does not fetch more than it needs to if just just want to download the files in a folder.


Source : http://linuxreviews.org/quicktips/wget/

Saturday, March 20, 2010

Block anything based on url keywords by squid proxy

Hai guys/gals,
Here i going to tell about block any sites based on keywords squid proxy.
This help for system administrators in schools and colleges
Here i use linux sever( RHEL5 ) and squid 2.6 stable version.
It simple to do,
Step 1 : Just store what all are key words you want to block
Here i stored keywords in "/etc/squid/badkeys"
Step 2 : Using vim , open squid configuration file
Ex. vim /etc/squid/squid.conf
Step 3 : Use url_regex to block, (Just add following line in acl )
acl badkey url_regex "/etc/squid/badkey"
Ex:
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl your_network_name src 10.1.1.0/24
acl badkey url_regex "/etc/squid/badkey"
Step 4 : Add following line for deny badkey in http_access
http_access deny badkey
Ex:
http_access allow localhost
http_access deny badkey
http_access allow your_network_name
http_access deny all

Step 5 :That's all. Restart Squid




Wednesday, March 10, 2010

Hide Blogger Navbar

Step 1: Log in to Blogger

Step 2 : On your Dashboard, click Layout under Manage Blogs. Then click Edit HTML.

Step 3 : You will get HTML of your blog template.

Step 4 : Paste following code in your html head part ( paste the CSS in the top of the Variable definitions )

#navbar-iframe {
display: none !important;
}

Step 5 : Click Save

Friday, February 12, 2010

Clear cache in Linux Server

If you running Proxy Server, Mostly it'll store frequently visiting sits content.

It's one of the best feature for fast browsing, But some few cases it not good.

Here a commend for clear cache files from server,

But it not useful at all conditions,

Step 1 : Open terminal and type following

[email protected]~] # echo 3 > /proc/sys/vm/drop_caches

Step 2 : Hit Enter


That's all.


Note : It's not give solution for all problem related with it.

Tuesday, January 26, 2010

Install and Enable SNMP Service in Windows XP, Vista and 2003

SNMP (Simple Network Management Protocol) is an internet protocol used in network management systems to monitor network-attached devices such as computers, servers,routers, switches, gateways, wireless access points,VoIP phones, and etc. for conditions that warrant administrative attention. SNMP provides management data in the form of variables on the managed systems, which describe the system configuration parameter or current status value. These variables can then be read and queried (or sometimes set or write) by managing applications. Windows system running XP, Vista or 2003 does not turn on SNMP service by default, thus users need to manually install and enable SNMP service.

Note that you must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.

How to Install and Enable the SNMP Service

  1. In Windows XP and Windows 2003, click Start button, then go to Control Panel and run Add or Remove Programs applet. On Add or Remove Programs dialog, click Add/Remove Windows Components to open Windows Components wizard.In Windows Vista, click Start button, then go to Control Panel. Click on Programs link and then click on Turn Windows features on or off. If you’re prompted with User Account Control dialog, click “Continue”.
  2. In Components of Windows XP and 2003, click on the Management and Monitoring Tools (make sure that you do not select or clear, tick or untick its check box to change the existing selection), and then click Details.In Windows Features of Vista, locate SNMP feature.
  3. Select and tick the check box of Simple Network Management ProtocolSNMP feature. or
  4. Click OK. Also click Next if you’re in Windows XP or 2003. SNMP service will be installed on the system. You may require to insert the Windows setup CD/DVD disc into optical drive.
  5. SNMP will start automatically after installation. But it’s recommended to verify the service status from Services in Control Panel, and if it’s stopped, you can start the SNMP service from there.
Two new services will be created:
  1. SNMP Service which is the main engine with agents that monitor the activity in the network devices and report the information to the monitoring console workstation.
  2. SNMP Trap Service which receives trap messages generated by local or remote SNMP agents and forwards the messages to SNMP management programs running on this computer.
Windows doesn’t assign any community string to the SNMP service by default, and also only allow access from localhost or local devices. Further configuration is needed to add in desired community string, which act as the password to grant reply to any SNMP request from remote system.

How to Configure SNMP Service (Add “public” community string)

  1. Click on Start button, then go to Control Panel.
  2. In Windows Vista, click on System and Maintenance link.
  3. Open Adminstrative Tools.
  4. Run Services applet.
  5. Locate and right click on SNMP Service, then select Properties.
  6. In SNMP Service Properties window, click on Traps tab.
  7. In the “Community name” text box, enter public or any other case-sensitive SNMP community name to which this computer will send trap messages.
  8. Click on Add to list button. 

How to Configure Security for SNMP Service for a Community

  1. Continue from above steps, click on Security tab. If you already close SNMP Service Properties window, re-open it.
  2. Under “Accepted community names” section, click Add button.
  3. Select the appropriate permission level for the community string in the “Community Rights” drop down list to specify how the host processes SNMP requests from the selected community. Normally READ ONLY is recommended.
  4. In the “Community Name” box, type public or any case-sensitive community name that you want.
  5. Click on Add button.
  6. In order for the SNMP service to accept and receive SNMP request packets from any host on the network, including external remote host regardless of identity, click Accept SNMP packets from any host.To limit the acceptance of SNMP packets, click Accept SNMP packets from these hosts, and then click Add, and then type the appropriate host name, IP or IPX address in the Host name, IP or IPX address box. You can restrict the access to local host or limited servers only by using this setting. Finish off by clicking Add button again.
  7. Click OK when done. Note that you may need to reboot for the settings to take effect.

Tuesday, January 5, 2010

Installing Open Office org in RHEL5

First want to download Open office ,

And save it in desktop ( for basic user )

Use following comment to extract package ,

tar zxvf OOo_{VERSION}_LinuxIntel_install_en-US.tar.gz

---- eg. #tar zxvf OOo_3.1.1_LinuxIntel_install_wJRE_en-US.tar.gz

Now want to install rpm, for that first goto rpm folder

cd SOMEDIR/RPMS

---- eg. #cd OOO310_m19_native_packed-1_en-US.9420/RPMS/

After that you install the rpms by doing

#su -

#rpm -ivh *.rpm desktop-integration/*redhat*

have to replace the {VERSION} part with the actual version listed in the file you downloaded. Same thing with SOMEDIR, replace that with the name of the actual directory that gets extracted after running the first command.

Creating DVD repository for own system or server

1st Mount RHEL5 dvd

1)check :

#rpm -qa | grep vsftpd

-if /var/ftp directory didn't there means install

#rpm -ivh /media/RHEL5/Server/vsftpd* ( this is location of file in mounted dvd )


2) check :

#rpm -qa | grep createrepo

-if createrepo command not installed means install

#rpm -ivh /media/RHEL5/Server/createrepo* ( this is location of file in mounted dvd )


3)Copy dvd/cd files to pub:

#cp -avf /media/RHEL/* /var/ftp/pub/


4)copy grouping files:

#cp /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /root

#cp /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /root


5)clear the old repos:

#rm -rf /var/ftp/pub/Server/repodata

#rm -rf /var/ftp/pub/VT/repodata


6)repo creation:

#createrepo -g /root/comps-rhel5-server-core.xml -v /var/ftp/pub/Server

#createrepo -g /root/comps-rhel5-vt.xml -v /var/ftp/pub/VT


7) create a file called :

for server:

#vim /etc/yum.repos.d/server1.repo

[Server]

name=Server1 Server Repository

baseurl=file:///var/ftp/pub/Server

gpgcheck=0

#This one is needed for xen packages

[VT]

name=Server1 VT Repository

baseurl=file:///var/ftp/pub/VT

gpgcheck=0


for client:

#vim /etc/yum.repos.d/client.repo

[Server]

name=Server1 Server Repository

baseurl=ftp://192.168.0.254/pub/Server

gpgcheck=0

# This one is needed for xen packages

[VT]

name=Server1 VT Repository

baseurl=ftp://192.168.0.254/pub/VT

gpgcheck=0


8) checking

#yum clean all

#yum install

Mounting NTFS Partition on RHEL5 with fuse-ntfs-3g

Here the simple steps for how to mount linux partitions in Redhat Enterprise Linux 5 (RHEL5)

First want to create rpmforge repository for get packages.
you can get steps here.

The gcc packages are important for installing fuse-ntfs-3

Intall gcc packages from your RHEL CD/DVD or other repository where gcc packages available. ( try EPEL or rpm fusion )

-- I am used my own dvd repository.
-- You can get this repository creation steps here.

After GCC installed
do following ,

#yum -y install fuse fuse-ntfs-3g dkms dkms-fuse

this will install needed packages for mounting

Now want to create mount point , for that

#mkdir /mnt/windows

Now want to make entry in your /etc/fstab for permanent mount.

If want make back up use following comment

#cp /etc/fstab /etc/fstab.bkp


Before make entry in fstab want to know which type of hard disk we are using
if you know already skip this step, otherwise use following commant
#fdisk -l
Out put of this comment , under device boot it shows /dev/hda1 or /dev/sda1

Note it.

Now open your /etc/fstab file with following commant

#vim /etc/fstab

use following entry in it,

/dev/hda1 /mnt/windows ntfs-3g defaults 0 0

Then save and exit.
reboot system or use following comment to mount
#mount /mnt/windows

That is all. you made it. By this way you can mount all ntfs partition.

VN:F [1.7.8_1020]

Red Hat Enterprise Linux Enable rpm fusion Repository

Installing Free and Non free Repositories
We have two separate software repositories:

  • free for Open Source Software (as defined by the Fedora Licensing Guidelines) which the Fedora project cannot ship due to other reasons

  • nonfree for redistributable software that is not Open Source Software (as defined by the Fedora Licensing Guidelines); this includes software with publicly available source-code that has "no commercial use"-like restrictions
Download following file and install for free rpm fusion repository :

http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm

Download following file and install for non free rpm fusion repository :

http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm


Installing free and non free rpm fusion

#rpm -ivh rpmfusion-free-release-5-0.1.noarch.rpm

#rpm -ivh rpmfusion-nonfree-release-5-0.1.noarch.rpm

#yum repolist

-- for update repository list


Important notes



  • You need to enable EPEL on RHEL5 or compatible distributions like CentOS before you enable RPM Fusion for EL.
  • The RPM Fusion for EL repositories are still in the early testing stages; hence you (for now) need to enable epel-testing as well, as some of the RPM Fusion packages depend on packages that are currently in epel-testing.

  • All users that used Freshrpms or Livna installed properly (e.g. by installing one of their foo-release packages) got RPM Fusion free and nonfree repositories enabled automatically.

Red Hat Enterprise Linux Enable EPEL (Extra Packages for Enterprise Linux) Repository

EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.
EPEL provide lots of packages for CentOS / RHEL, It is not part of RedHat or CentOS but is designed to work with these major distributions. Please note that EPEL only provides free and open source software unencumbered by patents or any legal issues. In short you will not find mp3, dvd and music / media player under EPEL. However, you will find many programs related to networking, monitoring, sys admin, programming and so on.
Packages are supplied in RPM format and in most cases are ready to use. Beware that some packages may break something and you should not blindly install those packages.

How do I enable EPEL?

Simply type the following command as root user:
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
List new repo:
# yum repolist
Sample output:
Loading "skip-broken" plugin
Loading "fastestmirror" plugin
repo id              repo name                                 status
addons               CentOS-5 - Addons                         enabled
base                 CentOS-5 - Base                           enabled
epel                 Extra Packages for Enterprise Linux 5 -   enabled
extras               CentOS-5 - Extras                         enabled
updates              CentOS-5 - Updates                        enabled

Once installed use yum command to list, view and install the packages:

# yum search package-name

# yum install package-name

source: http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/

Monday, January 4, 2010

RPM FORGE repository for RHEL 5

This is simple method of creating repositories with rpmforge

#wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

-- this step is used to get rpmforge-release-0.3.6-1.el5.rf.i386.rpm package.

#rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

-- this step used to install pmforge-release-0.3.6-1.el5.rf.i386.rpm package

#yum repolist

-- this step update repository list in your machine

----------------------------------------------------------------------------------------

You can find your rpmforge packages here   http://packages.sw.be/rpmforge-release/