Monday, June 18, 2012

How to restrict ssh to the linux users

If you want to restrict or allow particular user to do a ssh you need to take following steps. Based on your configuration it will allow or restrict to do a ssh to particular user/s.

1.  Open a sshd.config file
       " vi  /etc/ssh/sshd_config "
2.   if you want to allow to do a ssh for a particular user/users. you need to add below config to sshd_config file

      "AllowUsers user1 user2"
      Ex : "AllowUsers chamara menul sandya"

3.   if you want to deny to do a ssh for a particular user/users. you need to add below config to sshd_config file


     DenyUsers user1 user2"      
     Ex :   "DenyUsers chamara menul sandya"  
  
4.  Finally save the "sshd_config" file and restart the ssh service
     Ex : /sbin/service sshd restart  (only for a red hat servers)

Wednesday, May 2, 2012

How to connect Jprofiler with WSO2 Governance Registry

What is JProfiler?
       JProfiler is GUI enabled tool that used to measure performance based measurements such as CPU usage, memory bottlenecks and thread information etc, java based applications. more info

This article will demonstrate how JProfiler used to measure performance statistics in WSO2 Governance Registry. Same time this article applies to all carbon based products in WSO2.
     You can download any carbon based servers from wso2.org to execute this article. In here i am using WSO2 Governance Registry.

1. Download WSO2 Governance Registry
2. Download JProfiler from here.
3. Extract Jprofiler zip and if you are windows run jprofiler.exe or if you are in Linux environment run jprofiler.sh in /bin directory.

Now we need to create new jprofiler project to connect with the governance registry server. Below steps will guide you to create new JProfiler project.

4. Open JProfiler start center window by clicking on the start center button.


5. Click "New Remote Integration" button.

6 . Now profiled application need to locate. If you are locating application runs in same machine, you have to select "On this computer" option. If you are profiling remotely started application in other machine, you have to select "On a remote computer" option. In this article i will use first option.























7.  Now insert your JVM information.
 






















8. Then select profile setting transmission option.



9. Click next button in  JProfiler port setting window.



10.  Copy option text listed in "perform required modification" window and that need to be copy in your CARBON_HOME/bin/wso2server.sh or .bat file like below.





















11. Now start your governance registry and Jprofiler will connect with it.


Tuesday, January 31, 2012

Linux command of removing all .svn sub directories

Following steps will be help to remove all .svn directories

1. Open Linux terminal
2. Change the directory path to project folder.
3. Type below command.
  • find ./ -name ".svn" | xargs rm -rf

Friday, September 2, 2011

How to view check-sum values in JAR file

I had couple of jar files  and i need to check bot files are same or not. Hence those are signed jars i checked check sum values both of that jars. Following are the commands i have used.

1. Open terminal and traversed to the jar file location.
    Ex :  cd /wso2/project/support

2. Do checksum as follows.
    Ex :  md5sum axis2-1.6.1.wso2v1.jar

3. You will see this output
     "18da73bd555fc231ad0ee7c93291549d  axiom-1.2.11.wso2v1.jar"




Monday, August 29, 2011

How to create user in oracle database

Following are the commands to create new user in Oracle database.

1. You have to log in to the oracle command window. In command prompt enter below command.
Syntax : sqlplus sys/DB_password@Database as sysdba;
Ex : sqlplus sys/password@orcl as sysdba;

2. Create user New_User_Name identified by password account unlock;

3. grant connect to New_User_Name;

4. grant create session, dba to New_User_Name;

5. commit;