Monday, July 23, 2007

Disabling Caps lock in Linux

Master Your Linux Keyboard (And Fix Caps Lock Forever)
Exorcising Caps Lock



Want to get rid of the evil caps lock key without mutilating your keyboard? Want to give those silly Windows keys useful jobs, or put all those extra multi-media keys to work? Want to become a powerhouse keyboarding commando? Then come along and join the fun, because Linux has all kinds of good tools for taming wayward keyboards and increasing your efficiency. In this two-part series we're going to use xmodmap, XBindKeys, and KeyTouch to create custom keybindings for launching applications and running commands.

The placement of the caps lock key is a demonstration of malicious cunning. It's above the shift key and it's usually oversized, so it's way too easy to hit it when you don't want to, which for me is all the time. On a case-sensitive operating system it's not all that useful anyway. Unhappy users often resort to remedies like prying it off entirely or covering it with duct tape. You can do this if you're careful, but elite geeks resort to more sophisticated measures that do not mangle their nice keyboards. It's not the fault of the keyboards that manufacturers have giant Windows-sized blind spots, and as always, Linux makes lemonade out of lemons and provides useful alternatives.

This command reverses whatever position the caps lock key is in, so first make sure it is not on:
$ xmodmap -e "remove lock = Caps_Lock"

What if you do this when caps lock is on? One remedy is get used to typing like a dork: "dEAR jUPITERMEDIA, i WANT MORE STORIES ABOUT hp, ibm, AND dELL." Or you could fix it. First run this command:
$ xmodmap -e "add lock = Caps_Lock"

Then make sure it is not on, and re-run the "remove lock" command.

This won't survive a reboot, so put it in your ~/.bashrc file to make it permanent.

Remove LAME Logging and Version Exposure in BIND

Got lame server errors? Are you exposing your bind version?

Are lame-server errors filling up your logs? Are you letting bind send its version out to potential attackers? You can fix these issues with some simple changes.
Simple Bind Configuration Changes
Lame Server Errors

If you look in your message logs, you may see an error about a "lame server". A lame server is when the NS record for a domain specifies a server that is not authoritative for the domain. For example, the NS record for www.domain.com may list ns1.domain.com as one of its nameserver; however, if you actually query ns1.domain.com, the nameserver does not answer as an authoritative server. The latter is do to a mis-configuration of that nameserver not yours. Lame servers are increasingly common as more and more people run their own DNS -- often with improper configurations. Errors will look something like this in your messages log:
lame server resolving 'www.domain.com'
(in 'domain.com'?) : 192.168.1.1#53: 1 Time(s)

On a busy server, especially if you have a lot of users and email traffic, your servers logs can fill up with lame-server entries, thus obscuring more important system messages. A simple configuration change, outlined below, can stop lame server logging. We will get to the changes soon, but first, you may also want to know how to hide your bind version.
BIND Version

BIND has had a history of exploits and security issues. Many scanners and exploit tools rely on the version number to identify exploitable servers. These scanners note the version and flag the server for later investigation by the hacker. Getting your server to show the version of BIND is very easy with dig. Here is an example:
; <<>> DiG 9.2.1 <<>> @ns1.somewhere.com version.bind chaos txt
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27169
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;version.bind. CH TXT

;; ANSWER SECTION:
VERSION.BIND. 0 CH TXT "8.2.3-REL"

;; Query time: 2 msec
;; SERVER: 216.12.210.61#53(ns1.somewhere.com)
;; WHEN: Sun Aug 10 15:02:44 2003
;; MSG SIZE rcvd: 64

As you can see in the answer section, the version of bind is returned. This can allow automated exploit and scanning tools identify your server as a possible target. By making a configuration change, you can switch your version to any string that you like. Historically, the phrase "surely you must be joking" is the string that many system administrators select. Here is an example:
; <<>> DiG 9.2.1 <<>> @ns1.somewhere.com version.bind chaos txt
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44970
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;version.bind. CH TXT

;; ANSWER SECTION:
version.bind. 0 CH TXT "surely you must be joking"

;; Query time: 2 msec
;; SERVER: 64.246.46.230#53(ns1.somewhere.com)
;; WHEN: Sun Aug 10 15:08:16 2003
;; MSG SIZE rcvd: 68

As you can see above, this server does not return any version details.

Security by obfuscation is not a good security policy. By this I mean that by hiding your version number you may disrupt some automated scanning and other tools, but it is not a substitute for keeping BIND updated. Do not rely on this simple configuration change for security. Does it help? Maybe ... but it is not a security solution. The change simply makes it more difficult for hackers to discover what version of BIND you are running.
Updating Your BIND Configuration

Why some of these settings are not default, I do not know. The change is very easy and requires editing of one file.

The file that you need to change is:

/etc/named.conf

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};



Your IPs of course will be different but otherwise your file will be similar. To disable lame logging errors



options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};

logging {
category lame-servers { null; };
};


Now set your bind version simply change the file to include these statements.

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
version "surely you must be joking";

};

Save these changes and then restart bind. You should now not have lame-server errors in your logs nor should a dig return the version of your BIND server.

To make sure the changes worked, run the following command:
dig @ns1.domain.com version.bind chaos txt

Now your server should return the string you set in the configuration file. As mentioned before, this is not a substitute to updating BIND, but these simple are a part of a comprehensive approach to server security. For more information on BIND, see the official documents at the BIND web site.

Saturday, July 14, 2007

Display Problem in SUSE 10 with Matrox G400 Graphics Card and USB Mouse

 

After installing SUSE 10.0 Display was not working

Graphics Card : Matrox G 400
Monitor : Samsung SyncMaster 594 MG


1. I logged into runlevel 3 and tried to fire up X11
systemp5:~ # startx
xauth: creating new authority file /root/.serverauth.8991
X Window System Version 6.9.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 6.9
Build Operating System: SuSE Linux [ELF] SuSE
Current Operating System: Linux systemp5 2.6.16.21-0.8-ppc64 #1 SMP Mon Jul 3 18:25:39 UTC 2006 ppc64
Build Date: 17 June 2006
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jul 13 18:41:41 2007
(==) Using config file: "/etc/X11/xorg.conf"
(EE) No devices detected.

Fatal server error:
no screens found

Please consult the The X.Org Foundation support
at http://wiki.X.Org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.
2. So I tried to configure it using “X -configure”

systemp5:~ # X -configure
X Window System Version 6.9.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 6.9
Build Operating System: SuSE Linux [ELF] SuSE
Current Operating System: Linux systemp5 2.6.16.21-0.8-ppc64 #1 SMP Mon Jul 3 18:25:39 UTC 2006 ppc64
Build Date: 17 June 2006
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jul 13 18:42:20 2007

List of video drivers:
atimisc10b
chips
dummy
via
glint
s3
s3virge
savage
sisusb
tdfx
trident
v4l
nvidia
ast
ati10b
ati
atimiscold
atimisc
i810xorg71
atiold
i810
r12810b
mga
nv
r128old
r128
radeon10b
radeon
radeonold
sis
fbdev
vga

dlopen: /usr/X11R6/lib/modules/drivers/atimisc10b_drv.so: undefined symbol: ATIPublicOptionSize
(EE) Failed to load /usr/X11R6/lib/modules/drivers/atimisc10b_drv.so
(EE) Failed to load module "atimisc10b" (loader failed, 7)
No devices to configure. Configuration failed.
systemp5:~ #


3. Tried to blow up with “X -configure” through a few more switches.
systemp5:~ # X -ignoreABI -bestRefresh -disableVidMode -configure
-modulepath /usr/X11R6/lib/modules/ dpms -config -allowMouseOpenFail

Again the same error
dlopen: /usr/X11R6/lib/modules/drivers/atimisc10b_drv.so: undefined symbol: ATIPublicOptionSize
(EE) Failed to load /usr/X11R6/lib/modules/drivers/atimisc10b_drv.so
(EE) Failed to load module "atimisc10b" (loader failed, 7)
No devices to configure. Configuration failed.
systemp5:~ #



4. There is utility SaX to probe for the monitor.Made an attempt with it

systemp5:/opt/xf86-video-mga-1.4.2 # sax2
SaX: initializing please wait...
SaX: your current configuration will not be read in

Can't load '/usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi- 64int/auto/SPP/SPP.so' for module SPP: libqt-mt.so.3: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/ppc-linux-thread-multi- 64int/DynaLoader.pm line 230.
at /usr/lib/perl5/vendor_perl/5.8.8/ppc-linux-thread-multi-64int/SPP.pm line 7
Compilation failed in require at /usr/share/sax/modules/SPPParse.pm line 12.
BEGIN failed--compilation aborted at /usr/share/sax/modules/SPPParse.pm line 12.
Compilation failed in require at /usr/share/sax/init.pl line 21.
BEGIN failed--compilation aborted at /usr/share/sax/init.pl line 21.
systemp5:/opt/xf86-video-mga-1.4.2 #

Here is related with some libraries.I couldn't find the library at the moment.So I went through playing with editing /etc/X11/xorg.conf and some other drivers available

5. First browsed the Vendor's Home Page
But unfortunately The download URL
http://www.matrox.com/graphics/en/corpo/support/drivers/driverInfo.php?id=145
was not accessible

6. Then after googling
Downloaded the source RPM from
http://software.opensuse.org/download/X11:/Drivers:/Video:/mga/SLE_10/src/

7. Compiled the source
systemp5:/usr/src/packages/SPECS # pwd
/usr/src/packages/SPECS

systemp5:/usr/src/packages/SPECS # rpmbuild xorg-x11-driver-video-mga.spec
error: Failed build dependencies:
Mesa-devel is needed by xorg-x11-driver-video-mga-4.3.14.3-1.2.ppc64
libdrm-devel is needed by xorg-x11-driver-video-mga-4.3.14.3-1.2.ppc64
8. Installed the dependancies through YaST interface
systemp5:/usr/src/packages/SPECS # yast -i Mesa-devel
systemp5:/usr/src/packages/SPECS # yast -i libdrm-devel
9. Built the RPM
systemp5:/usr/src/packages/SPECS # rpmbuild xorg-x11-driver-video-mga.spec

10.Refer the following from a Mailing List

Symptom
You cannot configure your graphics card with sax or sax2.

Cause
Problems with the drivers or your graphics card is not supported by the current XFree86 packages.

Solution
A list of all problematic chipsets currently known to the installation support desk follows. Each device has a vendor ID (manufacturer) and subsystem ID (device ID) that identify the hardware. The command

/sbin/lspci -n | grep 0300

enables you to easily find your graphics card's data. If you have one of the graphics chipsets listed below, refer to the following articles for the configuration:

If you want to configure the framebuffer:
http://en.opensuse.org/SDB:Setting_up_Unsupported_Graphics_Cards_with_the_Framebuffer_Device_(GRUB)

General information about sax and sax2
http://en.opensuse.org/SDB:X_Server_Configuration_with_SaX2

Solution
Use the framebuffer device to address your graphics card. To do this, proceed as follows:
Enter the following at the boot prompt:
linux 3 vga=xxx

Replace xxx with a value from the table below. This value specifies the resolution and color depth used by the X server later.
Resolution in pixels
Color depth | 640x480 800x600 1024x768 1280x1024
256 (8bit)| 769 771 773 775
32000 (15bit)| 784 787 790 793
65000 (16bit)| 785 788 791 794
16.7 Mill.(24bit)| 786 789 792 795

For example, to make an X server run with 16-Bit color depth and a 1024x768 resolution, enter the following value at the boot prompt:
linux 3 vga=791

Especially in the case of notebooks, this value might not be supported. If this is the case, select a lower resolution (800x600 16-bit).

But this editing in the lilo.conf while booting didn't help in my case
From SuSE Linux 8.2 on, the specification of the framebuffer modes has changed. To find out the modes supported by your graphics card, execute the command
hwinfo --framebuffer

systemp5:/usr/X11R6/lib/modules #
systemp5:/usr/X11R6/lib/modules # hwinfo --framebuffer
systemp5:/usr/X11R6/lib/modules # hwinfo --framebuffer
It returns nothing
Take a look at the sax log file
systemp5:~ # cat /var/log/SaX.log

/*************
SaX2 log : SaX2 version 7.1 - SVN Release: 1.49 2003/03/17
**************
SVN RELEASE : 1157
:
DESCRIPTION : X11 configuration log file to collect information
: about detection, startup and configuration.
: There are three parts of logging:
: ---
: 1) INIT ( detection, 3D )
: 2) STARTUP ( xorg.conf, X11 log, glxinfo )
: 3) CONFIG ( config actions )
: ---
:
VERSION : SaX2 compiled for: [SUSE Linux Enterprise 10 (PPC)]
PARAMETER : -m 0=mga_drv.so
:
LOG DATE : Fri Jul 13 17:05:35 IST 2007
*************/
============================
Framebuffer Info:
----------------------------
Framebuffer is active

From this it is clear that sax is trying with MGA driver



Frequently asked question - pSeries
When running SUSE SLES8 on a pseries p615, which has a Matrox G400 graphics card, the p615 claims the card is on PCI Bus 290, but the XFree86 scan of the PCI bus does not see the card. I am assuming that is because the scan does not go above 255. How can I get XFree86 to recognize the card?
Answer
XFree86 should be able to use it only as a frame buffer device. This should be enabled by default with SLES8, and though there were some video issues, they have all been resolved with Service Pack 3. Since you have installed SLES8, then the frame buffer should work by default. If not, then you will need to make sure that you are running SP3.
Also, instead of trying to use the mga driver, you should use the matroxfb. In case if you have edited conf files to expect the mga driver, they will have to fix what you have changed before trying the matroxfb.
11. Downloaded the Matrox drivers from
http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mga-1.2.1.3.tar.gz
http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mga-1.4.2.tar.bz2
Reference : http://www.tuxx-home.at/projects/mga/HOWTO_mga_Xorg7

systemp5:/opt # tar xjf xf86-video-mga-1.4.2.tar.bz2
systemp5:/opt # cd xf86-video-mga-1.4.2/
systemp5:/opt/xf86-video-mga-1.4.2 # ./configure
.
..
.....
........

/configure: line 19710: pkg-config: command not found
checking if DPMSExtension is defined... no
checking for pkg-config... no
checking for XORG... configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables XORG_CFLAGS
and XORG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see .
See `config.log' for more details.
systemp5:/opt/xf86-video-mga-1.4.2 #


12. I tried to install it through YaST

systemp5:/opt/xf86-video-mga-1.4.2 # yast -i pkg-config
systemp5:/opt/xf86-video-mga-1.4.2 #
But nothing happened

Solution at last

1.Configured display using xorgconfig
The driver got setup automatically was "mga"

But while trying to start X11 using startx it showed the following error message

Error while loading module atimisc10b
No driver found
No screens found
No device to configure ,etc
2.In the IBM FAQ it was said that XFree86 should be able to use a frame buffer device
when running SUSE on a pseries , which has a Matrox G400 graphics card

So i decided to force it manually ,edited the Device Section for the Monitor
Replaced the
Driver "vga" entry by
Driver "fbdev"

Now it looks like below
Section "Device"
Identifier "Matrox"
# Driver "vga"
Driver "fbdev"
# unsupported card
#VideoRam 262144
# Insert Clocks lines here if appropriate
EndSection

3. Started X11 by startx

It showed an error related with resolution
The error was just a graphical message displaying "Hz ?"



4.So again edited /etc/X11/xorg.conf and replaced the

Modes "1280x1024" "1024x768" "800x600" "640x480"
with
Modes "1024x768"
under the Subsection "Display"
So now it looks as
Subsection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubsection

5. And the Defaultdepth was set to "24" in the "Screen" Section
6. X11 Display got workig after this
7.But there were problems related with Horizontal and Vertical Refresh Rates.And the
USB mouse was also not working
So looked into the Rerfresh Rates under the
"Monitor" Section and set as

HorizSync 30 - 70
VertRefresh 40-160

8.Mouse device got detected was /dev/device-mapper

After referring the YaST Hardware Database it is clear thet the Mouse device is /
dev/input/mice . So edited the "InputDevice " Section for mouse as below

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Busmouse" # Bus Mouse
## Option "Device" "/dev/device-mapper"
Option "Device" "/dev/input/mice"


9. But it didn't help.The mouse didn't work

Again looked into the same .And this time I just commented the
Option "Protocol" Section
and commented out "Resolution 256"
as shown below
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
## Option "Protocol" "Busmouse" # Bus Mouse
## Option "Device" "/dev/device-mapper"
Option "Device" "/dev/input/mice"
# Mouse-speed setting for PS/2 mouse.
Option "Resolution" "256"
# Option "BaudRate" "9600"
Option "SampleRate" "150"
Option "ZAxisMapping" "4 5 6 7"
Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
EndSection

After this everything got working except the Colour depth . It displays a lower bit Colour Pattern

Tuesday, July 10, 2007

Installation of JBoss on Suse 10 with IBM p5

SuSe 10.2 on IBM P 520 with Apache2 ,Tomcat 6 ,JSDK 1.4.2 and Jboss 4.0.5.GA
Reference for known problems
http://entropy.brneurosci.org/linuxsetup82.html

Installed SUSE 10
Patitiions
/dev/sda1 is of type PReP.And its size is 10 MB

/dev/sda5 9.9G 1003M 8.4G 11% /
/dev/sda2 99M 18M 77M 19% /boot
/dev/sda8 26G 345M 25G 2% /home
/dev/sda6 9.9G 1.7G 7.7G 18% /usr
/dev/sda7 20G 291M 19G 2% /var

1. X display system was not working during the Installation and after installation.
An error message describing about insufficient memory was displayed at the startup of
installation.But its not able to get into BIOS settings.
But it is working remotely through SSH.So the problem is it is not having the
proper driver for the monitor connected.
Tried
a. xf86config
b. xorgcfg
3. yast -i xorg-x11*

2. useradd won't work
We can add a user called USER by
1. mkdir /home/USER
2. useradd -d /home/USER -g USER USER
Default group is "users" Group ID will be "100"
But in this way no SKEL files like .profile get created inside /home/USER
So it is wise to add users through YaST.

3.Instead of this we can use YaST to add new users.But here also the primary group wil
be "users"
4. Installed Postgresql,MySQL,Java,Qt,Apache and related dependancies through YaST
interface.
5.Downloaded apache-tomcat-6.0.13-src.tar.gz from http://tomcat.apache.org
Added user tomcat
Extracted apache-tomcat-6.0.13-src.tar.gz into /home/tomcat
Changed the ownership.
chown tomcat.tomcat apache-tomcat-6.0.13-src

Set up CATALINA_HOME=/home/tomcat/apache-tomcat-6.0.13-src
Exported CATALINA_HOME.
6.systemp5:~ # rpm -qa java*
java-1_4_2-ibm-jdbc-1.4.2.s4-23.4
java-1_4_2-ibm-devel-1.4.2.s4-23.4
java-1_4_2-ibm-1.4.2.s4-23.4
systemp5:~ # which java
systemp5:~ #

The Jboss application need JDK 1.4.2 or above and all of the Projects by our team are based on this. So I decided to update Java to 1.4.2

systemp5:~ # rpm -e java-1_4_2-ibm-jdbc-1.4.2.s4-23.4
systemp5:~ # rpm -e java-1_4_2-ibm-devel-1.4.2.s4-23.4
systemp5:~ # rpm -e java-1_4_2-ibm-1.4.2.s4-23.4
systemp5:~ # rpm -e IBMJava2-142-ppc64-JRE-1.4.2-8.0
systemp5:~ #

7.Added user jboss with HOME dir as "/home/jboss" and primary group as “users”
through YaST
8. Downloaded IBMJava2-142-ppc64-JRE-1.4.2-8.0.ppc64.rpm and IBMJava2-SDK-
1.4.2-8.0.ppc64.tgz from

https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?
source=lxdk&S_PKG=ip64142sr8&cp=UTF-8&S_TACT=105AGX05&S_CMP=JDK

Reference : http://e-docs.bea.com/platform/suppconfigs/configs81/
sles9_powerpc/81sp2.html#92397

9. Installed IBMJava2-142-ppc64-JRE-1.4.2-8.0.ppc64.rpm

systemp5:/home/jboss # rpm -ivh IBMJava2-142-ppc64-JRE-1.4.2-8.0.ppc64.rpm
Preparing... ########################################### [100%]
Checking the Kernel Version.....
1:IBMJava2-142-ppc64-JRE ########################################### [100%]

Copied and IBMJava2-SDK-1.4.2-8.0.ppc64.tgz to /home/jboss
then extracted IBMJava2-SDK-1.4.2-8.0.ppc64.tgz

jboss@systemp5:~> tar xzf IBMJava2-SDK-1.4.2-8.0.ppc64.tgz


10. Downloaded jboss jboss-4.0.5.GA.zip from
http://sourceforge.net

Reference : http://www.novell.com/coolsolutions/feature/14912.html#1.0

Documentation for installation is available at
http://labs.jboss.com/jbossas/docs
11. Then extracted jboss-4.0.5.GA.zip inside /home/jboss
systemp5:/home/jboss # pwd
/home/jboss
systemp5:/home/jboss #
systemp5:/home/jboss # unzip jboss-4.0.5.GA.zip



inflating: jboss-4.0.5.GA/server/minimal/conf/jndi.properties
inflating: jboss-4.0.5.GA/server/minimal/conf/log4j.xml
inflating: jboss-4.0.5.GA/server/minimal/lib/jboss-management.jar
inflating: jboss-4.0.5.GA/server/minimal/lib/jboss-minimal.jar
inflating: jboss-4.0.5.GA/server/minimal/lib/jnpserver.jar
inflating: jboss-4.0.5.GA/server/minimal/lib/log4j.jar
systemp5:/home/jboss # cd jboss-4.0.5.GA/

systemp5:/home/jboss/jboss-4.0.5.GA # cd bin/
Then tried to nitialize jboss

systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./jboss_init_suse.sh start
JBOSS_HOME does not exist as a valid directory : /opt/jboss
systemp5:/home/jboss/jboss-4.0.5.GA/bin #
systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./jboss_init_suse.sh start
Starting JBoss application server: -su: /opt/jboss/log/jboss.log: No such file or directory
done
systemp5:/home/jboss/jboss-4.0.5.GA/bin #


systemp5:/home/jboss/jboss-4.0.5.GA/bin # mkdir /opt/jboss
systemp5:/home/jboss/jboss-4.0.5.GA/bin # mkdir /opt/jboss/log


systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./jboss_init_suse.sh start
Starting JBoss application server: -su: /opt/jboss/log/jboss.log: Permission denied
done
systemp5:/home/jboss/jboss-4.0.5.GA/bin #

systemp5:/home/jboss/jboss-4.0.5.GA/bin # chmod 777 /opt/jboss/log
systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./jboss_init_suse.sh start
Starting JBoss application server: done
systemp5:/home/jboss/jboss-4.0.5.GA/bin #


systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./jboss_init_suse.sh stop
Shutting down JBoss application server: -su: java: command not found
failed


systemp5:/home/jboss/jboss-4.0.5.GA/bin # echo $JAVA_HOME
/usr/lib/jvm/java
systemp5:/home/jboss/jboss-4.0.5.GA/bin # echo $JRE_HOME
/usr/lib/jvm/java/jre

systemp5:/home/jboss/jboss-4.0.5.GA/bin # which java
systemp5:/home/jboss/jboss-4.0.5.GA/bin #


11 . Set up JAVA_HOME and PATH

systemp5:/opt/jboss # export
PATH=/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bi
n:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/
lib/mit/sbin:/usr/local/IBMJava2-ppc64-142/bin/

systemp5:/opt/jboss # export JAVA_HOME=/home/jboss/IBMJava2-ppc64-142/
systemp5:/opt/jboss # export JRE_HOME=/home/jboss/IBMJava2-ppc64-142/jre


systemp5:/opt/jboss/bin # ./jboss_init_suse.sh stop
Shutting down JBoss application server: -su: java: command not found
failed
systemp5:/opt/jboss/bin # ./jboss_init_suse.sh start
Starting JBoss application server: done
systemp5:/opt/jboss/bin # ./jboss_init_suse.sh stop
Shutting down JBoss application server: -su: java: command not found
failed
systemp5:/opt/jboss/bin #

After reading the readme.html it is found that this "jboss_init" script won't work .we have to execute the "run.sh" script

It is said that
"The -server flag is not supported by the IBM JVM, so it now conditionally set by the run.sh/run.bat scripts"




systemp5:/home/jboss/jboss-4.0.5.GA/bin # pwd
/home/jboss/jboss-4.0.5.GA/bin


systemp5:/home/jboss/jboss-4.0.5.GA/bin # ./run.sh
=========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /home/jboss/jboss-4.0.5.GA

JAVA: /home/jboss/IBMJava2-ppc64-142/bin/java

JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

CLASSPATH: /home/jboss/jboss-4.0.5.GA/bin/run.jar:/home/jboss/IBMJava2-ppc64-142/lib/tools.jar

=========================================================================

17:26:06,463 INFO [Server] Starting JBoss (MX MicroKernel)...
17:26:06,465 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
17:26:06,467 INFO [Server] Home Dir: /home/jboss/jboss-4.0.5.GA
17:26:06,467 INFO [Server] Home URL: file:/home/jboss/jboss-4.0.5.GA/
17:26:06,468 INFO [Server] Patch URL: null
17:26:06,468 INFO [Server] Server Name: default
17:26:06,469 INFO [Server] Server Home Dir: /home/jboss/jboss-4.0.5.GA/server/default
17:26:06,469 INFO [Server] Server Home URL: file:/home/jboss/jboss-4.0.5.GA/server/default/
17:26:06,469 INFO [Server] Server Log Dir: /home/jboss/jboss-4.0.5.GA/server/default/log
17:26:06,470 INFO [Server] Server Temp Dir: /home/jboss/jboss-4.0.5.GA/server/defau

This will bring the JBoss Server Up and Running

The service can be stopped by quitting by Ctrl-C or by “shutdown.sh -S”
Thereafter it was possible to get the sample page at
http://192.168.10.200:8080

Then I tried to create a custom .WAR folder with "Hello World" JSP file

jboss@systemp5:~> cd /home/jboss
jboss@systemp5:~> mkdir HelloWorld
jboss@systemp5:~> cd HelloWorld/
jboss@systemp5:~/HelloWorld> ls
jboss@systemp5:~/HelloWorld> vi index.jsp
jboss@systemp5:~/HelloWorld> mkdir WEB-INF
jboss@systemp5:~/HelloWorld> cd WEB-INF/
jboss@systemp5:~/HelloWorld/WEB-INF> vi web.xml
jboss@systemp5:~/HelloWorld/WEB-INF> cho $JAVA_HOME
-bash: cho: command not found
jboss@systemp5:~/HelloWorld/WEB-INF> echo $JAVA_HOME
/usr/local/IBMJava2-ppc64-142
jboss@systemp5:~/HelloWorld/WEB-INF> $JAVA_HOME/bin/jar -cvf HelloWorld.war *.jsp WEB-INF/
*.jsp : no such file or directory
WEB-INF : no such file or directory
added manifest
jboss@systemp5:~/HelloWorld/WEB-INF> cd ..
jboss@systemp5:~/HelloWorld> $JAVA_HOME/bin/jar -cvf HelloWorld.war *.jsp WEB-INF/
added manifest
adding: index.jsp(in = 247) (out= 163)(deflated 34%)
adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
adding: WEB-INF/web.xml(in = 68) (out= 50)(deflated 26%)
adding: WEB-INF/HelloWorld.war(in = 335) (out= 178)(deflated 46%)
jboss@systemp5:~/HelloWorld>


jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy> cd /home/jboss/jboss-4.0.5.GA/server/default/deploy
jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy>
jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy> cp ~/HelloWorld/HelloWorld.war .

cp: cannot create regular file `./HelloWorld.war': Permission denied

jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy>

boss@systemp5:~/jboss-4.0.5.GA/server/default/deploy> su -
Password:

systemp5:/home/jboss # chown -R jboss.jboss jboss-4.0.5.GA
systemp5:/home/jboss # logout
jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy>


jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy> cp ~/HelloWorld/HelloWorld.war .
jboss@systemp5:~/jboss-4.0.5.GA/server/default/deploy>


Then opened the URL

http://192.168.10.200:8080/HelloWorld

Got the right Web Page

Status
everything works fine
Thereafter set the JAVA_HOME in /home/jboss/.profile
jboss@systemp5:~> echo 'export JAVA_HOME=/home/jboss/IBMJava2-ppc64-142' >> .profile