Command For rpmbuild

You need to install rpmbuild (yum install rpm-build) modules to used the command below. This is just my note regarding command I need to used.

Directory under /usr/src/redhat
BUILD RPMS SOURCES SPECS SRPMS

cd /usr/src/redhat/SPECS

rpmbuild -ba nameofyourspec.spec

This will produce rpm and rpms files, That will reside under directory /usr/src/redhat/RPMS and /usr/src/redhat/SRPMS

Another command I love to used is to identify the file came from what package.

rpm -qf /usr/src/redhat

rpm-build-4.4.2-48.el5

IMAP Command To Check Login Using Telnet

Need to blog this. Keep on google for it. I need a set of command so I can check the IMAP connection for email server. Yep Im promoting the used of IMAP with Dbmail.

telnet 192.168.0.5 143

ab login haris mypassword

ab OK LOGIN completed

ab logout

----

Replace haris with your login and mypassword with your password. Wrong password or login will produce this error

ab NO login rejected

More from Dovecot

http://wiki.dovecot.org/TestInstallation

Force Check Linux File System Under Maintenance Mode

Force Check Linux File System Under Maintenance Mode

One of the server running Backuppc and using USB storage to store the backup and I called it harisbackup. Its has one habit, in a period of a month, it will detect having a file system problem. The file system type is ext2. Before using ext2, I had use ext3, but USB storage keep on detaching itself after a few days. Changing to ext2 resolved the issue.

If you want to used, external storage, USB connecton is not a good option if you want to keep it permanent mounted. Used Firewire or Iscsi and format it with ext2 or reiserfs. ext4 not yet tested. I believe high IO between mounted file system and OS in long period of time like days, the device will disconnect itself.

If you get error messages as per below when rebooting the system. (Im using Linux Centos 5).

----- Start Message -----


harisbackup contains a file system with errors, check forced

harisbackup : | =============== |% (until it finish)

unattached inode 2050

root : UNEXPECTED INCONSISTENCY; run fsck MANUALLY
(i.e. , without -a or -p options)

*** An error occured during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.

Give root password for maintenance.
(Or type Control-D for normal startup);

---- End message ----

Keyin your root pasword and issue this command

fsck -p

This will check the hard disk. Time estimation around 45 minutes for 1 tera (1000GB) hard disk.

If the above command fail, need to force check

fsck -f -v

You may be ask with questions, just answer "y".

*** warning *** you may lose or already lost files. Answering "Y" may copy full or partial files to lost+found.

When finish just type exit and system will reboot.

 
Powered by WebRing.