Saturday, November 26, 2011
Friday, November 25, 2011
CD Burning
- cdrecord -scanbus to find out the SCSI ID X,Y,Z of your burner (usually 0,0,0)
- cdrecord -v dev=0,0,0 blank=fast to fast blank a CD-RW
- cdrecord -v dev=0,0,0 blank=all to thoroughly blank a CD-RW
- mkisofs -v -J -r -o mysrcdir.iso mysrcdir to create an ISO image of all files in directory mysrcdir
- mount -t iso9660 -o ro,loop mysrcdir.iso /mnt/cdrom to check that the ISO image is OK before burning
- mkisofs -v dev=0,0,0 speed=10 -data mysrcdir.iso to burn ISO image at 10x speed
- cdrecord -dummy ... will do a dummy write for testing
- cdrecord driveropts=burnproof will turn on 'burnproof' settings
- mkisofs -v -J -r . | cdrecord -v driveropts=burnproof speed=10 dev=0,0,0 - will avoid creating an intermediate ISO image
- mount /mnt/cdrom to mount the CD
- cdrecord -v speed=10 dev=0,0,0 -pad -audio *.wav will burn an audio CD of .wav files
Adding New TrueType fonts
- Make a new directory, say /usr/X11R6/lib/X11/fonts/MyTTFdir
- Copy your .ttf font files into there
- cd /usr/X11R6/lib/X11/fonts/MyTTFdir
- ttmkfdir to make the fonts.scale file
- mkfontdir to make the fonts.dir file (needed for TTF fonts?)
- chkfontpath --add=/usr/X11R6/lib/X11/fonts/MyTTFdir (or manually by editing /etc/X11/fs/config)
- service xfs restart (or /etc/init.d/xfs restart)
- chkfontpath --list to see if MyTTFdir was added
- xfontsel to browse/view available fonts
How to download youtube viedos in linux (Ubuntu) (apt-get install youtube-dl)
youtube-dl
Download youtube viedos from linux ubuntu machine
Install apt-get install youtube-dl
Step 1:- open terminal Window.
Step 2:- Type apt-get install youtube-dl and enter.
Step 3:- After Enter the above command it downloads some package and will it Install automatically.
Step 4:- After finishing installation.
Step 5:- Type syntax youtube-dl
Step 6:- Its start to download youtube movie.
Download youtube viedos from linux ubuntu machine
Install apt-get install youtube-dl
Step 1:- open terminal Window.
Step 2:- Type apt-get install youtube-dl and enter.
Step 3:- After Enter the above command it downloads some package and will it Install automatically.
Step 4:- After finishing installation.
Step 5:- Type syntax youtube-dl
Step 6:- Its start to download youtube movie.
Booting Process in Linux
who are responsible for the booting process.
1.BIOS(Basic Input/Output System)
2.MBR(Master Boot Record)
3.LILO or GRUB
LILO:-LInux LOader
GRUB:-GRand Unified Bootloader
4.Kernel
5.init
6.Run Levels
1.BIOS:
i.When we power on BIOS performs a Power-On Self-Test (POST) for all of the different hardware components in the system to make sure everything is working properly
ii.Also it checks for whether the computer is being started from an off position (cold boot) or from a restart (warm boot) is
stored at this location.
iii.Retrieves information from CMOS (Complementary Metal-Oxide Semiconductor) a battery operated memory chip on the motherboard that stores time, date, and critical system information.
iv.Once BIOS sees everything is fine it will begin searching for an operating system Boot Sector on a valid master boot sector
on all available drives like hard disks,CD-ROM drive etc.
v.Once BIOS finds a valid MBR it will give the instructions to boot and executes the first 512-byte boot sector that is the first
sector (“Sector 0″) of a partitioned data storage device such as hard disk or CD-ROM etc .
2.MBR
1.BIOS(Basic Input/Output System)
2.MBR(Master Boot Record)
3.LILO or GRUB
LILO:-LInux LOader
GRUB:-GRand Unified Bootloader
4.Kernel
5.init
6.Run Levels
1.BIOS:
i.When we power on BIOS performs a Power-On Self-Test (POST) for all of the different hardware components in the system to make sure everything is working properly
ii.Also it checks for whether the computer is being started from an off position (cold boot) or from a restart (warm boot) is
stored at this location.
iii.Retrieves information from CMOS (Complementary Metal-Oxide Semiconductor) a battery operated memory chip on the motherboard that stores time, date, and critical system information.
iv.Once BIOS sees everything is fine it will begin searching for an operating system Boot Sector on a valid master boot sector
on all available drives like hard disks,CD-ROM drive etc.
v.Once BIOS finds a valid MBR it will give the instructions to boot and executes the first 512-byte boot sector that is the first
sector (“Sector 0″) of a partitioned data storage device such as hard disk or CD-ROM etc .
2.MBR
i. Normally we use multi-level boot loader.Here MBR means I am referencing to DOS MBR.
ii.Afer BIOS executes a valid DOS MBR,the DOS MBR will search for a valid primary partition marked as bootable on the hard disk.
iii.If MBR finds a valid bootable primary partition then it executes the first 512-bytes of that partition which is second level MBR.
iv. In linux we have two types of the above mentioned second level MBR known as LILO and GRUB
3.LILO
i.LILO is a linux boot loader which is too big to fit into single sector of 512-bytes.
ii.So it is divided into two parts :an installer and a runtime module.
iii.The installer module places the runtime module on MBR.The runtime module has the info about all operating systems installed.
iv.When the runtime module is executed it selects the operating system to load and transfers the control to kernel.
v.LILO does not understand filesystems and boot images to be loaded and treats them as raw disk offsets
GRUB
i.GRUB MBR consists of 446 bytes of primary bootloader code and 64 bytes of the partition table.
ii.GRUB locates all the operating systems installed and gives a GUI to select the operating system need to be loaded.
iii.Once user selects the operating system GRUB will pass control to the karnel of that operating system.
see below what is the difference between LILO and GRUB
4.Kernel
i.Once GRUB or LILO transfers the control to Kernel,the Kernels does the following tasks
- Intitialises devices and loads initrd module
- mounts root filesystem
i.The kernel, once it is loaded, finds init in sbin(/sbin/init) and executes it.
ii.Hence the first process which is started in linux is init process.
iii.This init process reads /etc/inittab file and sets the path, starts swapping, checks the file systems, and so on.
iv.It runs all the boot scripts(/etc/rc.d/*,/etc/rc.boot/*)
v.starts the system on specified run level in the file /etc/inittab
6.Runlevel
i.There are 7 run levels in which the linux OS runs and different run levels serves for different purpose.The descriptions are
given below.
- 0 – halt
- 1 – Single user mode
- 2 – Multiuser, without NFS (The same as 3, if you don’t have networking)
- 3 – Full multiuser mode
- 4 – unused
- 5 – X11
- 6 – Reboot
Now as per our setting in /etc/inittab the Operating System the operating system boots up and finishes the bootup process.
Below are given some few important differences about LILO and GRUB
LILO
|
GRUB
|
| LILO has no interactive command interface | GRUB has interactive command interface |
| LILO does not support booting from a network | GRUB does support booting from a network |
| If you change your LILO config file, you have to rewrite the LILO stage one boot loader to the MBR | GRUB automatically detects any change in config file and auto loads the OS |
| LILO supports only linux operating system | GRUB supports large number of OS |
Redhat History
1968
ARPANET founded. The precursor to the Internet, it allows researchers to share code and information.
1969
Ken Thompson, researcher at Bell Labs, writes the first version of Unix.
1979
AT&T announces plans to commercialize Unix.
1983
Richard Stallman establishes the Free Software Foundation at MIT. The GNU project to construct an operating system based on Unix but for which the source code is freely available, begins. Stallman also establishes the idea of "copyleft" and the General Public License (GPL).
1987
Andrew Tanenbaum releases Minix, a version of Unix for the PC, Mac, Amiga, and Atari ST. Source code included.
1989
Michael Tiemann (Red Hat Vice President, Open Source Affairs) co-founds Cygnus Solutions, the first business to provide custom engineering and support services for free software.
1991
Linus Torvalds releases the Linux kernel.
Bob Young introduced to free software and UNIX by the system administrators of the New York City UNIX Users Group (Unigroup).
1993
Young incorporates ACC Corporation, a catalog business that sells Linux and Unix software accessories and books and distributes a magazine called New York UNIX
1994
Marc Ewing creates his own distribution of Linux which he names Red Hat Linux. Released in October, it becomes known as the Halloween release.
1995
Young buys Ewing's business, merges it with ACC Corporation, and names the new company Red Hat Software.
Red Hat Linux 2.0 is released, officially unveils the new package management system called RPM.
1996
Red Hat opens sales and administration functions to North Carolina, opens corporate headquarters in Durham.
Sunday, November 6, 2011
Linux Some Basic Commands
Process
ps -auwx - Report a snapshot of the current processes
pstree - Display a tree of processes
pmap - Display/examine memory map and libraries
pidof processname - Find the process ID of a running program
pgrep processname - Look up or signal processes based on name and other attributes
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
Performance
iostat - Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions
vmstat - Report virtual memory statistics
mpstat - Report processors related statistics
netstat - Print network connections, routing tables, interface statistics, masquerade connections and multicast memberships
free - Display amount of free and used memory in the system
top - provides a dynamic real-time view of a running system
slabtop - display kernel slab cache information in real time
sar - Collect, report, or save system activity information
General Info
uname - print system information
uptime - Tell how long the system has been running
cat /proc/meminfo - Show memory size and usage
runlevel - find the current and previous system runlevel
chkconfig - updates and queries runlevel information for system services
ntsysv - simple interface for configuring runlevels
init, telinit - process control initialization
w - Displays currently logged in users and processes they are running
who - show who is logged on
whoami - Displays user id
chsh - change your login shell
login - sign on
/etc/shells is a text file which contains the full pathnames of valid login shells
set - Display all environment variables in your current environment
id - Display user and all group ids
last, lastb - Listing of most recent logins by users.command
history - Shell command to display previously entered commands
sysreport - collect some detailed information about the hardware which will be used to diagnose problems with the system
hostname - show or set the systemâs host name
domainname - show or set the systemâs NIS/YP domain name
dnsdomainname - show the systemâs DNS domain name
nisdomainname - show or set systemâs NIS/YP domain name
ypdomainname - show or set the systemâs NIS/YP domain name
Kernel
ipcs - List share queues, Shared memory, List Semaphores.
cat /proc/modules List all currently loaded kernel modules.
lsmod - List loaded modules
insmod - Inserts a module into the active kernel
rmmod - Remove a loaded module. Just specify the module name. No ".o" or path necessary.
modprobe - High level handling of loadable modules. Loads module and dependencies.
depmod - Creates dependencies file for a module (used by modprobe)
modinfo - Display information about a kernel module
sysctl - configure kernel parameters at runtime
Network
ifconfig - configure a network interface
setting in /etc/sysconfig/network. Command will change entry in /etc/hosts
mii-tool - view, manipulate media-independent interface status
ethtool - Display or change ethernet card settings
route - show / manipulate the IP routing table
Filesystem
proc - process information pseudo-filesystem
fstab - static information about the filesystems
fsck - check and repair a Linux file system
df - report filesystem disk space usage
du - estimate file space usage
mount - mount a file system
umount - unmount file systems
fdisk - Partition table manipulator for Linux
lsof filesystem - list open files
fuser - identify processes using files or sockets
e2label - Change the label on an ext2/ext3 filesystem
mkfs -t ext2 /dev/ram - build a Linux file system
mke2fs - create an ext2/ext3 filesystem
e2fsck - check a Linux ext2/ext3 file system
tune2fs - adjust tunable filesystem parameters on ext2/ext3 filesystems
dumpe2fs - dump ext2/ext3 filesystem information
partprobe - inform the OS of partition table changes
mkswap - set up a Linux swap area
swapon, swapoff - enable/disable devices and files for paging and swapping
NFS
exportfs - maintain list of NFS exported file systems
showmount - show mount information for an NFS server
nfsstat - print NFS statistics
Files
ls - List directory contents. List file information
fuser - Identify processes using files or sockets
file - Identify file type.
File permission
chmod - Change a file's mode or permissions
umask - Set default file permissions
chgrp - Change a file's group
chown - Change a file's owner
chroot - run command or interactive shell with special root directory
ACL
setfacl - set file access control lists
chacl - change the access control list of a file or directory
getfacl - get file access control lists
User
useradd - Create a new user or update default new user information
usermod - Modify a user account
userdel - Delete a user account and related files
passwd - update a userâs authentication tokens(s)
finger - user information lookup program
chfn - change your finger information
chage - change user password expiry information
users - Show all users logged in.
Group
groupadd - Create a new group
groupmod - Modify a group
groupdel - Delete a group
newgrp - log in to a new group
gpasswd - administer the /etc/group file
grpck - verify integrity of group files
groups - Display groups you are part of
Hardware Info
/usr/bin/lsdev - List devices and info on system hardware. Also IRQ's.(RPM package procinfo)
/sbin/lspci - List all PCI devices (result of probe) Also lspci -vvx and cat /proc/pci
cat /proc/interrupts - List IRQ's used by system and the device using the interrupt.
cat /proc/ioports - List I/O ports used by system.
cat /proc/dma - List DMA channels and device used by system.
cat /proc/cpuinfo - List info about CPU.
hdparm -I /dev/hda - get Harddisk info
Debugging
kill - terminate a process
killall - kill processes by name
pkill - will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout
nice - run a program with modified scheduling priority
renice - alter priority of running processes
ulimit
Log files
closelog, openlog, setlogmask, syslog - control system log
/var/log/messages - system messages
/secure - Logging by PAM of network access attempts
/dmesg - Log of system boot. Also see command dmesg
/boot.log - Log of system init process
/xferlog.1 - File transfer log
/lastlog - Requires the use of the lastlog command to examine contents
/maillog - log from sendmail daemon
Redhat Certification Overview
RHCSA
Understand and Use Essential Tools
- Access a shell prompt and issue commands with correct syntax
- Use input-output redirection (>, >>, |, 2>, etc.)
- Use grep and regular expressions to analyze text
- Access remote systems using ssh and VNC
- Log in and switch users in multi-user runlevels
- Archive, compress, unpack and uncompress files using tar, star, gzip, and bzip2
- Create and edit text files
- Create, delete, copy and move files and directories
- Create hard and soft links
- List, set and change standard ugo/rwx permissions
- Locate, read and use system documentation including man, info, and files in /usr/share/doc .
[Note: Red Hat may use applications during the exam that are not included in Red Hat Enterprise Linux for the purpose of evaluating candidate's abilities to meet this objective.]
Operate Running Systems
- Boot, reboot, and shut down a system normally
- Boot systems into different runlevels manually
- Use single-user mode to gain access to a system
- Identify CPU/memory intensive processes, adjust process priority with renice, and kill processes
- Locate and interpret system log files
- Access a virtual machine's console
- Start and stop virtual machines
- Start, stop and check the status of network services
Configure Local Storage
- List, create, delete and set partition type for primary, extended, and logical partitions
- Create and remove physical volumes, assign physical volumes to volume groups, create and delete logical volumes
- Create and configure LUKS-encrypted partitions and logical volumes to prompt for password and mount a decrypted file system at boot
- Configure systems to mount file systems at boot by Universally Unique ID (UUID) or label
- Add new partitions, logical volumes and swap to a system non-destructively
Create and Configure File Systems
- Create, mount, unmount and use ext2, ext3 and ext4 file systems
- Mount, unmount and use LUKS-encrypted file systems
- Mount and unmount CIFS and NFS network file systems
- Configure systems to mount ext4, LUKS-encrypted and network file systems automatically
- Extend existing unencrypted ext4-formatted logical volumes
- Create and configure set-GID directories for collaboration
- Create and manage Access Control Lists (ACLs)
- Diagnose and correct file permission problems
Deploy, Configure and Maintain Systems
- Configure networking and hostname resolution statically or dynamically
- Schedule tasks using cron
- Configure systems to boot into a specific runlevel automatically
- Install Red Hat Enterprise Linux automatically using Kickstart
- Configure a physical machine to host virtual guests
- Install Red Hat Enterprise Linux systems as virtual guests
- Configure systems to launch virtual machines at boot
- Configure network services to start automatically at boot
- Configure a system to run a default configuration HTTP server
- Configure a system to run a default configuration FTP server
- Install and update software packages from Red Hat Network, a remote repository, or from the local filesystem
- Update the kernel package appropriately to ensure a bootable system
- Modify the system bootloader
- Configure a system to run a default configuration NTP server and synchronize time using other NTP peers
Manage Users and Groups
- Create, delete, and modify local user accounts
- Change passwords and adjust password aging for local user accounts
- Create, delete and modify local groups and group memberships
- Configure a system to use an existing LDAP directory service for user and group information
Manage Security
- Configure firewall settings using system-config-firewall or iptables
- Set enforcing and permissive modes for SELinux
- List and identify SELinux file and process context
- Restore default file contexts
- Use boolean settings to modify system SELinux settings
- Diagnose and address routine SELinux policy violations
System Configuration and Management
- Route IP traffic and create static routes
- Use iptables to implement packet filtering and configure network address translation (NAT)
- Use /proc/sys and sysctl to modify and set kernel run-time parameters
- Configure system to authenticate using Kerberos
- Configure a system as an iSCSI initiator that persistently mounts an iSCSI target
- Produce and deliver reports on system utilization (processor, memory, disk, and network)
- Use shell scripting to automate system maintenance tasks
- Configure a system to log to a remote system
- Configure a system to accept logging from a remote system
Network Services
Network services are an important subset of the exam objectives. RHCE candidates should be capable of meeting the following objectives for each of the network services listed below:- Install the packages needed to provide the service
- Configure SELinux to support the service
- Configure the service to start when the system is booted
- Configure the service for basic operation
- Configure host-based and user-based security for the service
HTTP/HTTPS
- Configure a virtual host
- Configure private directories
- Deploy a basic CGI application
- Configure group-managed content
DNS
- Configure a caching-only name server
- Configure a caching-only name server to forward DNS queries
- Note: Candidates are not expected to configure master or slave name servers
FTP
- Configure anonymous-only download
NFS
- Provide network shares to specific clients
- Provide network shares suitable for group collaboration
SMB
- Provide network shares to specific clients
- Provide network shares suitable for group collaboration
SMTP
- Configure a mail transfer agent (MTA) to accept inbound email from other systems
- Configure an MTA to forward (relay) email through a smart host
SSH
- Configure key-based authentication
- Configure additional options described in documentation
Tuesday, October 11, 2011
Heap space setting for Tomcat on Linux
there are two jvm options for heap size:
-Xms and -Xmx
-Xms - is the minimum or initial size of your heap
-Xmx - is the maximim size
you set these parameters on java command line:
e.g.:
# java -Xmx128m -Xms128m com.mypackage.MyClass
the command above runs your class with java heap set to 128MB
Tomcat has its own startup script(s), which expect java command options to be in JAVA_OPTS environment variable. This is mainly because you dont have direct access to java command line when you run tomcat. So to run Tomcat with 256MB of heap you do something like:
# export JAVA_OPTS="-Xmx256m -Xms256m"
# ./startup.sh
In server environment you should keep -Xms and -Xms the same, unless you have specific reasons why not to allocate all memory from the beginning.
The realistic maximum heap size on 32bit linux is 1900m. You can push it up to 2000m but there is high risk of jvm crash.
On 64mit linux the maximum heap size is almost in all cases more then RAM you ever have.
-Xms and -Xmx
-Xms - is the minimum or initial size of your heap
-Xmx - is the maximim size
you set these parameters on java command line:
e.g.:
# java -Xmx128m -Xms128m com.mypackage.MyClass
the command above runs your class with java heap set to 128MB
Tomcat has its own startup script(s), which expect java command options to be in JAVA_OPTS environment variable. This is mainly because you dont have direct access to java command line when you run tomcat. So to run Tomcat with 256MB of heap you do something like:
# export JAVA_OPTS="-Xmx256m -Xms256m"
# ./startup.sh
In server environment you should keep -Xms and -Xms the same, unless you have specific reasons why not to allocate all memory from the beginning.
The realistic maximum heap size on 32bit linux is 1900m. You can push it up to 2000m but there is high risk of jvm crash.
On 64mit linux the maximum heap size is almost in all cases more then RAM you ever have.
Tuesday, May 17, 2011
Question from Apache
1. In which folder are Java Applications stored in Apache?
Java applications are not stored in Apache, it can be only
connected to a other Java webapp hosting webserver using the
mod_jk connector
Java applications are not stored in Apache, it can be only
connected to a other Java webapp hosting webserver using the
mod_jk connector
2.Is running apache as a root is a security risk?
No.root process opens port 80, but never listens to it, so
no user will actually enter the site with root rights. If
you kill the root process, you will see the other kids
disappear as well.
No.root process opens port 80, but never listens to it, so
no user will actually enter the site with root rights. If
you kill the root process, you will see the other kids
disappear as well.
3.If you specify both deny from all and allow from all, what will be the default action of Apache?
deny will be taken first.
deny will be taken first.
4.What does htpasswd do?
The htpasswd protects a file with a password
The htpasswd protects a file with a password
5.What is mod_vhost_alias?
This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. This allows for easy use of a huge number of virtual hosts with similar configurations.
This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. This allows for easy use of a huge number of virtual hosts with similar configurations.
6.What is ServerType directive?
It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.
It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.
7.How do you set up a virtual host in Apache?
ServerAdmin admin@test.com
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.test.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
ServerAdmin admin@test.com
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.test.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
8.How do you check for the httpd.conf consistency and any errors in it?
apachectl configtest
apachectl configtest
9.What does apachectl graceful do?
Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks
the configuration files as in configtest before initiating the restart to make sure Apache doesn?t die.
This is equivalent to apachectl -k graceful.
Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks
the configuration files as in configtest before initiating the restart to make sure Apache doesn?t die.
This is equivalent to apachectl -k graceful.
Actually it sends a SIGUSR1 for a restart. The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they’re not serving anything). The parent re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately.
10.What is the command to stop Apache?
service httpd stop & apachectl stop
service httpd stop & apachectl stop
11.On a fresh install, why does Apache have three config files – srm.conf, access.conf and httpd.conf?
The first two are remnants from the NCSA times, and
generally you should be ok if you delete the first two, and
stick with httpd.conf.
The first two are remnants from the NCSA times, and
generally you should be ok if you delete the first two, and
stick with httpd.conf.
12.Hi, When i’m starting startup.bat file of Tomcat server it isn’t started. DOS window appears for a Second only. What should I do?
Your set up might have been not done well. Make sure you have added tomcat root directory path in the CATALINA_HOME environment variable and added the bin path in the path variable
Your set up might have been not done well. Make sure you have added tomcat root directory path in the CATALINA_HOME environment variable and added the bin path in the path variable
13.What is the difference between Tomcat 4.1 and Tomcat 5.0?
Web server (for development) that supports servlets 2.3 and JSP 1.2 (Tomcat 4) or servlets 2.4 and JSP 2.0 (Tomcat 5).
Web server (for development) that supports servlets 2.3 and JSP 1.2 (Tomcat 4) or servlets 2.4 and JSP 2.0 (Tomcat 5).
14.please let me know the configuration or architecture how
tomcat used. give me a layman example The Architecture of Tomcat
tomcat used. give me a layman example The Architecture of Tomcat
Tomcat 4 is a complete rewrite of its ancestors. At the core of this rewrite is the Catalina servlet engine, which acts as the top-level container for all Tomcat instances.
With this rewrite of Tomcat comes an entirely new architecture composed of a grouping of application containers, each with a specific role. The sum of all of these containers makes up an instance of a Catalina engine.
The following code snippet provides an XML representation of the relationships between the different Tomcat containers:
This instance can be broken down into a set of containers including a server, a service, a connector, an engine, a host, and a context. By default, each of these containers is configured using the server.xml file, which we describe
later in more detail.
later in more detail.
The Server
The first container element referenced in this snippet is the element. It represents the entire Catalina servlet engine and is used as a top-level element for a single Tomcat instance. The element may contain one or more containers.
The Service
The next container element is the element, which holds a collection of one or more elements that share a single element. N-number of elements may be nested inside a single element.
The Connector
The next type of element is the element, which defines the class that does the actual handling requests and responses to and from a calling client application.
The Engine
The third container element is the element. Each defined can have only one element, and this single component handles all requests received by all of the defined components defined by a parent service.
The Host
The element defines the virtual hosts that are contained in each instance of a Catalina . Each can be a parent to one or more Web applications, with each being represented by a component.
The Context
The element is the most commonly used container in a Tomcat instance. Each element represents an individual Web application that is running within a defined . There is no limit to the number of contexts that can be defined within a .
15.what is tomcat?can we deploy a servelet in tomcat?
Tomcat is a webserver, Which is support 3 -tier archeticture..
Tomcat is a webserver, Which is support 3 -tier archeticture..
Yes we can
in web.xml
16.if i delete my java class files after the compile?but it does not goes to the recycle bin.Now i want to get the java class file
Yes you can
Yes you can
17.what is different between web server and application server?
Web server supports only http protocol
Where as application server supports any type of protocols such as tcp/ip,http etc..
Web server supports only http protocol
Where as application server supports any type of protocols such as tcp/ip,http etc..
18.what is webserver? why it is used ?
Transaction with HTTP request and HTTP response is called webserver.
Using the internet listening the HTTP request and providing the HTTP response is also called webserver.It gives only html output.It will not process business logic .They can provide Http server.They are static.
Transaction with HTTP request and HTTP response is called webserver.
Using the internet listening the HTTP request and providing the HTTP response is also called webserver.It gives only html output.It will not process business logic .They can provide Http server.They are static.
19. Can we use Active Server Pages (ASP) with Apache?
Apache Web Server package does not include ASP support.
Apache Web Server package does not include ASP support.
However, a number of projects provide ASP or ASP-like
functionality for Apache. Some of these are:
functionality for Apache. Some of these are:
Apache::ASP
mod_mono
Chilisoft ASP
20.Why doesn’t Apache include SSL?
SSL (Secure Socket Layer) data transport requires encryption, and many governments have restrictions upon the import, export, and use of encryption technology.
SSL (Secure Socket Layer) data transport requires encryption, and many governments have restrictions upon the import, export, and use of encryption technology.
If Apache included SSL in the base package, its distribution would involve all sorts of legal and bureaucratic issues, and it would no longer be freely
available.
available.
Also, some of the technology required to talk to current clients using SSL is patented by RSA Data Security, who restricts its use without a license.
21.Does Apache come with Java support?
The base Apache Web server package does not include support for Java
The base Apache Web server package does not include support for Java
22.This is very strange.
I am running apache 2.2 (compiled with gcc and all default params) on
AIX 5.2.0.6 – 64 bit kernel.
AIX 5.2.0.6 – 64 bit kernel.
I edit the httpd.conf file to listen on two different
ports –
ports –
Listen 8000
Listen 8001
Listen 8001
The server will not start no errors or anything it just accepts the
command but nothing starts.
command but nothing starts.
I can comment out on of the entires and everything starts up just fine
minus the commented out port.
minus the commented out port.
Listen 8000
#Listen 8001
#Listen 8001
So, my problem is that I cannot get apache to listen on two ports, any
ideas? Has someone else seen this before?
ideas? Has someone else seen this before?
Thanks,
try setting environment flag:
ac_cv_o_nonblock_inherited=no
just before running configure…
ac_cv_o_nonblock_inherited=no
just before running configure…
and also
apache is a server.we can run each server in unique listen port so we are unable to run same server in two different ports.but u can run on different unique ports. in apache webserver u change that in httpd.conf listen
port to 8080 (default is 80).that listen port belongs to http port for reciving requests and send responces.so please try to understand that which port belongs to which one.
port to 8080 (default is 80).that listen port belongs to http port for reciving requests and send responces.so please try to understand that which port belongs to which one.
23.Does Apache include any sort of database integration?
Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project
for examples of modules that allow you to work with databases from within the Apache environment.
Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project
for examples of modules that allow you to work with databases from within the Apache environment.
24.What is Apache?
Apache is a freely available Web server that is distributed under an “open source” license. Version 2.0 runs on most Unix-based operating systems (such as Linux, Solaris,Digital UNIX, and AIX), on other UNIX/POSIX-derived systems(such as Rhapsody, BeOS, and BS2000/OSD), on AmigaOS, and on Windows 2000. According to the Netcraft (www.netcraft.com)
Web server survey in February, 2001, 60% of all Web sites on the Internet are using Apache (62% including Apache derivatives), making Apache more widely used than all other Web servers combined.
Apache is a freely available Web server that is distributed under an “open source” license. Version 2.0 runs on most Unix-based operating systems (such as Linux, Solaris,Digital UNIX, and AIX), on other UNIX/POSIX-derived systems(such as Rhapsody, BeOS, and BS2000/OSD), on AmigaOS, and on Windows 2000. According to the Netcraft (www.netcraft.com)
Web server survey in February, 2001, 60% of all Web sites on the Internet are using Apache (62% including Apache derivatives), making Apache more widely used than all other Web servers combined.
25.Does Apache act as a Proxy server?
Yes, It acts as proxy also by using the mod_proxy module
Yes, It acts as proxy also by using the mod_proxy module
Red Hat Interview Questions
1.In which File is Static IP address given so that it becomes Permanent?
/etc/sysconfig/network-scripts/ifcfg-eth0
2.To Check Which Service is running at Present in System what is the Command?
service –status-all
ps –ef
3.How to trace any process background processing?
ps -aux
4.How to build new filesystem ? and what is irig file system?
mke2fs /dev/hda(sda)
mkfs
mk
5.Which command is used to see all the system configuration?
like hardware, HDD, memory etc.
lspci -vv
6.What is the difference between Telnet and SSH?
ssh is a secured shell, where telnet is not a secured
one.when you ssh to trasnfer data between a system, the data
will be send in the encrypted form, where the hacker cannot
encode or decode it. While you telnet,the data send between
the system is alphabetical format(ASCII), where every one
can understand. More over as per network security, telnet
and ftp are prohibited. Always, trust SSL based data transfer.
7.What is the difference between unix and linux…
graphics is the main difference
extra more command are in linux
userfriendly then unix
8.what is mean by raid and what are all raids available even in software and hardware?
Raid Stands for Redundant Array of Independent Disks.It is
a set of Technology standards for Teamingup DiskDrives to
improve Performence and FaultTolerance. Totally there are 6
levels in Raid
0 – stripping
1 – Mirroring
2 – Stripping and Mirroring
3 – Onfficially Not Defined
4 – Striping with Differential Parity
5 – Striping with Distributional Parity
9.why the kernel panic error was appering?
kernel panic acured when linux kernel can not communicat with any hardware or any OS related file
10.What are the main differences between RHEL4 & RHEL5?
Of course RHEL5 security is the main advantage than RHEL4
in RHEL5 it has the updates like XEN, Yum and many
additional packages which supports all the third party softwares
11. How To Hide the FTP Version?
Stop httpd service.
12.what is difference between inetd and xinetd ?
The major difference between inetd and the newer xinetd is that inetd uses a single configuration file, with one line per service, while xinetd uses a configuration directory, with one file per service
13.What is LILO?
LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, which tell the system which partition and hard drive to boot.
14.why accounting Software does not support on linux?
Bcoz the accounting software is have .exe file. And linux doesn’t support .exe file. so accounting software does not support on linux.
15.How to give 2 different gateway IP addresses for 2 different interfaces in same system ?
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.0.2 dev eth0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.0.3 dev eth1
16.How does the boot process[init levels] work on Linux?
1. The system BIOS checks the system and launches the first
stage boot loader on the MBR of the primary hard disk.
2. The Frist stage boot loader loads itself into memory and
launches the second stage boot loader from the /boot/
partition.
3. The second stage boot loader loads the kernel into
memory, which in turn loads any necessary modules and
mounts the root
partition read-only.
4. The kernel transfers control of the boot process to the /
sbin/init program.
5. The /sbin/init program loads all services and user-space
tools, and mounts all partitions
listed in /etc/fstab.
6. The user is presented with a login screen for the
freshly booted Linux system.
17.What is the difference between an argument and an option/switch?
option specifies the command how to run
arguement specifies the command on what to run
18.How to send automated email to a set of people at fixed time ?
Just create a alias of people and create a command file and create a crond entry.
19.What is the minimum number of partitions you need to install Linux?
/
/boot
/swap
20.There are 4 network Interfaces, how can we find which one is Primary ?
When you type the command netstat -nr in your shell, youwill find a line starting with 0.0.0.0. Something like
0.0.0.0 192.168.0.4 0.0.0.0 UG 0 0 0 eth0
This line indicates if the system tries to contact a network outside its local network. It will first contact the router 192.168.0.4 and it does it with the primary interface. Hence in this case its eth0. So you can check this line for the primary interface
21.What is the difference between home directory and working directory?
Home directory is one over which user have complete control and it is its default working directory when its logs in. while the working directory is the users current directory which may or may not be his home directory.
22.How can you see all mounted drives?
we can see all mounted drives
#mount
#df -Th
23.How to check all open ports on linux machine and block unsed ports?
open ports – nmap localhost
block unsed ports -
#nmap -v localhost for tcp
#nmap -sU localhost for udp
24.What are RPM?s, what do they offer?
The full form of RPM is Redhat Package Manager. rpm is a powerful Package Manager, which can be used to build,install, query, verify, update, and erase individual software packages. A package consists of an archive of files and meta-data used to install and erase the archive files.
25.You want to create a compressed backup of the users’ home directories. What utility should you use?
tar -cvzf user.tar.gz /home/user
26.What utility can you use to automate rotation of logs?
logrotate
27.How u use the iptable firewall to restrict ssh,telnet,ftp ?
iptables -A INPUT -s
28.What file should you examine to determine the defined runlevels for your system?
/etc/inittab
29.What is the name and path of the main system log?
var/log/messages - system log messages can be seen here
/var/log/dmesg - Kernel boot log messages can view
Subscribe to:
Posts (Atom)