Google

Wednesday, December 31, 2008

Installing software using yum

I tried to install trac software on my fedora machine using,
yum install trac

It gve me the following error

[root@charithhost charith]# yum install trac

Loaded plugins: refresh-packagekit

Setting up Install Process

Parsing package install arguments

Resolving Dependencies

--> Running transaction check

---> Package trac.noarch 0:0.10.5-1.fc9 set to be updated

--> Processing Dependency: subversion >= 1.1 for package: trac

--> Processing Dependency: python-clearsilver >= 0.9.3 for package: trac

--> Running transaction check

---> Package subversion.i386 0:1.4.6-7 set to be updated

--> Processing Dependency: perl(URI) >= 1.17 for package: subversion

---> Package trac.noarch 0:0.10.5-1.fc9 set to be updated

--> Processing Dependency: python-clearsilver >= 0.9.3 for package: trac

--> Running transaction check

---> Package perl-URI.noarch 0:1.35-8.fc9 set to be updated

---> Package trac.noarch 0:0.10.5-1.fc9 set to be updated

--> Processing Dependency: python-clearsilver >= 0.9.3 for package: trac

--> Finished Dependency Resolution

trac-0.10.5-1.fc9.noarch from updates-newkey has depsolving problems

  --> Missing Dependency: python-clearsilver >= 0.9.3 is needed by package trac-0.10.5-1.fc9.noarch (updates-newkey)

Error: Missing Dependency: python-clearsilver >= 0.9.3 is needed by package trac-0.10.5-1.fc9.noarch (updates-newkey)


Then I tried to install python-clearsilver using yum,
yum install python-clearsilver 
Out put as follows
[root@charithhost charith]# yum install python-clearsilver

Loaded plugins: refresh-packagekit

Setting up Install Process

Parsing package install arguments

No package python-clearsilver available.

Nothing to do

Then I tried with following,
yum search clearsilver

It gave me following results
[root@charithhost charith]# yum search clearsilver

Loaded plugins: refresh-packagekit

fedora                                                   | 2.4 kB     00:00    

Not using downloaded repomd.xml because it is older than what we have

Warning: No matches found for: clearsilver

No Matches found


So I clean yum cache using,
yum clean all

So finally, I was able to run 
yum install trac


Synergy on fedora

I used Synergy to share a single mouse and keyboard between my windows and linux(fedora 9) machine. It is really easy to set up this environment. I follow list used commands for this.

Install Synergy in windows and configure as the server.

In fedora machine, I used
yum install synergy

then edit three files.
1) /etc/gdm/Default
with
/usr/bin/killall synergyc sleep 1 /usr/bin/synergyc ip_of_my_server
2) /etc/gdm/PostLogin/Default
with
/usr/bin/killall synergyc sleep 1
There was no Default file in this location but, I rename the Default.sample file as Default using,
mv /etc/gdm/PostLogin/Default.sample /etc/gdm/PostLogin/Default

3) /etc/gdm/PostLogin/Default
with
/usr/bin/killall synergyc sleep 1 /usr/bin/synergyc ip_of_my_server

Tuesday, December 30, 2008

Linux network connection not found

When I install fedora 9 I was able to connect to internet without any problem. But when I set my LAN ip to be a static one over the LAN, I wanted to manually activate the network device,as automatically it was inactivate.

I was able to solve the problem by runnig following commands,

/sbin/chkconfig --levels 345 NetworkManager off
/sbin/chkconfig --levels 345 network on

After u run above commands, network manager icon will not be displayed any longer.

Monday, December 22, 2008

Sigiriya trip

Last saturday our family went to on a trip to Sigiriya. We enjoyed very much. All the details on Sigiriya is written in here,

Wednesday, December 17, 2008

Load an environment variable to build file

Initially I had my build file as this








But if others are also using this they may need to change the path to deploy the application. So I cange the build file to address this issue. It now looks like










and we need to add JBOSS_HOME valriable to environment variable. 

Monday, December 8, 2008

Refresh my knowledge

One of my school friends came to my home and asks me to teach him basic sql and Java SWT application programming. I had done them in the university but I have lost my memory since I haven't been involved on those areas for sometime. Some of the areas included, connecting the database through the java program, granting database permissions, using suitable database driver classes, applying SWT layouts, add look and feels, etc.

Finally, I refreshed my knowledge and my friend was happy as he learnt the basics. This tutorial helped me lot in teaching him the above stuff,


Thursday, December 4, 2008

Useful Linux commands

When I was installing Oracle 11g database I found some useful Linux commands. I here summarized what I learnt there. For further details refer to Oracle 11g database Linux installation guide.

To determine physical RAM size

grep MemTotal /proc/meminfo

To get the system architecture

grep "model name" /proc/cpuinfo

To determine the size of the configured swap space

grep SwapTotal /proc/meminfo

To get available ram and swap space

free

Determine the distribution and version

cat /proc/version

To find the kernel version

uname -r


To find size of folders or files,

du -h


To determine required packages are installed

rpm -q package_name

To find free disk space of the system

df -k

If it need to extend the search to a directory

df -k /path_to_folder_name


Tuesday, October 28, 2008

change tomcat port integrated in eclipse

By changing the tomcat port (8080) in tomcat/conf/server.xml will not affect if we start the server form eclipse IDE.

So need to change the port in server.xml which is in the workspace\Servers\Tomcat vx.x Server at localhost-config\. Ths can be edit from the eclipse IDE, in the project called "Servers"

Sunday, October 26, 2008

Oracle impdp/ expdp

When I try to export a table in Oracle database using the following command,
expdp hr/hr DIRECTORY=exp_dir DUMPFILE=tables_exp.dmp TABLES=employees

I got the following error
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name exp_dir is invalid


You need to create a directory by loging to sqlplus from ad hr
for windows...
create directory exp_dir as 'D:directory';

then exit from sqlplus and issue the previous command

Tuesday, September 23, 2008

cron jobs in linux

Linux provides users to schedule their jobs perioducally using crontab[0]. 
It is a realy easy task to add an entry to schedule the user task. You can list the current cron jobs using 
$crontab -l
and, you can edit it by 
$crontab -e
Use the reference for parameter settings.

One problem with this is, crontab doesn't return us the error message if it can't run the task. So it is really hard to find the problem. I had a similar problem where I had a wrong entry for the JAVA_PATH in the script. But when I run the script from the command prompt it works fine since the console knows the JAVA_PATH on its own.

Here is a very simple shell script that can be used to run a java program.

#!/bin/sh

PATH=your_java_home:${PATH}
cd point_to_the_java_directory

java class_name


And here is the simple crontab entry to run the script for every minit

* * * * * sh path_to_script/script_name



Tuesday, June 3, 2008

Laptop

I bought a laptop!!! Thanks to google and my sister. I spend some money from summer of code and rest from my sister to buy a HP compaq 6720s laptop. I got it for a reasonable offer.
Now I can work in any place, in thunderings, in power cuts.

Friday, May 30, 2008

First Class!!!

I am really happy today, I got a first class :). Results were out today, our batch had perform well. It is said to be that our batch is the ever best batch in our department. I am happy to be a member of it.

By the time, I learn how to restore a database using a dump file. Here is the command for Oracle,
imp username/password file="filepath"

And I learn how to create public and private key pair in a Unix machine. It is very easy, here is the command,
ssh-keygen -t dsa

Tuesday, April 22, 2008

Application accepted!!!!!

Beautiful day!!!. I was selected for the GSoC 2008. I thrilled when I saw the mail. I hope I can successfully complete the project at the end. Good luck for other students!!

Monday, March 31, 2008

Google Summer Of Code

It's interesting time. Open Source world beautiful!!!
I learned lot of open source products and developing organizations with in this period. It is interesting to chat in IRC channels. Since there are many skilled developers(Mentors) answer our questions I learned lot of things.
I specifically experience how to emphasis a person that his belief is wrong, in a cool manner. It would be nice to do the developments, I need to be selected!!!!

Thursday, January 17, 2008

Interesting week

I would say previous week was a interesting week!!! ;)
I add lot of things to my life during this week. University was started after three weeks break due to a students fight. After the vacation we were given a assignment on various topics regarding this incident. So we had to write a report and present it in front of the staff. We had to complete a survey and figure out the reasons for this fight and how the background sets for this violence.
As from the survey summered most of the student thought all most all should be responsible for this situation. As I think if a person did some violation he should be punished. But if the people understand their weaknesses and apologies for the mistakes, they should give some chance.
For an example prisoners are used in social works. If a person kill another and goes to the prison, there is some chance that he will kill another guy even when engaged in these social works. But most of the time they learn and tend to be a good person. If he is keep aside thinking of this risk there is high probability to become a worse person.
As human we do mistake most of the time accidentally, but there should be a guidance to people who learn from the mistakes.