Friday, March 25, 2011

SSH and SCP

This looks at how to SSH and SCP on default and non-standard ports

SSH
running on default port is 22.
 ssh <user>@<host>  (e.i ssh foouser@barserver)

running on non-standard port.
 ssh -p  <port> <user>@<host>  (e.i ssh -p 2000 foouser@barserver)

SCP
running on default port is 22.
 scp <file> <user>@<host>:<host-path-to-copy>  (e.i scp foo.txt foouser@barserver:/home/foouser/directory1)

running on non-standard port.
 scp -P <port> <file> <user>@<host>:<host-path-to-copy>  (e.i scp -P 2000 foo.txt foouser@barserver:/home/foouser/directory1)

Building WSO2 Carbon from WSO2 SVN trunk

Environment
Ubuntu 10.04

Applies To
WSO2 Carbon source trunk as of 22nd March, 2011.

Prerequisite
Install the following softwares,
JDK version 1.6.x
Mavan2 version 2.1.x
Subversion
- sudo apt-get update
- sudo apt-get install subversion

Environment Setup
Open up a terminal and type,
$ gedit ~/.bashrac &

Add the following lines at the end of ~/.bashrc file, which can be located under your home directory($HOME)
JAVA_HOME=
e.g: JAVA_HOME=/home/fazlan/sw-installables/jdk-1.6.22

M2_HOME=
e.g: M2_HOME=/home/fazlan/sw-installables/apache-maven-2.1.0

PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

Save and close the file.

Verify the version of them,

$ java --version
$ mvn --version

Checkout WSO2 Carbon
Create a directory to checkout the source code.
$ mkdir wso2-svn

Checkout the carbon source code from wso2 trunk to the directory just created.
$ cd wso2-svn
$ svn checkout http://svn.wso2.org/repos/wso2/trunk/carbon

Build WSO2 Carbon
Once the checking out of the source code is completed, you can build the code

$ mvn install -Dmaven.test.skip=true
Note: maven.test.skip=true - this will stip the test cases

WSO2 carbon needs to be build in the following order,

buidling dependencies required by carbon,
$ cd carbon/dependencies
$ cd carbon/orbit
$ cd carbon/service-stub
$ cd carbon/core
$ cd carbon/components
$ cd carbon/feature

building products,
$ cd carbon/products
where you can build a specific product by providing -Dproduct= property.
values can be = appserver, bam, bps, brs, cep, ds, esb, greg, gs, is, mb, ms
e.g mvn install -Dmaven.test.skip=true -Dproduct=greg

Possible Build-time Problems and Solutions
You might encounter certain problems while building the code,

problem: exceeding the number of open file descriptor
solution: increase the number of open file descriptor count
$ su
enter root password:
root $ gedit /etc/security/limits.conf &
Enter the following lines at the end of the file

* soft nofile 65536
* hard nofile 65536

Save and close file.
Summary
This post is aimed to help you building the WSO2 Carbon platform from the WSO2 SVN trunk and this post will be updated accordingly in the future to reflect the build statergy of wso2 carbon.