A backup Utility - Rsnapshot



There are many ways to backup Servers. One of the better ways to accomplish this is using rsnapshot. Rsnapshot is nothing but a filesystem snapshot utility for backing up local and remote systems.

Rsnapshot is written in Perl, and depends on rsync। With ssh access, it is possible to backup remote servers.

Why rsnapshot?

We have many familiar ways to generate full backup and copy it to another server which includes ftp, scp and all. But now the question that comes to your mind will be "Why should I use rsnapshot ? or What is so special about this tool?"
Listed below are the major advantages of rsnapshot, which make you feel that it is worth using.
  • Using rsync and hard links, it is possible to keep multiple, full backups instantly available. The disk space required is just a little more than the space of one full backup, plus incrementals. This comes as a criteria when your drive is lacking enough free space to accommodate 3 copies of backup.
  • Depending on your configuration, it is quite possible to set up in just a few minutes. Files can be restored by the users who own them, without the root user getting involved.
  • There are no tapes to change, so once it's set up, you may never need to think about it again.
  • Rsnapshot takes advantage of hard links (multiple directory pointers to the same data) to give the appearance of multiple full backups yet requires only enough disk capacity to store the complete data set plus any changed files. Thus we have the illusion of full hourly, daily, weekly, and monthly backups without having the physical space to hold that many copies.
  • Another benefit is that rsync is cross-platform, so it isn't constrained to *nix systems।

Installation of rsnapshot

Rsnapshot can be installed in a few minutes of time. It requires the following prerequisites.
1) Perl
2) rsync

i). Download the source tarball by useing the command:
wget http://fresh.t-systems-sfr.com/unix/src/privat2/rsnapshot-1.3.0.tar.gz
ii). Untar the source code package
tar xzvf rsnapshot-1.3.0.tar.gz
iii). Change to the source directory.
cd rsnapshot-1.3.0/
iv). Select the directory to install the files. Usually the files are placed in /usr/local directory and the config files in the /etc directory.

v). Run the configure script
./configure --sysconfdir=/etc
vi). Install the program by
make install
Now rsnapshot is installed under /usr/local, with the config file in /etc।


Configuration

A sample copy of the rsnapshot config file is provided with the package. We need to just copy the file.
cp /etc/rsnapshot.conf.default /etc/rsnapshot.conf
The directives that need to be configured in rsnapshot.conf

1. snapshot_root
This is the snapshot root directory which holds the file system snapshots.
snapshot_root   /.snapshots/
2. Modify the path to the various programs like rm for removing files, rsync, ssh etc. Usually not much modification is needed here.

3. Specify thebackup intervals.
interval        hourly  6
interval        daily   7
interval        weekly  4
In this example, rsnapshot is taken every four hours, or six times a day (these are the hourly intervals), 7 times a week, 4 times a month. Thus it covers the whole month (4 weeks)

4. Select verbose level, loglevel and logfile path. Typical values used are
verbose         2
loglevel        3
logfile        /var/log/rsnapshot
5. Next main configuration to be done is BACKUP POINTS / SCRIPTS

This is the section where you tell rsnapshot what files you actually want to back up. You put a “backup” parameter first, followed by the full path to the directory or network path you're backing up. The third column is the relative path you want to back up to inside the snapshot root.

# LOCALHOST
backup   /home/          localhost/
backup   /etc          localhost/
backup  /usr/local/      localhost/

For example, take case 1, where the parameter is "backup". We are backing up the /home partition of the server on the rsnapshot root of our server itself. Thus with this backup parameter, a backup of /home is created in /root/.snapshots

In addition to full paths on the same server, we can also backup filesystems on remote systems using rsync over ssh. To get this done,

a) The ssh daemon must be running on the remote server.

b) You must have access to the account you specify the remote machine, in this case the root user on remote server.

c) You must have key-based logins enabled for the root user at remote server, without passphrases.

# TEST.COM
backup root@test.com:/home/ test.com/
backup root@test.com:/home/ test.com/ exclude=mtab,exclude=core

In example 1, /home partion of remote server example.com is backed up to the server where snapshot is running. In example 2, similarly /etc partion is backed up, excluding mtab and core directories.
This backup parameter is commonly used in live servers for backup configuration.

Allowing remote logins with no passphrase is a security risk that may or may not be acceptable in your situation. Make sure you guard access to the backup server very carefully! If we wish to perform backup as another user, we could specify the other user instead of root for the source (i.e. user@test.com).

Now with this we have completed the basic configuration of rsnapshot.

6. Testing configuration file.
rsnapshot configtest
If all is well, it should say Syntax OK, or else the errors are shown. We have to use tabs in the config file and not spaces.

7. Test run of rsnapshot
rsnapshot -t hourly
This tells rsnapshot to simulate an "hourly" backup। It will print out the commands it will perform when it runs for real.

Automating rsnapshot using cron job

Edit root's crontab by command
crontab -e
Add the following entries,
0 */4 * * * /usr/local/bin/rsnapshot hourly
30 23 * * * /usr/local/bin/rsnapshot daily

Cron should be timed in a way that the hourly backup is finished before performing the daily backup।

How it works

All backups are stored in the snapshot directory. New directories inside the snapshot root are created when rsnapshot hourly and weekly are run. Thus when rsnapshot hourly is run 6 times, the directories with name hourly.0, hourly.1, ....hourly.5 are created. Similarly when rsnapshot weekly is run, 7 new directories are created namely weekly.0, weekly.1, weekly.2 till weekly.6.

Each subsequent time rsnapshot is run with the hourly command, it will rotate the hourly.X directories, and then “copy” the contents of the hourly.0 directory (using hard links) into hourly.1.

When rsnapshot daily is run, it will rotate all the daily.X directories, then copy the contents of hourly.5 into daily.0.

hourly.0 will always contain the most recent snapshot, and daily.6 will always contain a snapshot from a week ago.
Unless the files change between snapshots, the “full” backups are really just multiple hard links to the same files.
That is how rsnapshot saves disk space. If the file changes at any point, the next backup will unlink the hard link in hourly.0, and replace it with a brand new file.

When weekly, monthly, and yearly intervals defined (in that order), the weekly ones would get updated directly from the filesystem, the monthly ones would get updated from weekly, and the yearly ones would get updated from monthly।

Conclusion

When the aforesaid instructions are followed, rsnapshot installation is quite simple and is very efficient in performing automatic backups of your system. The amount of disk space taken up will be equal to one full backup, plus an additional copy of every file that is changed.

Reference:

http://www.rsnapshot.org/
Continue reading A backup Utility - Rsnapshot

Network Monitoring With ntop: Installation and Configuration

1. Introduction


ntop is a network traffic tool that shows network usage in real time. It displays a list of hosts that are currently using the network and reports information concerning the IP (Internet Protocol) and Fibre Channel (FC) traffic generated by each host. The traffic is sorted according to host and protocol. Protocols (user configurable) include:
   * TCP/UDP/ICMP
* (R)ARP
* IPX
* DLC
* Decnet
* AppleTalk
* Netbios
* TCP/UDP
o FTP
o HTTP
o DNS
o Telnet
o SMTP/POP/IMAP
o SNMP
o NFS
o X11

One of the good things about this tool is that you can use a web browser to manage and navigate through ntop traffic information to better understand network status.

    * a web interface
* limited configuration and administration via the web interface
* reduced CPU and memory usage (they vary according to network size and traffic)
make ntop easy to use and suitable for monitoring various kind of networks.

2. Prerequisites

Ntop 3.2
LIBPCAP
GDBM

libpcap is a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring.

3. Download

Please download the G-LIB rpm as well as ntop rpms.

http://dag.wieers.com/rpm/packages/ntop
http://rpmfind.net/linux/RPM/fedora/4/i386/
glib-1.2.10-16.i386.html

4. Installation

1- Installing G-LIB:

# wget ftp://download.fedora.redhat.com/pub/fedora/
linux/core/4/SRPMS/glib-1.2.10-16.src.rpm
# rpm -ivh glib-1.2.10-16.i386.rpm

2- Installing ntop:

# wget http://dag.wieers.com/rpm/packages/ntop/
ntop-3.2-1.el3.rf.i386.rpm
# rpm -ivh ntop-3.2-1.el3.rf.i386.rpm

5. Running ntop

1- Initialize ntop:

ntop :That will initialize ntop and it will ask you to enter your username and password.

The default username: admin
Please enter the password for the admin user:
Please enter the password again:
Once the admin password set, you will get a message at the command prompt something like.
"Thu 22 Mar 2007 11:01:04 PM MDT  Admin user password has been set"

2- Start ntop service:

# service ntop start
Starting ntop: [ OK ]

6. Log In To The Web Interface

ntop can be managed through a web interface. You can enter your server address in your web browser:
http://ServerIP:3000
https://ServerIP:3001
Now you can monitor your hosts and manage your ntop configuration your admin login.

7. Plugins

The following plugins can be configured for the system through the ntop web interface.
  1. Host Last Seen: This plugin produces a report about the last time packets were seen from each specific host.A note card database is available for recording additional information.
  2. icmpWatch: This plugin produces a report about the ICMP packets that ntop has seen. The report includes each host, byte and per-type counts (sent/received).
  3. snmpPlugin: This plugin is used to monitor host traffic using the SNMP protocol.
  4. Round Robin Database: This plugin is used to setup, activate and deactivate ntop's rrd support. This plugin also produces the graphs of rrd data, available via a link from the various 'Info about host xxxxx' reports.
  5. NetFlow: This plugin is used to setup, activate and deactivate NetFlow support. ntop can both collect and receive NetFlow V1/V5/V7/V9 and IPFIX (draft) data. Received flow data is reported as a separate 'NIC' in the regular ntop reports.
  6. sFlow: This plugin is used to setup, activate and deactivate ntop's sFlow support. ntop can both collect and receive sFlow data.
  7. PDAPlugin: This plugin produces a minimal ntop report, suitable for display on a pda.

. References

1.http://www.ntop.org/
2.http://ntop.ethereal.com/ntop.html
Continue reading Network Monitoring With ntop: Installation and Configuration

Installing and Configuring Nagios

1) Getting Nagios

You need root access on the server, where you would like to install Nagios. Login as root.

Create a directory for downloads.

#mkdir -p /usr/src/backs/nagios
#cd /usr/src/backs/nagios

Download source of nagios and nagios-plugins at http://www.nagios.org/download/.

#wget http://keihanna।dl।sourceforge.net/sourceforge/naagios
/nagios-1.2.tar.gz
#wget http://easynews.dl.sourceforge.net/sourceforge/nagiosplug
/nagios-plugins-1.3.1.tar.gz

2) Compilation and installation of Nagios

Login as root and create a user, say "nagios"
#su
#adduser nagios
#passwd nagios
Changing password for user nagios.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

In some servers normal users may not have permission to use 'mail' inorder to send alerts.
usermod -G mail nagios
Make a directory for working with the source code.
mkdir -p /usr/src/works/nagios
cd /usr/src/works/nagios/
tar -zxvf /usr/src/backs/nagios/nagios-1.2.tar.gz
cd nagios-1.2/
./configure
The default is fine for normal operation. for details see the file 'INSALL'.
./configure --prefix=prefix --with-cgiurl=cgiurl --with-htmurl=htmurl
--with-nagios-user=someuser --with-nagios-grp=somegroup
./configure
make all
make install
make install-init # Needed to add the service 'nagios'.
make install-commandmode
make install-config
Install the plugins
cd ../
tar -zxvf /usr/src/backs/nagios/nagios-plugins-1.3.1.tar.gz
cd nagios-plugins-1.3.1/
./configure
NOTE:- For mysql and postgresql plugins to work, their libraries have
to be installed. so to avoid installing those we will use 'check_tcp'
Instead later with seperate port for mysql and postgresql.
make
make check
make install

Libraries will be installed in '/usr/local/nagios/libexec' position by the default installation. If there is no contents do the following.

 mkdir /usr/local/nagios/libexec
mv /usr/lib/nagios/plugins/* /usr/local/nagios/libexec/
ln -s /lib/libcrypto.so.0.9.7a /lib/libcrypto.so.4

3) Post install Configuration of Nagios

Edit apache's httpd.conf file. (the location of the httpd.conf file may differ)
vim /etc/httpd/conf/httpd.conf
Add the following line at the end of the file.
Include /etc/httpd/conf/nagios.conf
Create the file '/etc/httpd/conf/nagios.conf'.
vi /etc/httpd/conf/nagios.conf
Add the following contents to this file.
-------------------------------------------------
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/

AllowOverride AuthConfig
Options ExecCGI
Allow from all
Order allow,deny


Alias /nagios/ /usr/local/nagios/share/

Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

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

Make sure the updations done with http is fine and restart apache.
#service httpd restart
Create '.htaccess' file in '/usr/local/nagios/share/' and '/usr/local/nagios/sbin/'.
#touch /usr/local/nagios/share/.htaccess
#touch /usr/local/nagios/sbin/.htaccess
Add the following contents to both these files.
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

Create the username, password for logging into the Nagios interface.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
ls -l /usr/local/nagios/etc/htpasswd.users
Make it available for the user who runs httpd.
chmod o+r /usr/local/nagios/etc/htpasswd.users
Restart the httpd service.
service httpd restart

5)Advanced Nagios Configurations.

Rename the sample files to the real names.
cd /usr/local/nagios/etc/
for i in *sample ; do mv $i `echo "$i" |sed s/-sample//` ; done
Edit the main conf file, nagios.cfg. and change only these lines.
check_external_commands=1
Make these Cgi specific changes in cgi.cfg.
use_authentication=1
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin

Add servers that need to be monitored

Make the Host specific changes to the hosts.cfg.
 Generic host definition template
define host{
name generic-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1

register 0
}


define host{
use generic-host ; Name of host
template to use

host_name
alias
address
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,u,r
}
Repeat for all the hosts we want to check.

Group them in hostgroups.cfg

define hostgroup{
hostgroup_name
alias
contact_groups
members <,,..>
}
Repeat for all the hosts groups.

Specify the services that need to be checked

Edit the details of all the services, we want checked by Nagios in services.cfg.
 Generic service definition template
define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
register 0
}


define service{
use generic-service
host_name
service_description
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command
}
Repeat for each service on each host.

Specify Alert Contacts

In order to specify details of the contacts for alerts, we need to edit contacts.cfg.
 'nagios' contact definition
define contact{
contact_name
alias
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email,notify-by-epager
host_notification_commands
host-notify-by-email,host-notify-by-epager
email
pager
}
Repeat for all contacts.

Group the contacts

Edit contactgroups.cfg, in order to specify groups of contacts.
define contactgroup{
contactgroup_name
alias
members
}
Repeat for all groups to include all contacts

Escelating with nagios

If you need to send selective alerts, for example when critical issues occur, simply configure the escalations.cfg file.
define serviceescalation{
host_name
service_description <>
first_notification 2
last_notification 6
contact_groups <>
notification_interval 0
}
Repeat for all escalations Once again, check all the files, nagios.cfg cgi.cfg hosts.cfg hostgroups.cfg, services.cfg, contacts.cfg, contactgroups.cfg, escalations.cfg and checkcommands.cfg Restart httpd and then Nagios.
service httpd restart
Add Nagios to system services.
chkconfig --add nagios
service nagios restart
Check for any errors reported, and solve them one by one if any.
Enable nagios in runlevels, so that it starts on boot.
chkconfig nagios on
Create cron.daily entry if we want to restart the service daily. Here is the script.
vi etc/cron.daily/nagios-restart.cron
#!/bin/sh
/sbin/service nagios restart >/dev/null 2>&1

Make it executable
chmod +x etc/cron.daily/nagios-restart.cron
And finally, Check if nagios is working fine.!!! ;-)
http://NAGIOS-SERVER-NAME/nagios/index.html
Continue reading Installing and Configuring Nagios

Answer to the Question of "what is the difference between Linux & Windows?"

Answer

That is a question that has many different answers, depending on what aspect of Windows or Linux you want to know about. Both are what are known as Operating Systems, and in this case, both are designed to work on the same type of hardware -- PCs, otherwise known as IBM Compatibles. There are enormous differences in the way that they behave at a technical level, but I suspect what you really want to know is how they differ from the perspective of an end user. This makes any answer I give somewhat subjective (users have different preferences and expectations of their computers), but I will do my best to give an answer that is generally accepted by the IT community.

Windows was introduced by Microsoft in 1983, and has been the dominant Operating System available for the PC since the early-nineties. As such, Microsoft has enjoyed great financial success, and Windows has had many years and incredible fiscal resources to evolve to meet the demands of the mass-market. There is an staggeringly rich set of features here, from very explicit, step-by-step user interfaces for the first time computer user, to powerful interfaces for the computer professional, and everything in between. By contrast, Linux achieved notoriety a bit later, in the mid-nineties, with a distribution known as Redhat, and although Linux was built on more mature, stable underpinnings (Unix), it did not enjoy nearly the same marketing or development budget that Microsoft threw behind Windows. In fact, the developers of Linux are commonly credited as founding the Open Source Software movement, which is the idea that software can be made better through the free sharing of its source code. In this philosophy, programmers often volunteer their time to develop software for free, as was done with Linux, and Linux is still available for free in its more basic forms. Companies like Redhat only make money by "packaging" Linux with printed documentation, extra software utilities, and setup wizards designed to make the installation of Linux and its subsequent software packages easier. Even so, the amount of money they are able to generate this way is paltry compared to the wealth of Microsoft (which makes most company's financials look paltry). Because of this, the marketing behind Linux has been miniscule compared to that of Windows, and its lack of acceptance among less technical users reflects this. A large reason is because Windows has established a very deeply-ingrained (and some have argued unfairly controlling) relationship with PC hardware manufacturers, ensuring that almost every new PC ships with Windows installed from day one. Given that they must satisfy the demands (though perhaps less than perfectly) of the majority of novice computer users, and add to that the amount of time and money that Windows has enjoyed to make itself accessible to these users, and it is easy to see why Windows is generally regarded as superior to Linux in the area of accessibility to novices. There are graphic user interfaces (abbreviated as GUI) present for almost everything you could want to do, and there is almost always more than one way to do it. In fact, one common criticism of Windows is that so many features have been layered on top of one another over the years, that it has become an overly-complicated, almost labyrinthine user experience. By contrast, some may find Linux to be more streamlined; however, there are still many equivalent features in Windows for which Linux does not provide a GUI, and the user is forced to type textual instructions into a command-line interface, or shell. While many power users consider this a plus, it is unrealistic to demand this of novice computer users, and novice users should bear this strongly in mind. All this being said, Linux still shines brilliantly in some areas that Windows seems to consistently flounder. Because the underlying architecture of Linux is more mature, stable, and secure than Windows, Linux "crashes" and "freezes" significantly less often, and can run continuously without problems for months or even years without being "rebooted". In addition, Linux does not suffer from the same security flaws as Windows, and your chances of contracting a virus, a worm, or some other form of predatory software is much lower. On an more subjective note, I suspect that given the same time and monetary advantages as Windows, Linux might have easily developed into a superior operating system in every regard.

As it stands today, they each have pros and cons. Windows is widely accepted everywhere, boasts an enormous plethora of GUIs, and has millions of software packages that run under it. But it is buggier, less secure, and sometimes feels cavernous. Linux is solid and smooth running, and feels more stream-lined to many. But what technical users call stream-lined, novices may interpret as spare, and sometimes barren or just plain missin. There are also fewer software packages available for it currently, though many of those that are available are free. As time goes by, and the Open Software Community develops more for Linux, these differences will shrink, but until there is financially powerful, unifying force (company) behind Linux, this author thinks it is doubtful they will go away all together.

Answer

Linux is open source, free under GNU, Windows is Lincesed os. Windows is developed by Microsoft. Whereas linux has many distributors such as redhat, mandrake etc. Linux is more secure, windows is less secure than linux in case of virus, worms.

== Answer ==

Linux has many distributors like Radhat, mandrake, Corel etc whereas windows has only Micrsoft. One more major difference is Linux works on both GUI & Console mode but windows only GUI. LINUX have multiuser, multitasking, multiprocessing, multiprogramming features

Answer

there are many differences, one being that all versions of linux are not the same, with the many distributions about, they all look the same but run a little differencetly, such as the way that the software is installed, one some, they use RPM packages which, with a package manager, install them selves when u ask them, others you would have to unpack the souce code, build the program and then install it... i personally use Gentoo (kinda new to it but loving it) its install system is called portage, with simple commands.. it has an online package database that stores all of the current applications and plugins that the portage people know of (mostly notified by the developers that it exists). To install something, say you wanted to have an mp3 player, you could type in the console emerge -S mp3.... this would search the database for mp3 in the package description and tell u a list of packages that the string was found in, you could tell it to pretend to install it and so on.... there is more information about this on www.gentoo.com I personally swapped to Linux because of all the problems i had with windows, even with a fresh install i was having different problems to what i had in a previous install. Another thing to point out is that the linux developers develop linux not for money but as a hobby, making the code great is what they enjoy, creating usefull items wanted by the public. There is a vast network of forums and irc channels dedicated to linux and you can find the solution to almost any problem there. I will say that it takes longer to set linux up than windows, but if you look at the time spent maintaining the two OS, you will see that that time is swiftly made up. :D

Answer

Linux is more secured when compared to windows by giving the accessing rights.where as in windows we have just password security.

Answer

FYI regarding viruses. There's an old joke that asks "why do people rob banks,..ans: that's where the money is!"....the reason why Microsoft gets dinged so much is that windows is probably running on >95% of all consumer desktop computers. Many feel that if Linux ever competes, it will garner the attention of virus hackers, and also be plagued by viruses, worms, trojans, etc. Even now, there are websites (albeit not well known) that track the development of Linux viruses...aka www.viruslibrary.com for instance.

Another reason WHY linux is not affected by viruses, is that its code has been open source for more than a decade, tested by people all around the world, and not by a single development team like in the case of Windows. I mean to say that, probability of finding (and thus fixing) exploitable holes in Linux is very high. So there is extremely enhanced security and lesser chances of exploits.

Again, theres one more good reason. Linux was originally meant to be a multi-user OS. Windows was meant for the end-user. After a few years, Microsoft realised the fact and tried to change their primary design goal. After building two floors, if you try to replace bricks, you would end up with high instability. This is what Windows is experiencing.

Answer

An easy and fun way to try linux is to go to shipit.ubuntu.com ...just that way, no www. You can order a free, two disk set of Ubuntu linux. One is a live CD that runs over windows, in RAM, and doesn't change your system at all..the other is an install disk. I've used the live CD on two XP machines and they both ran flawlessly. When you want to quit, just go to logout under system tools, and shut down. Ubuntu will turn itself off, eject the disk, and turn of your PC. Remove the disk, boot up, and you're running your Windows again. Details at www.ubuntulinux.org. Note: They even pay the shipping.

Answer

Windows and Linux are two different operating systems. The purpose of an operating system is to: 1. control all the hardware components that are part of your computer. 2. manage a computer's ability to do several things at once 3. provide a base set of services to programs to keep software manufacturers from have to reinvent the wheel a million times for the same thing.

The Linux operating system was developed from a base of Unix (another operating system) after the Unix systems stopped being free. The Linux people believe in free and open software, and so they "reinvented" Unix, and improved it slightly to make Linux.

Windows is a proprietary operating system owned by Microsoft. It was developed independently from Unix, and its internal details are much different. They should perform the same tasks, however at the deepest levels, details differ, and so a program written to run on Windows will not run on Linux, and vice versa.

Widows comes in several "flavors", like Windows NT, Windows 2000, and Windows XP, all of which are slightly different, but share enough in common that programs written for one flavor will run on the others 99.9% of the time.

Answer

Linux is a open-source OS. It's build by "amateurs". people can change code and add programs which will help to use your computer better. It's designed as a reaction on the monopoly position of windows. you can't change any thing in windows. you can't even see which processes do what and build your onw extension. Linux wants the programmers to extend and redesign it's OS time after time, so it beats Windows or at least is as good as windows, but whit open-source, so you can see what happens and you can edit the OS

Answer

Difference Between Linux and Windows

1) Linux is a open-source OS.People can change code and add programs which will help to use your computer better. It's designed as a reaction on the monopoly position of windows. you can't change any thing in windows. you can't even see which processes do what and build your onw extension. Linux wants the programmers to extend and redesign it's OS time after time, so it beats Windows or at least is as good as windows, but whit open-source, so you can see what happens and you can edit the OS

2) All the flavors of Windows come from Microsoft, the various distributions of Linux come from different companies (i.e LIndows , Lycoris, Red Hat, SuSe, Mandrake, Knopping, Slackware).

3) Linux is customizable in a way that Windows is not. For example,NASlite is a version of Linux that runs off a single floppy disk and converts an old computer into a file server. This ultra small edition of Linux is capable of networking, file sharing and being a web server.

4) For desktop or home use, Linux is very cheap or free, Windows is expensive. For server use, Linux is very cheap compared to Windows. Microsoft allows a single copy of Windows to be used on only one computer. Starting with Windows XP, they use software to enforce this rule (activation). In contrast, once you have purchased Linux, you can run it on any number of computers for no additional charge.

5) You have to log on to Linux with a userid and password. This is not true of Windows. Typically Windows 9x does not ask for a userid/password at boot time and, even if it does, this can be easily bypassed. In general, Windows NT, 2000 and XP do require a userid/password to log on. However Windows 2000 and XP can be configured with a default userid and password so they boot directly to the Windows desktop. Windows XP, 2000 and Linux all support different types of users. Windows XP Home Edition supports Administrator class users that have full and total access to the system and restricted users that, among other restrictions, can't install software. Windows XP Pro and Windows 2000 support additional levels of users and there are groups of system privileges that can be assigned to a particular user. In Linux, the user with full and total access is called root, everyone else is a normal user. The options for Linux security privileges don't seem to me to be as robust as in Windows 2000 and XP Pro, they are focused on files and directories (can you read, update and execute files). Linux has a concept of a group of users that Windows does not, but again the privileges associated with a group are all file/directory related.

6) Linux has a reputation for fewer bugs than Windows

7) Windows must boot from a primary partition. Linux can boot from either a primary partition or a logical partition inside an extended partition. Windows must boot from the first hard disk. Linux can boot from any hard disk in the computer.

8) Windows uses a hidden file for its swap file. Typically this file resides in the same partition as the OS (advanced users can opt to put the file in another partition). Linux uses a dedicated partition for its swap file (advanced users can opt to implement the swap file as a file in the same partition as the OS).

9) Windows uses FAT12, FAT16, FAT32 and/or NTFS with NTFS almost always being the best choice. Linux also has a number of its own native file systems. The default file systeAll the file systems use directories and subdirectories. Windows separates directories with a back slash, Linux uses a normal forward slash. Windows file names are not case sensitive. Linux file names are. For example "abc" and "aBC" are different files in Linux, whereas in Windows it would refer to the same file. Case sensitivity has been a problem for this very web page, the name of which is "Linux.vs.Windows.html". At times, people have tried to get to this page using "linux.vs.windows.html" (all lower case) which resulted in a Page Not Found error. Eventually, I created a new web page with the name in all lower case and this new page simply re-directs you to the real page, the one you are reading now (with a capital L and W). m for Linux used to be ext2, now it is typically ext3.

10) Windows and Linux use different concepts for their file hierarchy. Windows uses a volume-based file hierarchy, Linux uses a unified scheme. Windows uses letters of the alphabet to represent different devices and different hard disk partitions. Under Windows, you need to know what volume (C:, D:,...) a file resides on to select it, the file's physical location is part of it's name. In Linux all directories are attached to the root directory, which is identified by a forward-slash, "/". For example, below are some second-level directories: /bin/ ---- system binaries, user programs with normal user permissions /sbin --- executables that need root permission /data/ --- a user defined directory /dev/ ---- system device tree /etc/ ---- system configuration /home/ --- users' subdirectories /home/{username} akin to the Windows My Documents folder /tmp/ ---- system temporary files /usr/ ---- applications software /usr/bin - executables for programs with user permission /var/ ---- system variables /lib --- libraries needed for installed programs to run

11) Both support the concept of hidden files, which are files that, by default, are not shown to the user when listing files in a directory. Linux implements this with a filename that starts with a period. Windows tracks this as a file attribute in the file metadata (along with things like the last update date). In both OSs the user can over-ride the default behavior and force the system to list hidden files.

12) Windows started with BAT files (a combination of OS commands and optionally its own language) and then progressed to Windows Scripting Host (WSH) which supports two languages, JavaScript and VB Script. Linux, like all Unix variants, provides multiple scripting languages, referred to as shell scripts. In general, the Linux scripting languages are older and cruder than WSH but much more powerful than BAT files. They tend to use special characters instead of English commands and don't support objects (this only matters to programmers). One scripting language that can run on both Linux and Windows is PHP. It always has to be installed under Windows, it may have to be installed under Linux. PHP is typically found running on Linux based web servers in combination with Apache, but it is capable of running "client side" (on your computer).

13) Every computer printer ships with drivers for last last few versions of Windows (at the time it was manufactured). Running the printer on a very old or too new version of Windows may or may not work. Still, this a far better situation than with Linux which does not support as many printers as Windows. In an environment with many Linux users, shared network printers a tech support staff, this should not be an issue as you can limit yourself to well supported printers. Home users of Linux however, will no doubt suffer from the relatively poor support for printers.

14) Windows allows programs to store user information (files and settings) anywhere. This makes it impossibly hard to backup user data files and settings and to switch to a new computer. In contrast, Linux stores all user data in the home directory making it much easier to migrate from an old computer to a new one. If home directories are segregated in their own partition, you can even upgrade from one version of Linux to another without having to migrate user data and settings.

Answer

Linux is based on an adaptation of Unix, started by a Finn named Linus Torvalds when he was a student. Through the manifestation of the Open Source model, too involved to explain here, it is continually upgraded by volunteers, and is produced in a wide variety of "flavors" or distributions. Linux is always free. To get a handle on the Open Source movement, check out http://www.opensource.org/docs/definition.php . There's a ton of information available, just google linux once and you'll see. It's reputed to be a very stable, dependable operating system, generally uses fewer resources to do the same task, and can be had in a form to do anything from server tasks to compiling code. In addition, many versions come with 1,000 or more open source programs to do anything from word processing to photo editing, all free. www.theopencd.org is a good place to grab some free programs that are open source, but written to run on windows. You'll be surprised at how good they are. Windows, on the other hand, is based on DOS (disk operating system) that was borrowed from IBM, if memory serves. Windows 3.1 is the last heavy DOS operating system from Microsoft. For Windows 95 they pile a graphical user interface on top of DOS, the gui we hear about. It worked, sorta, and folks who didn't like command line stuff ate it up. It is a strictly commercial program, and includes a minimal amount of free software, like notepad or wordpad. Microsoft keeps making them bigger and more expensive, and we all keep buying them. I'm not looking forward to being Longhorned. Both Linux and Microsoft have their advantages. One difference is that if you obtain or download one linux disk, you can use it on as many machines as you like, and it's free. With Microsoft, you pay a good chunk of cash for their operating sytems, and you can use it on one machine and one only. With the advent of XP, they force you to "reactivate" XP every time you install it. You can only do so a certain number of times. Each has it's positive and negative attributes. It will be interesting in the coming years to see if Linux continues to grow as it has. Check out this articla about XP if you think I'm kidding. http://www.arachnoid.com/boycott/index.html Personally, I'm really curious about Linux. Free is good. Good luck.

Answer

Linux is an open source operating system that, until fairly recently, was only used on servers. Now it is used on Mac OS X computers, and more people are starting to use it on computers that aren't servers. It is very secure, efficient, and flexible.

Microsoft Windows is a closed-source operating system created by Bill Gates, supreme ruler of the earth. It is gradually losing it's grip on the market because it is insecure, slow, and wasteful.

Continue reading Answer to the Question of "what is the difference between Linux & Windows?"

Why we use LINUX ????

Linux is better than Windows because ...

0. Linux developers don't disguise their listings on Google by pretending they're about Windows. Actual Google listing:

Linux Download
www.Microsoft.com
Customize your Operating System. Learn more about Windows Embedded.

1. Linux screen blankers don't turn your PC into a Microsoft ad.

2. It isn't fair to say the Windows GUI is a poor copy of X-windows. Actually it's a poor copy of the Mac.

3. Windows, being a commercial product, is so ridiculously insecure an undergraduate student in the Phillipines could accidentally bring down millions of systems. Microsoft's answer to this was that if anyone is stupid enough to click on an icon generated by Microsoft's own software, they deserve what they get. Unix and Linux have not had a self-propagating virus or worm in over 10 years. Of course Windophiles will say that's only because no one ever tries to write a Unix virus, but we know of a few people in Redmond who would do it if they could. Unix was used for years at universities where many of the authorized users were students intentionally trying to crash the system. Now that's reliability

4. You are charged between $100 and $200 for Windows every time you buy a PC (Microsoft dosen't want you to know exactly how much) even if you're replacing a PC that already has Windows. If you want to run a server you have to pay extra for Windows NT. Then you have to pay extra for a server. With Linux, everything is included for one price. And that price is nothing. Nada. Zip. Zero.

5. Windows protects you from the fearsome experience of being able to see exactly how the operating system works. Just "Wait while setup prepares the Install Shield Wizard".

6. With Linux the source code is included. With Windows having the source code would be illegal, (unless you pay a lot more than you already pay, and even then Microsoft developers get more than you do).

7. Windows requires you agree to a license that no one has ever had the endurance to read all the way through. For all you know, it might include a demand for your first born child. With Linux, the license says: "You can do anything you want with this software. Enjoy."

8. Linux is fully compatible with the Posix standard. Windows is partially compatible with earlier versions of Windows.

9. Unix mail allows you to communicate with anyone. Microsoft mail allows you to communicate with anyone who also has Microsoft Mail. (Yes, we know you can manually enter an SMTP address in a message, but the addressing database is designed to make it virtually impossible to ensure that other users will automatically send to the SMTP address. You can forward your mail, but then reply dowsn't work.)

10. Linus Torvalds is a system programming specialist (and a nice guy) who spent 7 years as a graduate student in Helsinki so he could develop Linux for you. Bill Gates is a marketing specialist (and an egotist) who built a 40 room house with your money.

11. Linux allows you to reboot when you want to. Windows forces you to reboot when you install new software, try to actually use your software, or sometimes just because the sky is blue. - contributed by Derric Tubbs

12. Linux runs on way more hardware than Windoze: SPARC, MIPS, ARM, PowerPC, Alph a, etc. Windoze runs on x86, The NT flavour runs on one real processor in addition (Alpha). That's a small pool of hardware to base a future on, especially as even Intel has calculated that x86 is approaching end-of-life. -- contributed by Willem de Lind van Wijngaarden

13 The Navy's "Smart Ship" based on Windows NT failed so totally it had to be TOWED BACK TO PORT TWICE just because the computers wouldn't work. (This has not happened with another Navy project, a Unix-based submarine control system.) But the DOD still insists on using Microsoft as a "sole source" even though "sole source" procurement is supposed to be avoided and many of its own people would like to use software that's cheaper and better.

14. Microsoft won't let anyone look at its algorithms, so it took painstaking study to determine that the statistical procedures in Excel are inaccurate, invalidating the results of anyone unwise enough to use it. Of course you won't see this in a Microsoft ad. (McCullough, BD, Computational Statistics and Data Analysis v31 (1999) 27-37.)

15. Linus Torvalds didn't have to pay off George Bush's staff to ensure Bush will drop the Justice Department suit against Microsoft if he's elected. ("Ralph Reed, a senior consultant to Gov. George W. Bush's presidential campaign, [and former head of the Christian Coalition] apologized today for lobbying the governor on behalf of the Microsoft Corporation and promised not to lobby him again." -- New York Times, 4-11-00)

16. NT means "not today".

Continue reading Why we use LINUX ????

How to break grub password

To break the GRUB start-up password, follow the steps given below:

1. Boot the system with the first Linux CD. At the boot prompt, type linux rescue to switch to rescue mode. In rescue mode you will be asked if similar steps should be followed, which need to be followed in the installation. Once you get the # prompt, type the following command:

# chmod /mnt/sysImage

2. Edit the grub.conf file and remove the passwd line from the file. Save the file and exit.

3. Once your machine reboots, you will be able to start your Linux OS in the usual manner.
Continue reading How to break grub password

How to compile a kernel

kernel version 2.4.30.tar.gz

Go to old kernel directory .Find the .config file and copy it to the new decompressed Kernel directory .If .config file is not exist then create .

[root@ns1 linux-2.4.18]#make dep

[root@ns1 linux-2.4.18]#change few option .then save

[root@ns1 linux-2.4.18]#ls –alh | grep .config

[root@ns1 /usr/src]#tar –zxvf linux-2.4.30.tar.gz

[root@ns1 src]#cd /usr/src/linux-2.4.30

[root@ns1 linux-2.4.30]#cp /usr/src/linux-2.4.18/.config /usr/src/linux-2.4.30

[root@ns1 linux-2.4.30]#make dep

[root@ns1 linux-2.4.30]#make modules

[root@ns1 linux-2.4.30]#make modules_install

[root@ns1 linux-2.4.30]#make bzImage

[root@ns1 linux-2.4.30]#cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.30

[root@ns1 linux-2.4.30]#cp System.map /boot/System.map-2.4.30

[root@ns1 linux-2.4.30]# mkinitrd /boot/initrd-2.4.30.img 2.4.30

[root@ns1 linux-2.4.30]#vi /etc/grub.conf

#root (hd0,0)

#kernel /vmlinuz-version ro root=/dev/hda5

#initrd /initrd-version.img

#boot=/dev/hda

default=0

timeout=10

splashimage=(hd0,0)/grub/splash.xpm.gz

title Red Hat Linux (2.4.30)

root (hd0,0)

kernel /vmlinuz-2.4.30 ro root=LABEL=/ vga=0x0309

initrd /initrd-2.4.30.img

title Red Hat Linux (2.4.18)

root (hd0,0)

kernel /vmlinuz-2.4.18 ro root=LABEL=/ vga=0x0309

initrd /initrd-2.4.18.img

== Kernel==2.6==

make menuconfig
make
make modules_install
make install
Continue reading How to compile a kernel

Install Squid Proxy Server

command

Check for the user Squid:

1) #finger squid

If not then use the command

2) #useradd –d /usr/local/squid squid

Download the tar package from http://freshmeat.net/redir/squid/9942/url_tgz/squid-2.6.STABLE4.tar.gz

3) wget http://freshmeat.net/redir/squid/9942/url_tgz/squid-2.6.STABLE4.tar.gz

Extract & Install the tar package

4) #tar –zxvf squid-X.X.X.tar.gz

5) #/configure

6) #make

7) #make install

Now installation is complete. Configure your Squid server:

8) # vi /usr/local/squid/etc/squid.conf

http_port 8080

cache_mem 40 MB

cache_swap_low 80

cache_swap_high 85

maximum_object_size 8096 KB

minimum_object_size 0 KB

cache_dir ufs /usr/local/squid/cache 1024 16 128

or

cache_dir diskd /cache/cache1 9500 35 256

cache_dir diskd /cache/cache2 9500 35 256

cache_access_log /usr/local/squid/var/logs/access.log

cache_log /usr/local/squid/var/logs/cache.log

Configure your Access list to which you want to give permission to use your

server:

acl all src 0.0.0.0/0.0.0.0

acl locallan src 192.168.9.0/255.255.255.0 ##Your client Address & Subnet Mask

http_access allow locallan

http_access deny all

Give the Permission to the user:

cache_effective_user squid

Configure your Host name:

visible_hostname

For creating cache directory

#/usr/local/squid/sbin/squid –z

#chown –R squid.squid /usr/local/squid/

#chmod 777 /usr/local/squid/

To run squid

#/usr/local/squid/sbin/squid

Now configure a client with the IP which you use in your ACL part with port 8080. Because we use the port 8080. And test your proxy server with the following command:

#tail -f /usr/local/squid/var/logs/access.log

Now you browse a site from your configured client PC. If your server is working well you browse successfully and see your access log in your server. You also check your squid process by the following command:

#pgrep squid

Hope your server is working well. If you face any problem please mail to me.





Continue reading Install Squid Proxy Server