Archive for the ‘APC’ Category

pcns221lnx.bin & Red Hat Enterprise Linux 4

Monday, September 3rd, 2007

pcns221lnx.bin is the APC Network Shutdown installer for Linux. It took me a while to figure out how to install this software on Red Hat Enterprise Linux 4, so I figured I’d drop a note here.

PCNS is poorly maintained and is a few years old now. Additionally Red Hat ships with GCJ java, which is shit. Upon execution it would throw cryptic error messages such as:

Preparing wizard…
Searching for JVM…
Starting the wizard…
Error: You need Swing 1.1 or 1.2 in your classpath to run this program.

And:

Preparing wizard…
Searching for JVM…
Starting the wizard…
See errors.log for other possible causes.out of disk space?

The biggest problem I had was that the installation documentation does not mention that the installer requires an X Server! Thanks a lot APC!

Here’s what I did to install it:

ssh steve@server

su
Change to root

rpm -e java-1.4.2-gcj-compat-1.4.2.0-27jpp
rpm -e java-1.4.2-gcj-compat-devel-1.4.2.0-27jpp
Remove old Java packages

rm -rf /usr/local/bin/jvm
Clean up if needed

mkdir /usr/java
Make new installation directory

cd /usr/java
Change to that directory

wget -O jre.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=11284
Download the JRE binary installer

chmod a+x jre.bin
Change permissions to allow execution

./jre.bin
Execute the JRE installer and follow the prompts

export PATH=$PATH:”/usr/java/jre1.6.0_02/bin”
Include the JRE binaries in the PATH where “jre1.6.0_02″ is the JRE version you installed

vi /root/.bash_profile
Change line that begins with “PATH” to this “PATH=$PATH:$HOME/bin:/usr/java/jre1.6.0_02/bin” where “jre1.6.0_02″ is the JRE version you installed

which java && java -version
Check if everything is working

up2date -i xorg-x11 xterm
Install X11 (if not already installed)

Launch a SSH session with X-Win32:

su
Change to root

cd /usr/local/src
Change to our source/installer directory

wget ftp://ftp.relline.ru/pub/unix/apc/pcns-221/pcns221lnx.bin
Download the PCNS binary installer

chmod a+x pcns221lnx.bin
Change permissions to allow execution

./pcns221lnx.bin
Execute the PCNS installer and follow the prompts

PowerChute Network Shutdown

ps -ef | grep “jre”
Make sure the PCNS process is running