Unix Scenario 5

  1. Installation
  2. Functional Test

Installation

Set up

  1. Use CentOS 5.2 vm server (tick)
  2. Install wildfire (tick)
  3. mysql server (tick)
  4. Install JDK6 (tick)
  5. Install LAMS (tick)

CentOS 5.2 VM

Downloaded from http://www.vmware.com/appliances/directory/60819

Installling Wildfire Jabber server

Installing version 2.6.2

[root@localhost tmp]# wget http://www.igniterealtime.org/builds/wildfire/wildfire_2_6_2.rpm
--19:44:27--  http://www.igniterealtime.org/builds/wildfire/wildfire_2_6_2.rpm
Resolving www.igniterealtime.org... 70.98.39.60
Connecting to www.igniterealtime.org|70.98.39.60|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22304489 (21M) [text/plain]
Saving to: `wildfire_2_6_2.rpm'

100%[==========================================================================================================>] 22,304,489   178K/s   in 2m 1s  

19:46:39 (180 KB/s) - `wildfire_2_6_2.rpm' saved [22304489/22304489]

[root@localhost tmp]# rpm -ivh wildfire_2_6_2.rpm 
Preparing...                ########################################### [100%]
   1:wildfire               ########################################### [100%]
Preparing JRE ...
[root@localhost tmp]#  wildfire start
Starting wildfire
nohup: appending output to `nohup.out'
[root@localhost tmp]#

See further info for Wildfire Configuration

Installing MySQL Server

Using Yum

[root@localhost ~]# yum install mysql-server
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * base: mirror.files.bigpond.com
 * updates: mirror.files.bigpond.com
 * addons: mirror.files.bigpond.com
 * extras: mirror.files.bigpond.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.i386 0:5.0.45-7.el5 set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Running transaction check
---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 mysql-server            i386       5.0.45-7.el5     base              9.7 M
Installing for dependencies:
 perl-DBD-MySQL          i386       3.0007-2.el5     base              148 k

Transaction Summary
=============================================================================
Install      2 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 9.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mysql-server-5.0.4 100% |=========================| 9.7 MB    00:01     
(2/2): perl-DBD-MySQL-3.0 100% |=========================| 148 kB    00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: perl-DBD-MySQL               ######################### [1/2] 
  Installing: mysql-server                 ######################### [2/2] 

Installed: mysql-server.i386 0:5.0.45-7.el5
Dependency Installed: perl-DBD-MySQL.i386 0:3.0007-2.el5
Complete!
[root@localhost ~]# /etc/init.d/mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
                                                           [  OK  ]
Starting MySQL:                                            [  OK  ]
[root@localhost ~]# mysql -u root -p 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \q
Bye
[root@localhost ~]# 

Installing Java JDK6

Download from http://java.sun.com

 
[root@localhost tmp]# ls -l
total 74212
-rw-r--r-- 1 root root 75904432 Mar 10 12:04 jdk-6u13-linux-i586-rpm.bin
[root@localhost tmp]# chmod +x jdk-6u13-linux-i586-rpm.bin 
[root@localhost tmp]# ./jdk-6u13-linux-i586-rpm.bin 
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU
ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY
SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE
AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE
TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE
AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT
CONTINUE.
....
Do you agree to the above license terms? [yes or no]
yes

Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u13-linux-i586.rpm  
  inflating: sun-javadb-common-10.4.1-3.1.i386.rpm  
  inflating: sun-javadb-core-10.4.1-3.1.i386.rpm  
  inflating: sun-javadb-client-10.4.1-3.1.i386.rpm  
  inflating: sun-javadb-demo-10.4.1-3.1.i386.rpm  
  inflating: sun-javadb-docs-10.4.1-3.1.i386.rpm  
  inflating: sun-javadb-javadoc-10.4.1-3.1.i386.rpm  
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
Preparing...                ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for 
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in 
the JDK installation directory) in a browser.

For more information on what data Registration collects and 
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....

 
Done.
[root@localhost tmp]#  java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
[root@localhost ~]# 

Installing LAMS

JBoss 4.0.2

 wget http://transact.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.2.tar.gz
--20:00:01--  http://transact.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.2.tar.gz
Resolving transact.dl.sourceforge.net... 202.55.147.10
Connecting to transact.dl.sourceforge.net|202.55.147.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 61652409 (59M) [application/x-gzip]
Saving to: `jboss-4.0.2.tar.gz'

100%[==========================================================================================================>] 61,652,409  12.8M/s   in 5.4s   

20:00:07 (10.8 MB/s) - `jboss-4.0.2.tar.gz' saved [61652409/61652409]

[root@localhost tmp]# cd /usr/local/

[root@localhost local]# tar xzf /tmp/jboss-4.0.2.tar.gz 

LAMS 2.3 Unix Installer

Get the installers from: Downloads


[root@localhost tmp]# tar xzf lams-unix-installer-2.3-20090429.1505.tar.gz 
[root@localhost tmp]# cd lams-unix-installer-2.3
[root@localhost lams-unix-installer-2.3]# 

Editting lams.properties

...
# The directory that contains your JDK. (Must be 1.5 or higher)
JDK_DIR=/usr/java/jdk1.6.0_13/
...

Running the installer

[root@localhost lams-unix-installer-2.3]# ./install-lams.sh
JDK_DIR is valid

--------------------------------------------------------------------------------

WELCOME to the LAMS 2.3 unix Installer! 

Please ensure you have read and accepted the license agreement before continuing

Make sure you have correctly configured the lams.properties file to your 
preferred settings.

You should read the installation guide before continuing.

JAVA_HOME = /usr/java/jdk1.6.0_13/

--------------------------------------------------------------------------------

LAMS requires about 117MB of space, continue with installation? (y)es, (n)o: y

Do you wish to install LAMS as a Java Service Wrapper? (y)es, (n)o, (q)uit: n

Using LAMS database with the following parameters...
Database name: lams2
Database user: lamsuser
Database password: lamsdemo

Creating LAMS database.
Buildfile: ant-scripts/configure-database.xml
Database Created.
 
Filling database with LAMS tables

Buildfile: ant-scripts/filter-config.xml
Buildfile: ant-scripts/configure-database.xml
Done.


Database Created.

Copying lams.ear directory to /usr/local/jboss-4.0.2/server/default/deploy.

Done.

Configuring JBoss with your settings.
Buildfile: ant-scripts/configure-deploy.xml
cp: cannot stat `repository/*': No such file or directory
cp: cannot stat `secure/*': No such file or directory

Configuring the java Wrapper
Copying lams.properties to /etc.


LAMS 2.3 Configuration completed!
Please view the README for instructions on how to run LAMS.

[root@localhost lams-unix-installer-2.3]#


Starting LAMS

[root@localhost jboss-4.0.2]# cd /usr/local/jboss-4.0.2/bin/
[root@localhost bin]# ./run.sh 
run.sh: Missing file: /lib/tools.jar
run.sh: Unexpected results may occur.  Make sure JAVA_HOME points to a JDK and not a JRE.
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /usr/local/jboss-4.0.2

  JAVA: java

  JAVA_OPTS: -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dprogram.name=run.sh

  CLASSPATH: /usr/local/jboss-4.0.2/bin/run.jar:/lib/tools.jar

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

20:30:44,728 INFO  [Server] Starting JBoss (MX MicroKernel)...
20:30:44,730 INFO  [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)
20:30:44,730 INFO  [Server] Home Dir: /usr/local/jboss-4.0.2
20:30:44,731 INFO  [Server] Home URL: file:/usr/local/jboss-4.0.2/
20:30:44,731 INFO  [Server] Library URL: file:/usr/local/jboss-4.0.2/lib/
20:30:44,732 INFO  [Server] Patch URL: null
20:30:44,733 INFO  [Server] Server Name: default
20:30:44,733 INFO  [Server] Server Home Dir: /usr/local/jboss-4.0.2/server/default
20:30:44,734 INFO  [Server] Server Home URL: file:/usr/local/jboss-4.0.2/server/default/
20:30:44,734 INFO  [Server] Server Data Dir: /usr/local/jboss-4.0.2/server/default/data
20:30:44,735 INFO  [Server] Server Temp Dir: /usr/local/jboss-4.0.2/server/default/tmp
20:30:44,736 INFO  [Server] Server Config URL: file:/usr/local/jboss-4.0.2/server/default/conf/
20:30:44,736 INFO  [Server] Server Library URL: file:/usr/local/jboss-4.0.2/server/default/lib/
20:30:44,737 INFO  [Server] Root Deployment Filename: jboss-service.xml
20:30:44,741 INFO  [Server] Starting General Purpose Architecture (GPA)...
20:30:45,224 INFO  [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
20:30:45,225 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 11.3-b02,Sun Microsystems Inc.
20:30:45,225 INFO  [ServerInfo] OS-System: Linux 2.6.18-92.1.18.el5,i386

...

2009-04-28 20:31:54,248 INFO  [LocaleFilter] Initializing filter 'LocaleFilter'
2009-04-28 20:31:54,248 INFO  [LocaleFilter] Filter 'LocaleFilter' configured successfully
2009-04-28 20:31:54,268 INFO  [EARDeployer] Started J2EE application: file:/usr/local/jboss-4.0.2/server/default/deploy/lams.ear/
2009-04-28 20:31:54,390 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
2009-04-28 20:31:54,698 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
2009-04-28 20:31:54,708 INFO  [JkMain] Jk running ID=0 time=0/24  config=null
2009-04-28 20:31:54,723 INFO  [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:9s:982ms

LAMS starts fine (thumbs up) (smile)

Functional Test