Posted by & filed under Linux, Software.

Today i describe the few steps of installation of subversion (with repository) on Linux (Debian lenny). That description show the installtion proccess in 5 steps. And the configuration of Apache Mod-DAV as additiona information. So let’s start.

Step 1: Install subversion

If subversion is not installed, install it with:

$apt-get install subversion

Read more »

Posted by & filed under Linux.

Today i’ll give you some interesting examples of using lsof command.

lsof stands for “list open files”. So actually it shows all files used by some processes of a system. That command exist on most of and on different Linuxes and Unixes.
It bases on architecture of a kernel which causes evety procces to hold it used files in /proc – (a virtual file-system).  A typical hierarchy wold look like:

/proc/process id/fd/file descriptor

In the absence of any options, lsof lists all open files belonging to all active processes of a system. But that is to much for most cases, because many of cases are networkrelated. An if you consider that sockets are files in linux we can use lsof to search fo them. Read more »

Posted by & filed under Off topic, Personal.

I noticed that my last post was  a 101 post on this blog which is good occasion to do some self evaluation.

I started to write here in January 2007 it’s nearly 4 years ago. You see I’m not very productive blogger. Nevertheless i wrote some interesting things which have attracted some people or comments. Here some of them chronologically:

I’ve learned pretty much and i tried different themes. I think in the future i will write more and more technical stuff. So e.g. Java comes to short so far also web technologies where not covered while i have to do with them relatively often. Read more »

Posted by & filed under Hardware, Linux, Personal, Software.

Yesterday i  installed Ubuntu (10) linux alongside of Windows XP (SP3) on my Lenovo Thinkpad T60 – meanwhile 4 years  Laptop. To be short  i observe only start-time of both system on the same machine in this post.

Here some hardware details:

  • Intel Core Duo (T2400 -1,83 Mghz)
  • 1 Gb RAM
  • 60 GB 5400rpm  hard drive

An here are starttimes on two Systems (in seconds):

Windows vs. Ubuntu startup times

As we see Windows takes 1 minute from OS-Selection dialog till User-login dialog, whereas Ubunto takes  only 24 sec. Ok, windows checks  “security chip” (what it exactly means and why it so good for me i don’t know)  and that takes considerable time and i’m unsure whether Ubunto do something like this, but however i can’t change it.

On a graph we see also, that for the rest of “loading work” from login till first page appears in firefox browser windows takes more time again. It takes 95 seconds whereas Ubunto need only 19!  I was clicking on browser Icon as soon it appeared and was “clickable” and waited till pre-selected starting page (google) appears.

Of cause tas is not very strict measurement so maybe I’ve lost one or two seconds somewhere, who cares if

  • Ubunto takes 24+19 =43 sec
  • Windows takes 60+95 = 155 sec

till i can use my typical day by day application. So now i can save more than a one and halfe minute of my life on every start of a system.

Respect Ubuntu, keep on going!

Posted by & filed under Software, Software Development.

Java community processHere give a short overview of important JSR of Java Community Process which define and standardises  WebServices development on Java Platform.

  • JSR-175: A Metadata Facility for the JavaTMTM Programming Language. Also known as Java Annotations e.g. @Deprecated or @Override.
  • JSR-181: Web ServiceMetadatata for the Java Platform. This is just a set of Annotations for using with JAX-WS WebServiceses. Think of  Annotations @WebService, @WebMethod…
  • JSR-101: API for XML-based RPC: JAX-RPC 1.1. Definiton of RCP call with SOAP Messages, Type Mapping between Java  and XML.
  • JSR-109: Implementing Enterprise Web Services Definiton of WebsServices based on JAX-RPC which is now accessed by JAX-WS. That early standard defined WebServiceses for J2EE 1.4. It enabled implementation of Web-Serviceses as Endpoints over Enterprise Session Bean’s (EJB 2 generation with awful  XML descriptors).
  • JSR 183: Web Services Message Security APIs
  • JSR-224: The Java API for XML-Based Web Services (JAX-WS) 2.2
    • Final Release 05.2006 (Version 2.0 JEE 5) ,Last Maintenance 12.200Verisonon (2.2 JEE 6).
    • Current state of the art
    • Relies on its own Architecture for XML Binding JSR -222
    • Of course supports Annotations JSR -181
    • Implementations: Apache CXF, JBoss WS, JAX-WS as Sun’s Ref. Implementation
  • JSR-311: JAX-RS: Java TM API RESTful Web Services
    • Final Release 10.2008
    • Part of JEE 6
    • AlWeb Servicesvices of REST Style jusPOJOsPOJOs
    • Mseen ssen such typical Annotations like: @Path , @GET,@PUT, @POST,@DELETE
    • Implementations: Apache CXF, Apache Wink, Resteasy as part of JBoss/Tomcat,   Jersey – Sun’s Ref. implementation.

Did I forgot something?

Posted by & filed under CMS, Linux, Personal, Software, Software Development, Web Development.

Probably most of modern IT related people know Atlassian JIRA – issue and project tracking system. Maybe many of you know other popular tracking system like Bugzilla, GNATS, und many many others. Personally I like JIRA last but not least because i worked many years with it and I’m impressed of a simplicity of the work flow and the realisation of the concepts around it.

However this is not one post which should bring JIRA near to you. But if you know that you need it, now is best time to get it, because Atlassian started their “Get Startet” Price, which now allows you to by full functional JIRA for 10$ for ever even with one year support. All you need is a little bit of free CPU time, root access, 10$ and if you buy it outside of USA, you will need a credit card.

I installed it  for my private purposes and it works fine! I just followed Atlassian documentation (Read it carefully). Maybe, the easiest way is to install the “all in one” solution which comes with Apache Tomcat. I choosed that one. But don’t forget to switch to serious database before you start really using it. Take MySQL for example like I did.

I will not provide here step by step how to do it, because Simon has already described some of the important configurations moments as he heard about new pricing :) and as already mentioned the Atlassian installation guide is good and really answered all my questions.

Nevertheless feel free to ask questions here, about installation and configuration to.

Also i would like to discuss other Atlassian developer tools which also available for 10$. Is here outside someone experienced in bamboo?

Posted by & filed under Off topic.

Queen Elizabeth II head of the Commonwealth and daugher of George VI. She was born on 21 April 1926 and have seen lot of politics and historical acts in her life, because now she is 84!
As her father dies in 1952, she become the Queen regnant an met 11 Presidents of United States till now:

Posted by & filed under Linux.

Today I’ll describe short, how to configure sending of emails with your Debian or other Linux distribution. The ability of sending mails is very useful feature for every long-running server machine, it’s easy and common way to notify the administrator on problems.

Here are configurationsteps for mail-sending with Exim and Googlemail account (google Apps accounts work the same way too).

  1. first of all we need working Exim. If not installed – install exim4.
    $ apt-get update
    $ apt-get install exim4
    
  2. Configuration should start after the installation. However you can start configuration of exim every-time with
    $ dpkg-reconfigure exim4-config
    
  3. Answer the questions of configuration wizard. The important one is.
    a general type of mail configuration. Choose “sent by smarthost
    if you wanna use the ability of e.g. Googlemail account. Then SMTP with dynamic IP would be difficult ;)
  4. answer other questions
    • Provide a System Mail Name: e.g. mycompany.com
    • Provide IP addresses to listen on for incoming SMTP connections
      User 127.0.0.1 if you don’t want only send mail from local machine and nothing for all IP’s.
    • Provide Machine handling outgoing mail for this host (smarthost): smtp.gmail.com::587

    Other parameter are not so important for a start. However read more about debconf questions and other configuration if you like.

  5. Now it’s time to provide credentials information of your gmail account. Therefore you need edit /etc/exim4/passwd.client file with your favorite editor.
    Insert that for Standard or google app account but replace with valid mail and password.

    gmail-smtp.l.google.com:yourYourMail@googlemail.com:yourPass
    *.google.com:yourYourMail@googlemail.com:yourPass
    smtp.gmail.com:yourYourMail@googlemail.com:yourPass
    
  6. Make sure /etc/exim4/passwd.client belongs to user root and group Debian-exim which is normal so on my Debian. If not, run that command:
    $ chown root:Debian-exim /etc/exim4/passwd.client
    
  7. Actualize the whole configuration with:
    $ update-exim4.conf
    

    Your ‘re done!

Now it’s test it with.

echo "Server Mail Test Message " | mail -s "Just Test" SomeMail@someDomain.org

Watch logs:

$ tail -1000f /var/log/exim4/mainlog

When you see something like this. Everything should vent perfect.

2010-02-14 23:00:26 1NgmVu-0007v8-Kt < = root@mail-server1.mycompany.com U=root P=local S=424
2010-02-14 23:00:28 1NgmVu-0007v8-Kt => testMail@mycompany.org R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [72.14.221.109] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com"

Posted by & filed under Humour.

What should young people do at a long, cold, rich of snow and boring winter. A winter like in Magadan town.
Here the answer ;)

Never heard of Magadan?
Magadan is associated with far far east of Russia. It is associated with cold and people-less places, taiga, beautiful nature and interesting people. Of course this Region is famous for former Soviet GULAGs too.

Posted by & filed under Linux, Software.

SSH (Secure Shell) allows simple establishment of encrypted and authenticated connection between computers. Today i describe how easy it is do establish such SSH tunnels without using a password. You may need such connections when they have to be opened by daemons (e.g. Cron) without user interaction.

Two words on theory. Password-less connections have to be authenticated at least so strong like the password enabled one, so asymmetric cryptography which enables certificates comes into play.  The clue is to have private and public keys and share your public key with domains which should be able identify you.

So therefore let’s start by generation a needed key-pair.

Generating Keys

It is possible to create key with pass-phrase and without (or empty pass-phrases). I prefer to not use pass phrase because it is asked every-time on later usage of a ssh.
Even there are ways to gives the pass-phrase to ssh command, but it is more work, with no significant security benefits. So i do the following statement and do not enter any pass-phrase (just hit enter on question).

$ ssh-keygen -t rsa

This will create RSA key-pair as following files in ~/.ssh directory:

  • id_rsa
  • id_rsa.pub

Now public key need to be copied to remote host and has to be added to end of ~/.ssh/authorized_keys file.

Transfer Public keys

The best way to do it is to use ssh-copy-id program which is inside of many linux distributions.

$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-user@remote-server.org

In that case everything is done automatically and you are ready after that. But if ssh-copy-id is not available, you can copy keys manually e.g. like that.

$ cat ~/.ssh/*.pub | ssh remote-user@remote-server.org 'umask 077; cat >>.ssh/authorized_keys'

Attention! On some linux distrs SSH2 searches for keys in ~/.ssh/authorized_keys2 . Not so in actual Debian (Lenny), but seems to be so in SuSe linux.

Test

Now remote login, scp and sftp can be used without password.
Test it:

# establish connection
$ ssh remote-user@remote-server.org
#or copy files secure and password-less.
$ scp /home/user/some-file remote-user@remote-server.org:/some-path/dir/

More information on SSH related man pages.

Posted by & filed under Linux, Software.

This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x “Lenny” ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard  file system hierarchy. Also init.d. scripts configuration is given here.

Installing Java SDK

Nowadays  installing Java environment on Debian is an easy task. I used JDK 1.6. Don’t confound JDK with JRE, because bare Java Runtime Environment is not enough for running JBoss. Debian Wiki maintains (hope) a list of available java .deb packages, which are easily can be installed with your preferred way. I prefer aptitude, but apt-get of course works too.

$ aptitude install sun-java6-jdk
#or by good old apt-get.
$ apt-get install sun-java6-jdk

Installation is done after seconds. Now test your java installation with

$ java -version
# Here example result on my configuration:

java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

If you get something like this, you’re done and your java should be already in the PATH.

Installing JBoss AS

Now let’s install  JBoss Application Server.

Preparing

Normally you are not willing  to start services (especially when they are accessed from outher machines) with root privileges. Therefore we have to define new user and group which will be used to manage JBoss.  So next line will create new group and new user with this group.

 $ groupadd jboss
 $ useradd -s /bin/bash -d /home/jboss -m -g jboss jboss

This jboss user has no password, so nobody can login with this username. If you consider to  login with jboss user,  password has to be set. Use passwd jboss command for that.

Download, Installation,  filesystem layout

Now  download desired Jboss version. I started with JBoss 5.1.0 GA, which can be download with:

$ cd /tmp # swithch to temp dir
$ wget http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip/download

Check also the whole list of verisons if interested. As you may noticed JBoss binaries are packaged with ZIP. So it is comfortable to use unzip tool. Maybe you have to install it first.

But before you extract  downloaded file, we have to decide, where exactly should JBoss files be placed on a  file-system. Unfortunately JBoss is not quite conform to Linux File System Hierarchy Standard per default, so there are many possibilities for a location configuration. Some of you may want to place JBoss  into /opt directory. But I prefer to split the installation a little bit and  want to start by putting  JBoss core files in /usr/local/, where local, unchangeable and read-only files usually placed. E.g. I use  /usr/local/jboss/510 as JBoss 5.1.0 GA root.  So let’s create that location and extract files into it.

mkdir /usr/local/jboss #create new jboss directroy
chown jboss:jboss /usr/local/jboss #now its belongs touser jboss and group jboss
su jboss
mkdir /usr/local/jboss/510
cd /usr/local/jboss/510
unzip /tmp/jboss-5.1.0.GA.zip

At this moment you should have new working JBoss. If you want, test it with

bin/run.sh -b 0.0.0.0

Where -b 0.0.0.0 means that JBoss is listening for every ip address of current machine.

However at this stage the installed Jboss still brakes the  Linux Filesystem Hierarchy Standard, so let’s improve this situation.

Read more »