Search This Blog
Monday, 28 December 2009
How enable DISABLED Veritas Volume
Monday, 14 December 2009
Editing Remote server Crontab
Tuesday, 8 December 2009
Script for killing a process owned by root using sudo as localuser
Thursday, 3 December 2009
Configuring linux DNS server for LAN.
Step 1:
Step 2: Editing configuration Files
#This is my forward zone, all local IP and Host names are defied here
Step 3: Making Forward lookup zone file
This is the forward lookup zone db.
$TTL 1D
riyadh.lan. IN SOA ns.riyadh.lan. admin.riyadh.lan. (
2009122701
3H ;refresh
15 ;retry
1w ;expire
3h ;negative ttl
)
IN NS ns.riyadh.lan.
IN MX 10 mail.riyadh.lan.
ns IN A 192.168.1.30
shimna IN A 192.168.1.1
audit IN A 192.168.1.1
phpmysql IN A 192.168.1.1
shimna IN A 192.168.15.100
wimax IN A 192.168.15.1 ;modem
wan IN A 192.168.15.100 ;modem
wifi IN A 192.168.1.100 ;wifimodem
mds IN A 192.168.1.6 ;mds lap
tiger IN A 192.168.1.3 ;tiger server
mail IN A 192.168.1.20 ;tiger server
bitt IN A 192.168.1.104 ;webserver
ent IN A 192.168.1.107 ;webserver
film IN A 192.168.1.40 ;webserver
song IN A 192.168.1.40 ;webserver
;log IN A 192.168.1.3 ;webserver
webmin IN A 192.168.1.103 ;webserver
chimmu IN A 192.168.1.7
webtiger IN A 192.168.1.106
linux IN A 192.168.1.101
ganglia IN A 192.168.1.102
iphone IN A 192.168.1.9
E65 IN A 192.168.1.8
;shimna IN A 192.168.1.5
node1 IN A 192.168.1.99
win7 IN A 192.168.1.75
Step 4: Editing corresponding reverse lookup file.
[root@latheefp/]# cat /var/named/rev.192.168.zone
$TTL 1D
@ IN SOA ns1.riyah.lan. admin.riyadh.lan. (
2009122701;
28800;
604800;
604800;
86400
)
@ IN NS ns.riyadh.lan.
30.1.168.192.in-addr.arpa. IN PTR ns.riyadh.lan.
1.1.168.192.in-addr.arpa. IN PTR shimna.riyadh.lan.
1.1.168.192.in-addr.arpa. IN PTR audit.riyadh.lan.
1.1.168.192.in-addr.arpa. IN PTR phpmysql.riyadh.lan.
100.15.168.192.in-addr.arpa. IN PTR shimna.riyadh.lan.
104.1.168.192.in-addr.arpa. IN PTR bitt.riyadh.lan.
107.1.168.192.in-addr.arpa. IN PTR ent.riyadh.lan.
103.1.168.192.in-addr.arpa. IN PTR webmin.riyadh.lan.
20.1.168.192.in-addr.arpa. IN PTR mail.riyadh.lan.
40.1.168.192.in-addr.arpa. IN PTR film.riyadh.lan.
40.1.168.192.in-addr.arpa. IN PTR song.riyadh.lan.
;3.1.168.192.in-addr.arpa. IN PTR log.riyadh.lan.
106.1.168.192.in-addr.arpa. IN PTR webtiger.riyadh.lan.
7.1.168.192.in-addr.arpa. IN PTR chimmu.riyadh.lan.
100.1.168.192.in-addr.arpa. IN PTR wifi.riyadh.lan.
6.1.168.192.in-addr.arpa. IN PTR mds.riyadh.lan.
3.1.168.192.in-addr.arpa. IN PTR tiger.riyadh.lan.
1.15.168.192.in-addr.arpa. IN PTR wimax.riyadh.lan.
100.15.168.192.in-addr.arpa. IN PTR wan.riyadh.lan.
101.1.168.192.in-addr.arpa. IN PTR linux.riyadh.lan.
102.1.168.192.in-addr.arpa. IN PTR ganglia.riyadh.lan.
9.1.168.192.in-addr.arpa. IN PTR iphone.riyadh.lan.
8.1.168.192.in-addr.arpa. IN PTR E65.riyadh.lan.
;5.1.168.192.in-addr.arpa. IN PTR shimna.riyadh.lan.
99.1.168.192.in-addr.arpa. IN PTR node1.riyadh.lan.
75.1.168.192.in-addr.arpa. IN PTR win7.riyadh.lan.
Step 5: Starting DNS server:
[root@latheefp/]# /etc/init.d/named start
Starting named: [ OK ]
Named can be restarted using below command
[root@latheefp/]# /etc/init.d/named restart
Stopping named:
[ OK ]
Starting named: [ OK ]
Now in any system in 192.168.1.x and 192.168.15.x network can access this dns server for lookup.It can resolve all local hosts and other global hosts.
Monday, 23 November 2009
Some Solaris commands for getting configurations
root@latheefp# ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 395
virtual memory (kbytes, -v) unlimited
root@latheefp# cat /etc/system|grep max
* set maxusers=40
shmsys:shminfo_shmmax 4294967295
set shmsys:shminfo_shmmax=4294967295
set max_nprocs=400
set rlim_fd_max=1024
root@latheefp# sysdef -i|grep max
drv/sparcv9/max1617
683368448 maximum memory allowed in buffer cache (bufhwm)
400 maximum number of processes (v.v_proc)
99 maximum global priority in sys class (MAXCLSYSPRI)
395 maximum processes per user id (v.v_maxup)
9 maximum number of pushes allowed (NSTRPUSH)
65536 maximum stream message size (STRMSGSZ)
1024 max size of ctl part of message (STRCTLSZ)
60 maximum time sharing user priority (TSMAXUPRI)
Sunday, 22 November 2009
Configuring solaris system as syslog server
For configuring syslog server in Unix, nothing to do in sever side. Do the following changes in client side
1. Make a backup of /etc/syslog.conf file
2. Add the hostname of server in /etc/host (server should be pingable using hostname either DNS)
3. Add this line /etc/syslog.conf of client
4.
*.err;kern.debug;daemon.notice;mail.crit @remoteunixhostname
Note down, don’t use any space in /etc/syslog.conf file, use only tabs instead.
5. Restart sylog service in client
svcadm restart svc:/system/system-log:default -> this is for solari 10
/etc/init.d/syslog stop; /etc/init.d/syslog start -> this is for other solaris OS
6. Make sure UDP port 514 is opened from client to server (client -514 ->server)
Once its ok, you will be all to see all logs generated in clients will be logged either in /var/adm/messages of server and /var/adm/messages of client. If you have multiple client add the same entry in all client. Messages can be identified from server side, by host name of the client in each line of messages.