Sunday, April 3, 2011

Useful ubuntu mail setup with gmail

http://prantran.blogspot.com/2007/01/getting-postfix-to-work-on-ubuntu-with.html

Tuesday, January 12, 2010

Sunday, May 11, 2008

Upgrade to spring 2.5.4

This weekend I am upgrading my pet project to use spring 2.5.4. During the same time I am also get rid of the spring.jar and try to use the separated packages. it takes sometime to figure out the new package layout. Lucky I finally googled and looks like Eric did some good job outlined the packages and jar files here: http://erics-notes.blogspot.com/2007_12_01_archive.html. Thanks.

Saturday, March 8, 2008

Port 25 blocked on dynmic ip from ATT/SBC

I installed linux sendmail at home and find it is not working. but it works on my another location with static IPs. so i do not know what is going on and thought must be some configuration. got nowhere after consulting friends and played with Postfix. after some googling I find that this is due to the blocking of ISp on the port 25. I am not sure how to solve this. I need to talk to the ISP tomorrow to see if they can unblock this.

Friday, February 15, 2008

Mounting a new hardsikd to linux

Last night I mounted a new disk to the Ubuntu system I am using and here were the steps:
  • using fdisk -l to find out the list of hard drives installed on you computer. then you should get something like the following:
Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000080

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29637 238059171 83 Linux
/dev/sda2 29638 30394 6080602+ 5 Extended
/dev/sda5 29638 30394 6080571 82 Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000081

Device Boot Start End Blocks Id System
Apparently, the /dev/sdb is not mounted and also not formated.
  • if your hard disk is not formated, you need an extra formating step, I usually just do:
mkfs.ext3 /dev/sdb
  • Create a mount point. I usually load the 2nd driver as the data drive and this command will work
mkdir /data
chmod 777 /data
  • If you want to mount your drive right away( this will not mounted automatically every time you reboot )

mount /dev/sdb /data

  • if you want to mount automatically, you need to add an entry in the /etc/fstab file.
/dev/sdb /data ext3 defaults 0 0
To mount the usb external drive you need to use this:

mount -t vfat /dev/sdc1 /backup
Please note you need to specify the type here as fat. for auto mounting, add this to /etc/fstab
/dev/sdc1 /backup vfat auto,users,rw,umask=0 0 0

Pretty simple!


Tuesday, February 12, 2008

Useful apt-* commands

apt-cache for searching
apt-cache search keyword
will give you a list of all packages contain the keyword.
apt-cache show package_name
will give you a lot detail about the package
apt-cache depends package_name
will give you what packages it depends on.


Tips on removing the annoying Ubuntu cdrom needed action in apt-get

When you install any new packages using apt-get, some of the packages will be considered as "Media changes" and need you to put the OS CD into the physical machine. like this
Get:1 http://us.archive.ubuntu.com gutsy/universe python-genshi 0.4.3-1 [271kB]
Media change: please insert the disc labeled
'Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)'
in the drive '/cdrom/' and press enter


What if you are unable to do this? or tired of running from room to room? there is a little change to do to save the labor.

Just comment out the line referring cdrom in /etc/apt/sources.list. In my system this is the line you need to be commented out.
deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted


There is a complete doc on the apt-* commands in
http://www.debian.org/doc/manuals/apt-howto/index.en.html
and will find it useful on and off.