Wednesday, May 30, 2012

Solaris - GUI and CLI mode using dtlogin

Stopping dtlogin
# /etc/init.d/dtlogin stop

Starting dtlogin
# /etc/init.d/dtlogin start

To enable dtlogin type command:
# /usr/dt/bin/dtconfig -e

To disable dtlogin
# /usr/dt/bin/dtconfig -d

To kill dtlogin type command:
# /usr/dt/bin/dtconfig -kill

Read man page of dtlogin for more information.

Monday, May 28, 2012

How to update Sun V240 firmware

1. Download Sun V240 firmware from Sun System Handbook
2. Run explorer and collect output if possible
3. Screen shot current firmware (prtdiag -v)
4. Make sure OBP --> auto-boot=true and boot-device=disk0
5. Run step below at OS level
    # unzip 121683-06.zip
    # cd 121683-06
    # ./unix.flash-update.SunFire240.sh

Sunday, May 27, 2012

How to enable CGI script in Apache

Step 1:
vi /etc/apache2/httpd.conf
add this line
    "AddHandler cgi-script .cgi .pl"
save & exit


Step 2:
vi /etc/apache2/sites-enabled/000-default
add "+ExecCGI" under Options line

        Options Indexes FollowSymLinks MultiViews +ExecCGI
        AllowOverride None
        Order allow,deny
        allow from all



Step 3:
service apache2 restart

Sunday, November 27, 2011

Compression using 7z

ultra = 7z a -t7z /home/file.7z /home/file -mx9
max = 7z a -t7z /home/file.7z /home/file -mx7
normal = 7z a -t7z /home/file.7z /home/file -mx5
fast = 7z a -t7z /home/file.7z /home/file -mx3
fastest = 7z a -t7z /home/file.7z /home/file -mx1
no = 7z a -t7z /home/file.7z /home/file -mx0

to extract
7z x file.7z

Wednesday, October 19, 2011

display or view dns cache entries

#rndc dumpdb -all
#more /etc/namedb/named_dump.db

Tuesday, October 11, 2011

Dynamic ip with permanent DNS

BSD:

vi /etc/dhclient.conf
add
supersede domain-name-servers x.x.x.x , y.y.y.y ;

x.x.x.x = dns-server-1
y.y.y.y = dns-server-2

--------------------------------------------------------
Ubuntu :

root@mail:~# more /etc/dhcp3/dhclient.conf
request subnet-mask, broadcast-address, time-offset, routers, host-name, ntp-servers;
supersede domain-name "ubuntu8.com";
prepend domain-name-servers 8.8.8.8;

enable ssh in backtrack

#sshd-generate
#/etc/init.d/ssh start
#netstat -an | grep 22