Wednesday, December 22, 2010
Answer me first before log a call
1) When you first discover the amber light is on?
2) Is there any software installation/maintenance been performed recently?
3) Is there any hardware installation/maintenance been performed recently?
4) Is there any recent power failure?
5) What action you have tried to troubleshoot?
6) Do you notice any other abnormal situation (e.g. daemon down, network not working, etc)? Or the server still running as usual?
Thank you.
Sunday, December 19, 2010
Linux - Enable root passwd
If you want to enable root account (which is not recommended) enter the following command.
$sudo passwd root
This will prompt for a new root password and once you confirm it, you can start using the root account to login.
If you want to disable root account in ubuntu you need to lock the root account by using the following command
$sudo passwd -l root
If you want to work on a root console you’d better use the following command
$sudo -i
Friday, December 17, 2010
Picasa login failed - Network
Wednesday, December 15, 2010
Monday, December 6, 2010
Fedora 13 - Install printer Canon LBP3050
------------------------------------------------------
1. Download driver from http://support-my.canon-asia.com/contents/MY/EN/0900772407.html
2. root# gunzip CAPT_Printer_Driver_for_Linux_V200_uk_EN.tar.gz
3. root# tar -xvf CAPT_Printer_Driver_for_Linux_V200_uk_EN.tar
4. root# cd CAPT_Printer_Driver_for_Linux_V200_uk_EN/Driver/RPM
5. root# rpm -i cndrvcups-common-2.00-2.i386.rpm
6. root# rpm -i cndrvcups-capt-2.00-2.i386.rpm
7. root# vi /etc/ccpd.conf
DevicePath /dev/usb/lp0
8. root# /etc/init.d/cups restart
9. root# lpadmin -p LBP3050 -m CNCUPSLBP3050CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
10. root# ccpdadmin -p LBP3050 -o /dev/usb/lp0
11. root# /etc/init.d/ccpd start
12. Done & try print any document
Tuesday, November 23, 2010
Broadband connection
Friday, November 19, 2010
Linux - Mount ISO image automatically
Monday, August 23, 2010
Solaris 10 - Zone installation
# zfs set mountpoint=/zonesaya poolForZones/zonesaya
# zpool status -z
# chmod 700 /zonesaya
# zonecfg -z zonesaya
zonesaya: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zonesaya> create
zonecfg:zonesaya> set zonepath=/zonesaya
zonecfg:zonesaya> set autoboot=true
zonecfg:zonesaya> add net
zonecfg:zonesaya:net> set address=10.140.1.25
zonecfg:zonesaya:net> set physical=ce0
zonecfg:zonesaya:net> end
zonecfg:zonesaya> add fs
zonecfg:zonesaya:fs> set dir=/cdrom
zonecfg:zonesaya:fs> set special=/cdrom
zonecfg:zonesaya:fs> set type=lofs
zonecfg:zonesaya:fs> add options [ro,nodevices]
zonecfg:zonesaya:fs> end
zonecfg:zonesaya> add dedicated-cpu
zonecfg:zonesaya:dedicated-cpu> set ncpus=3
zonecfg:zonesaya:dedicated-cpu> end
zonecfg:zonesaya> add capped-memory
zonecfg:zonesaya:dedicated-cpu> set physical=1gb
zonecfg:zonesaya:dedicated-cpu> set swap=256gb
zonecfg:zonesaya:dedicated-cpu> set locked=256gb
zonecfg:zonesaya:dedicated-cpu> end
zonecfg:zonesaya> add fs
zonecfg:zonesaya:fs> set dir=/mnt
zonecfg:zonesaya:fs> set special=/dev/dsk/c0t0d0s2
zonecfg:zonesaya:fs> set raw=/dev/rdsk/c0t0d0s2
zonecfg:zonesaya:fs> set type=ufs
zonecfg:zonesaya:fs> add options [nodevices,logging]
zonecfg:zonesaya:fs> end
zonecfg:zonesaya> commit
zonecfg:zonesaya> verify
zonecfg:zonesaya> commit
zonecfg:zonesaya> exit
# zoneadm -z zonesaya install
# zoneadm -z zonesaya boot
# zlogin -C zonesaya
----------------------------------------------------------------
edit exist value:
zonecfg:my-zone> select rctl name=zone.cpu-shares
--------------------------------------------------------------
bash-3.00# dladm show-link
e1000g0 type: non-vlan mtu: 1500 device: e1000g0
e1000g1 type: non-vlan mtu: 1500 device: e1000g1
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
e1000g3 type: non-vlan mtu: 1500 device: e1000g3
bash-3.00# dladm show-dev
e1000g0 link: up speed: 10 Mbps duplex: half
e1000g1 link: unknown speed: 0 Mbps duplex: half
e1000g2 link: unknown speed: 0 Mbps duplex: half
e1000g3 link: unknown speed: 0 Mbps duplex: half
---------------------------------------------------------------------
http://developers.sun.com/solaris/articles/application_in_zone.html
Wednesday, August 11, 2010
Solaris 10 - How to set Java Web Console
#svcadm refresh svc:/system/webconsole
#smcwebserver stop
#smcwebserver start
#svcadm enable svc:/system/webconsole
#netstat -an | grep 6789
go to https://localhost:6789
Thursday, July 29, 2010
Friday, July 23, 2010
Zimbra mail server
search abs.com.my
nameserver localhost
-------------------------------------------------
root@abs-mail:~# more /etc/hosts
203.223.137.86 abs-mail.abs.com.my absmail
-------------------------------------------------
root@abs-mail:~# more /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface (DHCP)
#auto eth0
#iface eth0 inet dhcp
# The primary network interface (static)
auto eth0
iface eth0 inet static
address 203.223.137.86
netmask 255.255.255.128
network 203.223.137.0
broadcast 203.223.137.127
gateway 203.223.137.126
root@abs-mail:~#
Wednesday, July 14, 2010
Ubuntu - How to set DNS server
/etc/init.d/bind9 stop
edit 3 files.
* /etc/bind/named.conf.local
* /etc/bind/named.conf.options
* /etc/resolv.conf
create 2 files.
* /etc/bind/zones/mydomain.com.db
* /etc/bind/zones/rev.0.168.192.in-addr.arpa
--------------------------------------------------------------------------------------------
vi /etc/bind/named.conf.local
# Our domain zone
type master;
file "/etc/bind/zones/abs.com.my.db";
};
# For reverse DNS
zone "137.223.203.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.137.223.203.in-addr.arpa";
};
--------------------------------------------------------------------------------------------
vi /etc/bind/named.conf.options
// directory "/var/named";
// dump-file "/var/named/data/cache_dump.db";
// statistics-file "/var/named/data/named_stats.txt";
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.
query-source address * port 53;
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
203.223.137.124;
};
// include "/etc/rndc.key";
// We are the master server for server.example.com
//zone "abs-mail.abs.com.my" {
// type master;
// file "abs-mail.abs.com.my";
// auth-nxdomain no; # conform to RFC1035
// listen-on-v6 { any; };
};
--------------------------------------------------------------------------------------------
vi /etc/resolv.conf
search abs.com.my
nameserver localhost
nameserver 203.223.137.126
nameserver 210.19.197.110
nameserver 203.223.137.124
nameserver 203.121.65.30
mkdir /etc/bind/zones
vi /etc/bind/zones/mydomain.com.db
$TTL 3D
@ IN SOA abs-mail.abs.com.my. root (
2007062001
28800
3600
604800
38400
);
abs.com.my. IN NS abs-mail.abs.com.my.
abs.com.my. IN MX 10 abs-mail.abs.com.my.
abs-mail IN A 203.223.137.86
--------------------------------------------------------------------------------------------
vi /etc/bind/zones/rev.137.223.203.in-addr.arpa
@ IN SOA abs-mail.abs.com.my. root (
2007062001
28800
604800
604800
86400
)
IN NS abs-mail.abs.com.my.
86 IN PTR abs-mail.abs.com.my.
--------------------------------------------------------------------------------------------
/etc/init.d/bind9 restart
--------------------------------------------------------------------------------------------
1. go to other computers, point it's dns server to this new dns server
2. open terminal/cmd prompt
dig jaring.my
; <<>> DiG 9.6.1-P2 <<>> jaring.my
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55222 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0 ;; QUESTION SECTION: ;jaring.my. IN A ;; ANSWER SECTION: jaring.my. 359962 IN A 192.228.128.20 ;; AUTHORITY SECTION: jaring.my. 86362 IN NS NS6.jaring.my. jaring.my. 86362 IN NS NS5.jaring.my. jaring.my. 86362 IN NS dns1.jaring.my. jaring.my. 86362 IN NS dns2.jaring.my. ;; Query time: 1 msec ;; SERVER: 203.223.137.86#53(203.223.137.86) ;; WHEN: Wed Jul 14 14:25:00 2010 ;; MSG SIZE rcvd: 117
nslookup jaring.my
Server: 203.223.137.86 <-------it's using new dns server Address: 203.223.137.86#53 Non-authoritative answer: Name: jaring.my Address: 192.228.128.20
root--- jaring.my ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9011ms
rtt min/avg/max/mdev = 186.559/295.523/416.053/68.948 ms
:~# ping jaring.my -c 10
PING jaring.my (192.228.128.20) 56(84) bytes of data.
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=1 ttl=56 time=218 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=2 ttl=56 time=358 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=3 ttl=56 time=257 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=4 ttl=56 time=383 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=5 ttl=56 time=289 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=6 ttl=56 time=186 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=7 ttl=56 time=252 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=8 ttl=56 time=286 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=9 ttl=56 time=416 ms
64 bytes from dns2.jaring.my (192.228.128.20): icmp_seq=10 ttl=56 time=307 ms
--- jaring.my ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9011ms
rtt min/avg/max/mdev = 186.559/295.523/416.053/68.948 ms
root@fLufyz-laptop:~#
if error, check log file at /var/log/syslog
Tuesday, July 13, 2010
Friday, July 9, 2010
Solaris 10 - Backup using fssnap & ufsdump & ufsrestore
#mkdir -p /virtual-rmt/0/
#mkdir /backingstore
#mkdir /export/home/filetobackup
#cd /export/home/filetobackup
#mkfile -nv 100k file1.test file2.test file3.test file4.test
2. Take a snapshot of the file
#fssnap -F ufs -o bs=/backingstore /filetobackup
3. Backup the file#ufsdump 0uf /virtual-rmt/0 /dev/fssnap/0
------------------------------------------------------------
to check the status of a snapshot:
#fssnap -i
to delete snapshot:
#fssnap -d /dev/fssnap/0
-----------------------------------------------------------
to restore:
#rm -rf /export/home/filetobackup
#ls
#ufsrestore rvf /virtual-rmt/0/dump0
done
Tuesday, July 6, 2010
Solaris 10 - replace failed hardisk on mirror setting
#metadb -d c0t1d1s7
#metadetach -f d40 d42
#metaclear -f d42
#cfgadm -al
#cfgadm -c unconfigure c1::dsk/c0t1d0
take out old disk
put in new disk
#cfgadm -c configure c1::dsk/c0t1d0
#format
#prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
#metadb -a -c 2 c0t1d0s7
#metainit -f d42 1 1 c0t1d0s5
#metattach d40 d42
#metastat -p
#metadevadm -u c0t1d0
Friday, June 11, 2010
Friday, June 4, 2010
Solaris 10 - Add new hardisk
2. Boot up
3. #devfsadm
4. #format
5. #iostat -En (take note the new hardisk target address. eg .c0t0d0)
6. #newfs /dev/rdsk/c0t0d0
7. #mkdir /newfs
8. #mount /dev/dsk/c0t0d0 /newfs
9. #df -h
Thursday, May 13, 2010
Solaris : loghost could not be resolved
127.0.0.1 localhost loghost
save and exit.
Wednesday, May 12, 2010
Solaris 10 : Changing hostname
2. /etc/nodename
3. /etc/hostname.
--------------------------------------------------
root@-i # more /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
203.223.137.104 oratest oratest.com.my loghost
root@-i # more /etc/nodename
oratest
--------------------------------------------------
root@-i # more /etc/hostname.e1000g0
oratest
--------------------------------------------------
Friday, April 23, 2010
Ubuntu - How to get hardware info,version & serial
#smidecode
#lshw
#lspci
In GUI mode :
#apt-get install lshw-GTK
#lshw-GTK
Thursday, April 15, 2010
Solaris - OBP : FATAL: system is not bootable, boot command is disabled
{0}ok reset-all
{0}ok boot disk
Saturday, February 6, 2010
Check disk info in Linux
- l : List the partition tables for the specified devices and then exit
#df -h
-h : human readable
Monday, January 25, 2010
Mount error after upgrade to Ubuntu 9.10
Thursday, January 21, 2010
Ubuntu - FTP server
---------------------------
apt-get install vsftpd
nano /etc/vsftpd.conf
local_enable=YES
write_enable=YES
chown_uploads=YES
chown_username=root
(comment out all these option)
/etc/init.d/vsftpd stop
reboot
Ubuntu - vsftpd.chroot_list
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
Sunday, January 10, 2010
Apply windows registry file in linux
# wine regedit file.reg