We can install tomcat as a apache module. the apache module depending linux is mod_jk.so, mod_jk should be installed on apache modules directory and add the entry in the httpd.conf
"LoadModule jk_module libexec/mod_jk.so"
apache version (1.3)
AddModule mod_jk.c
Another configuration file thats tells about tomcat is workers.properties,
here you can set port no, hostname etc...
2. whats NFS?
nfs means network file system. thre is folder in ur local machine and u want to share it in the network. you can share it using NFS.make an entry in the /etc/exports file, the folder u want to share and the network, particular ip, network or all.nsfd is the deamom which takes care of nfs and in the client u need portmap should be running.
3. how to find out what modules are loaded in Apache?
You can add Apache Features in 2 ways -
1. /usr/sbin/apache -l option will give you modules that are built in. if u see mod_so.c" that means u can add as DSO (dynamic shared objects). now you can add entries in the httpd.conf like LoadModules
/usr/sib/apache -L to see modules which are loaded using httpd.conf
2. during building the apache binary complile the feature statically with apache binary ex.- apache + mysql
4. what happens if u remove vmlinuz line from grub.conf, if it affect any application?
5. what is the exit code of bash shell?
cat /etc/test; if [ $? == 1 ]; then echo "cmd failed" fi
6. how many parameters u can have in a shell?
0 - 9 and 0 is the command so its 9 args.
how you print 12 arg .
shift 2
echo $1 - $9
7.what s array?
An array is like a series of slots that hold values. Each slot is known as an element, and each element can be accessed via a numerical index. An array element can contain a string or a number, and you can use it just like any other variable. The indices for arrays start at 0 and continue up to a very large number. So, for example, the fifth element of array names would be names[4]. Indices can be any valid arithmetic expression that evaluates to a number greater than or equal to 0.
A array is like a series of slots which can in a varibale u can store only one item and a array can store more values. so there are 5 items of one type we can use array otherwsise we can assisgn 5 varibales for 5 values.
8. what is dns?
dns - domain name system is nothing but mapping ip address to an host name. example www.yahoo.com, its easy to remember domain name instead of IP address. name reslution happens in a hieracial method. In Linux /etc/resolv.conf has a entry of the nameserver
and the machine gets the information about root servers then it check for .com domain and then
yahoo.com and www.yahoo.com.
A PTR MAILX
9. how you block an ip address ? one machine hits ur machine madly - ?
iptables -I INPUT -p tcp --dport 80 -j DROP
iptables -I INPUT -p icmp -j DROP (internet control message protocol)
iptables -nL --line-number
iptables -D INPUT
INPUT chain - data packets coming into our network from outside
OUTPUT chain - data packets going out from our network to outside
TCP WRAPPERS - security is allowed only which are inthe under xinet.d server.
it has no control on standalone servers.
xinet.d server is /usr/sbin/tcpd
10. how to find out MySQL is running of not?
mysqladmin ping

0 comments:
Post a Comment