Sunday, January 3, 2016

Highest Rated Earthquake in Bangladesh

Highest rated earthquake attacked Bangladesh at 5:08 AM local time. It's rate in rikhter scale is not known yet. But, whole dhaka city awakened at the very early in the morning.

Tuesday, July 1, 2014

7 OPEN SOURCE TOOLS FOR JAVA DEPLOYMENT

Installing Oracle 11g in Redhat linux: Few Tips

  1. Create oracle user, create a user group oinstall, assign oracle to oinstall.
  2. Configure necessary folder and variable instruction given in oracle setup in linux guideline document.
  3. Copy oracle software in your linux pc.
  4. Enable vnc server as follows if  vnc is not enable. To enable vnc, click here.
  5.  Setup oracle from user other than root. Give permission to other user to setup oracle using #xhost +.
  6. Swich user from root to other user and using #su.
  7. Open terminal. Goto directory where you copy oracle software and run oracle using # sh runInstaller.

Enable VNC service in a Redhat Linux Machine

If we want to get the graphical user interface of a linux PC from remote machine, then we have to enable the VNC service on that linux machine. We can enable the vnc by following ways in Redhat linux machine:
  1. Login to a particular linux machine with a remote login utility like putty.

BI Publisher Macro Error

I have worked on BI publisher few months ago. But today when I started to work again on BI publisher, it was not working. In add-ins tab of MS word 2007, when I checked any menu, it was showing error like The macro cannot be found or has been disabled because of your macro security setting. After googling, I have solved the problem following ways. I have searched *.exd file in my pc and renamed the exd files as back file. Then I have restarted the MS word 2007 and found everything is ok.

For more details, http://damir-vadas.blogspot.com/2011/02/macro-cannot-be-found-or-has-been.html
http://kumarsatheesh.blogspot.com/2012/04/macro-cannot-be-found-or-has-been.html
http://boddapati-peoplesoft.blogspot.com/2012/05/error-with-bi-publisher-macro-cannot-be.html

Performance Tuning in Apache Tomcat 6

http://tukhrejul.files.wordpress.com/2012/05/apache.jpgPerformance tuning is a complex area, and the factors that affect performance are sometimes out-side the application itself. These factors may include the network configuration and hardware  platform characteristics, the operating system settings, Java virtual machine parameters, database tuning parameters, and finally the architecture of the Web application itself.
Recommended approach of performance tuning:
1.     Set up a test bed.
2.    Do performance testing. Use the results of your first test run as a performance benchmark or baseline for subsequent testing.
3.    Investigate performance bottlenecks in your application, deployment environment, and other systems that it interacts with.
4.    Identify areas where improvements are needed; these might involve implementation changes as well as deployment or configuration tuning of your Web application.
5.    Make one fix.
6.    Repeat steps 2 through 5.
Step 1: Set Up a Test Bed

SSL Configuration in Apache Tomcat 6

Introduction to SSL
SSL, or Secure Socket Layer, is a technology which allows web browsers and web servers to communicate over a secured connection. This means that the data being sent is encrypted by one side, transmitted, then decrypted by the other side before processing. This is a two-way process, meaning that both the server AND the browser encrypt all traffic before sending out data.
Another important aspect of the SSL protocol is Authentication.

Why JSF?

Before JSF existed, most Java web applications were typically developed using non-standard web application frameworks such as Apache Struts, Tapestry, Spring Web MVC, or many others. These frameworks are built on top of the Servlet and JSP
standards, and automate a lot of functionality that needs to be manually coded when using these APIs directly.
Having a wide variety of web application frameworks available, often resulted in “analysis paralysis”, that is, developers often
spend an inordinate amount of time evaluating frameworks for their applications. The introduction of JSF to the Java EE specification resulted in having a standard web application framework available in any Java EE compliant application server.

Increasing JVM Size in Apache Tomcat

A Java Virtual Machine on 32-bit operating systems typically has a maximum heap size of 64Mb. The JVM heap space is where all Java objects are stored, as well as memory used by the garbage collector. Sun recommends increasing this value for server applications. We may need to increase the memory limit for better performance. We may increase the size at application level or server level.
Standalone Java Applications
The Java Virtual Machine takes two command line arguments which set the initial and maximum heap sizes:
-Xms and -Xmx. For example if you want to give your Java program needs a 64Mb initial and 256Mb maximum heap size you could launch it as follows:

java -Xms64m -Xmx256m jdbc_prog


Setting the heap size for Tomcat and Java UDRs are variations on the theme and involve figuring out where to pass these arguments to the JVM.
Apache Tomcat
To increase minimum and maximum heap size for Tomcat applications set the CATALINA_OPTS environment variable before starting Tomcat. To set the same heap sizes, on UNIX edit the Tomcat startup.sh script and add a line:

export CATALINA_OPTS=-Xms16m -Xmx256m;

Or, you may create this  environment variable at /etc/profile file in Linux. In such case, you have to reboot the system to make effective this variable.
For More details:
http://informix-zone.com/node/46?bcsi-ac-79063B1DC99A4FDC=1EC1831D00000002ERDlmuR0rs6ge6dByf9wH

Scheduling database backup in linux

We can create a corn job to run a shell script periodically. But creating a job schedule for taking database backup is subtle difference. In the script you have to write code to navigate to database bin directory and then the script for exporting.
Steps:
1. Edit the crontab using following command and add the line as below:
$crontab -e
0 19 * * * /usr/db_backup/export.sh
Scheduling backup at 7pm every day.
here,
* * * * * command to be executed
- – - – -
| | | | |
| | | | +—– day of week (0 – 6) (sunday = 0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)
Contents of export.sh:
export ORACLE_BASE=/orafs/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_2
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=remittance
exp userid=dbbl/ggg@remittance file=/usr/db_backup/remdb_$(date +%Y_%m_%d_%s).dmp log=/usr/db_backup/remdb_$(date +%Y_%m_%d_%s).log owner=dbbl buffer=200000
cron commands:
$crontab -l To list the cron jobs scheduled
$crontab -r To remove the cron job
$crontab -e To edit/schedule cron jobs
Crontab Environment:
cron invokes the command from the user’s HOME directory with the shell, /usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user’s-home-directory
LOGNAME=user’s-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Special words:
If you use the first (minute) field, you can also put in a keyword instead of a number:
@reboot     Run once, at startup
@yearly     Run once  a year     "0 0 1 1 *"
@annually   (same as  @yearly)
@monthly    Run once  a month    "0 0 1 * *"
@weekly     Run once  a week     "0 0 * * 0"
@daily      Run once  a day      "0 0 * * *"
@midnight   (same as  @daily)
@hourly     Run once  an hour    "0 * * * *
Leave the rest of the fields empty so this would be valid:
@daily /bin/execute/this/script.sh
Storing the crontab output
By default cron saves the output of /bin/execute/this/script.sh in the user’s mailbox (root in this case). But it’s prettier if the output is saved in a separate logfile. Here’s how:
*/10 * * * * /bin/execute/this/script.sh 2>&1 >> /var/log/script_output.log
For More details:
http://pdpshetty.blogspot.com/2008/06/scheduling-backup-using-crontab-in.html
http://kevin.vanzonneveld.net/techblog/article/schedule_tasks_on_linux_using_cro