Monday, November 3, 2008

Skip "Compress Old Files" when doing Disk Cleanup

When running Disk Cleanup on Windows 2000 or XP workstations, there is always a long pause for checking how much space will be saved when compression is enabled. As hard disk become so cheap, there is hardy a reason to use Windows XP’s compress and the bigger the disk you have the longer it takes to scan. Here is a windows registry trick that skips the compress check:

http://kb.ucla.edu/articles/automatically-skip-compress-old-files-when-doing-disk-cleanup-in-2000-or-xp

Wednesday, May 7, 2008

eth0: unknown interface: No such device

0) Check if you see any eth* entry in one of the following files:

/etc/modprobe.conf (kernel 2.6)

/etc/modules.conf (kernel 2.4)

(or for older systems: /etc/conf.modules)


In my working case, there is

alias eth0 tg3

However, none was found in my problem Linux, if this is your case, the following steps might work for you. The network module for your network card is not loaded and the following are steps are how to add it back:

1) Find out which module does you NIC need

For me, it is a Broadcom NetXtreme and it works with tg3 module and it already exists in my system under:

/lib/modules//kernel/drivers/net/

2) Add the module

/sbin/modprobe tg3

3) Check the tg3 actually get loaded

/sbin/lsmod |grep tg3

4) ifconfig to see if it is working

5) The module will not be loaded in next reboot. To permanently add this module update the /etc/modprobe.conf with line like for each NIC:

alias eth0 tg3
alias eth1 tg3

Sunday, April 6, 2008

Where is the CA.pl?

I am learning how to setup SSL for Apache. The first step is always setup SSL certs. Most information you found in the Google and the even the latest Apache Cookbook all pointed to the CA.pl which had been come with openssl. I am using Fedora 8 with the openssl-devel installed but like many other people - it just cannot be found.

Finally, I found out that you need to install openssl-perl. If you are using YUM, it would be

yum install openssl-perl

Friday, March 14, 2008

Installing war version of Archiva

Installing war version of Archiva is neither straight forward if $CATACLINA_HOME is NOT owned by you. You only own $CATACLINA_BASE, and there is $CATACLINA_HOME/bin and but no $CATACLINA_BASE/bin

Original

* Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.

* Copy the war file into the new directory

* Create a conf/Catalina/localhost/archiva.xml file with the following data (replace the database paths with a suitable location):

It would be more clear to put it

* Create a directory in tomcat called $CATALINA_BASE/archiva

* Copy the war file into $CATALINA_BASE/archiva

* Create a $CATALINA_BASE/conf/Catalina/localhost/archiva.xml …..
Original

Install derby-10.1.3.1.jar and mail-1.4.jar into the Tomcat common/lib.

For Tomcat 6.0.*, there is no more “common/lib”, put them in “$CATALINA_HOME/lib” instead Details of change see here

Apart from mail.jar you also need to be put under $CATALINA_HOME/lib to get mail work
Java Activation Framework 1.1 - activation-1.1.jar

Original

export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME"

Again, if $CATACLINA_HOME is not owned by you.
export CATALINA_OPTS="-Dappserver.home=$CATALINA_BASE -Dappserver.base=$CATALINA_BASE" is better

If you use the default Derby DB, the default error log file is put under $HOME, to change it set the following properties in CATALINA_OPTS as well:
-Dderby.stream.error.file=xxxx/logs/derby.log"

Thursday, March 6, 2008

Create DB user in Oracle

-- Check which tablespace can be used
select usermame, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE from DBA_USERS;

-- Create user
create user xxxx
identified by yyyyy
default tablespace dddddd
temporary tablespace tttttt;

-- Grant resource to user
grant connect to xxxx;
grant resourc to xxxx;

Installing Archiva

My first impression with Apache Archiva(1.0.1) is not very good.


First, I tried to install Archiva 1.0.1 on Linux as a standalone application. Here is what document say

…The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation, in much the same way Tomcat does, for example, with it's CATALINA_BASE and CATALINA_HOME environment variables…

I can separate configuration from installation but definitely not as nice as Tomcat. When the server starts, it will write files to the installation. So sharing a single installation with multiple configurations is not possible. It would be easier if you just keep the installation and the configuration to the same user. Also, the installation document is just not right.

In step 2 “…Move the conf and data directories from the Archiva installation…”; it should be “ …Copy the conf and data directories from the Archiva installation…”, as the server expect file such as “classworlds.conf” existing in the “conf”. Details can be found here


Login problem

Due to Redback problem, newly added user just cannot login, you need to resend the validation email again (yes! email server is a requirement by default if you want to use Archiva!) Details can be found here

If you want to disable the email verification, add a security.properties file in the conf directory of the installation with the following line:

email.validation.required=false

Detail about the security.properties(Redback configuration file) can be found here

Also, I need to explicitly set the smtp server to localhost, if you get the following error when the server try to send out mail

501 5.0.0 HELO requires domain address

Try adding this line to security.properties as well(assume your localhost can handle smtp)

email.smtp.host=localhost

Wednesday, March 5, 2008

Get rid of gcj

I always prefer Sun's Java over gcj, but with Linux you always default get the gcj. I found the following tip very useful here

Tuesday, February 19, 2008

CentOS - yum update failed - Retrieving GPG key ...

While using yum to update CentOS

Get the "Retrieving GPG key .." error, files get downloaded but fail to update

I solved the problem by get the RPM-GPG-KEY from the first CD of the installation media. In my case, it is "RPM-GPG-KEY-CentOS-5"

Need to import this key to RPM's DB, run the following command as root
rpm --import RPM-GPG-KEY-CentOS-5

Wednesday, February 13, 2008

VM everywhere

Saw the following headline a few days ago "VMware stock loses 33% on revenue"
http://www.boston.com/business/markets/articles/2008/01/30/vmware_stock_loses_33_on_revenue_miss/
Apart from Microsoft and VMWare, even Oracle is offering VM software for free(I wonder when Oracle will start selling burger !)

IBM ServRaid-7k "Wrong SCSI controller found - 3E22"

Found this error when install the IBM ServRaid-7k

Wrong SCSI controller found - 3E22


The problem is related to the on-board HostRAID. We have to disable the the on-board HostRAID first. Press "Ctrl-A" during bootup and use the SCSI utility to diable HostRAID

If you want to switch back to the HostRAID from ServRaid-7k. You have to enable the SCSI device manually in the BIOS since it will be disabled automatically after the ServRaid-7k is removed; otherwise, not even the SCSI will work.

Tuesday, January 29, 2008

Flash "Unable to authenticate installer"

Having problem installing the Flash?

A lot of people do see Adobe's support forum
Adobe said try this http://www.adobe.com/support/flashplayer
For some people, it may due to incorrect permissions in the registry, as here

It does not work for me! if you did try everything else, here is the one that worked for me - Download the IE plugin directly from here instead of install it over the internet:

fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_active_x.msi