Basic xserver on a vServer

1 minute read For fetching some date, my Application need a xserver. The Problem is that it's running on VM. So i install a basic xdm. I'll accessing this via VNC.
apt-get install tightvncserver
apt-get install xdm
Now starting the xdm and  tightvncserver
/etc/init.d/xdm start
tightvncserver :1
tightvncserver will ask for vnc password. This will be ask during a VNC client is connecting. Now connect to the server $IP:5901. There is a lonley bash wating  ;-)

[Gentoo]Jetty with a .WAR file

2 minute read
Jetty with a .WAR file
In my company i currenly have a lot to do with Scala Lift. We're developing some stuff with it, but because it takes a lots of time to setup a Scala environment and we need quick show solution, we'll go with a .war file. The problem on my gentoo is, there is no jetty packages, so i searched for some overlays. I still got the java-overlay. With eix jetty, i'm searching for jetty:
* www-servers/jetty [1]
Available versions: (5) ~5.1.3-r1
 {doc source test}
 Homepage: http://www.mortbay.org/
 Description: A Lightweight Servlet Engine
The jetty version is outdate, so i'm downloading the jetty from the offical webpage:
wget -c http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip
#Now unzip it
mkdir jetty && unzip jetty-6.1.26.zip -d jetty/
during the download i found a useful blog entry about jetty for debian.  How to deploy a .WAR file there. It's little bit like tomcat but just easier. Move you .WAR File to the $JETTY_HOME/webapps/ folder and start the Jetty Server.
java -jar start.jar
I found also on the overlays.gentoo an updated version of jetty, this can be found on the dustin overlay
layman -a dustin
eix-sync && eix jetty
* www-servers/jetty [1]
 Available versions: (6) ~6.1.24
 {elibc_FreeBSD}
 Homepage: http://jetty.codehaus.org/
 Description: Jetty Web Server; Java Servlet container
[1] "dustin" /var/lib/layman/dustin
I add the =www-servers/jetty-6.1.24 ~amd64 to /etc/portage/package.keywords, now install the jetty:
emerge -avq jetty
so far Akendo

Web Sources:

http://lifeofaprogrammergeek.blogspot.com/2010/06/deploying-war-in-jetty.html
http://overlays.gentoo.org/proj/java
http://gpo.zugaina.org/www-servers/jetty
http://www.gentoo.org/proj/en/java/
 

No iwlagn in Linux 3.2+

1 minute read I  installed today the new Kernel 3.2 and didn't have any Wifi, that is related to some changes in the iwlagn divers. It have being rename to iwlwifi. I keep using a static Kernel for my Laptop and so i didn't enable the new driver automatically. My first idea was that the sys-kernel/linux-firmware has to be updated. But after short check on the Wifi devices everything was clear. No Devices was found with wlan0, so  i check the driver and a try of loading the related module iwlagn. After wounder some minutes i check on the old and the new kernel. The dirver seems to be the same, just the name has change.  i reanabled the new driver, re-compile the new kernel! Everything works normaly.   I check on the h-online and found this git diffs of the kernel.
Rename the iwlagn module as iwlwifi in preparation for future
changes.  Add an alias to iwlagn for backward compatibility.
Normaly there have to a an alias, but for static kernel the driver has to renable.   so far Akendo.  
Sources:
Ubuntu Forum:"Confused between iwlwifi vs iwlagn" H-online:"Kernel Log Part 1 Network" H-online:"Kernel Log Minor gems"    

Update my Blog

1 minute read I just updated my Blog. It's now move to my a host of my own. My old blog on blogger is still online, you can reach it with original URL 4k3nd0.blogger.com or b2.blog.akendo.eu   Have fun!

How to empty swap

1 minute read Bad applications does Bad stuff with you Memor. Today my Skype decide to flood my Memory. Lucky i notified this on the right time and was able to run killall -9 skype . But what left is a overfileld Memory and swap. For the Memory itself no problem, the kernel will empty it by demand. But for my older hard drive takes ages to get it back. So the best is it to empty it. The best way to do it: swapoff/swapon.
swapoff /dev/sdb5
This take now a while but it will do the job. When it's done re-enable it with 
swapon /dev/sdb5

Debian PostgreSQL 8.4 can't create Database with UTF-8 Encoding

2 minute read The Problem I encounter a  problem with fresh  Debian VM. I create this VM for our developer, during the installation script following problem appears and stop the script:
new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.
psql:./__cre_database.sql:76: \connect: FATAL:  database "db" does not exist
psql: FATAL:  database "db" does not exist
All database in postgres was created with SQL_ASCII The Solution You have to take care that you have a right UTF-8 setting in your bash environment. When you no LC option set, the default POSFIX will be used. 
postgres=# \l
List of databases
Name    |  Owner   | Encoding  | Collation | Ctype |   Access privileges  
-----------+----------+-----------+-----------+-------+-----------------------
postgres  | postgres | SQL_ASCII | C         | C     | : postgres=CTc/postgres
template0 | postgres | SQL_ASCII | C         | C     | =c/postgres                                                      
template1 | postgres | SQL_ASCII | C         | C     | =c/postgres
                                                       : postgres=CTc/postgres(3 rows)
A check on the locale show's me that there is no UTF-8 support. The Solution is very easy. Enable UTF-8 on the Bash:
export LANG="en_US.UTF-8"
Note: You should add this to your /etc/profile! After  this, re-install postgres via apt-get:
apt-get remove --purge postgresql-8.4 && apt-get install apt-get install postgresql-8.4
Now your Postgres Databases are in UTF-8.

Skypetab-ng on Gentoo

1 minute read

A lots of people dislike the Skype Software but have to use it. Many of my coworkers and friends using Skype. However, the Skype GUI is quite free "feature" and does provide it difficulties to deal with it. Thanks to skypetab-ng it get at least some "usability".

I tried to run this by Hand, but for some reason the Compile wasn't able to create a 32-bit library.I just found a nice Overlay for  Skypetab-ng, thanks to the Gentoo Forum!
To work with the Overlay, just add the rion overlay to your system:
layman -a rion
All what's left to do is a eix-sync and just install with emerge skypetab-ng
Sources:

Gentoo Forums Post about Skypetabs

Overlay Webpage for Skypetabs-ng
skypetabs-ng

My Blog

1 minute read

Welcome to my blog! I was planning to create a blog for a long time now. Here are some thoughts about this blog: The main purpose is to document.

I will try to post as much as possible. The goal for this blog: It’s main purpose is documentation. Documentation about my work and problem of the everyday struggle.

About me: My Name is Akendo and I’m the system-administrator of a small company that’s located in Berlin. Since August I’m working there full time. The work is not limited to administration only, but also implies work as a Python developer.

I take care about the Mail and Web Servers. All of this systems are running in a virtual environments based on Xen. But also lots of small gems of the IT world like Git, Jabber, Asterisk, Django and Postgresql. Also some bad one, like Orace 10g or Windows Server 2003. But overall it’s a dream job.

€dit:2017 - The grammar of the original post were bad. I re-wrote this post with prober language.

€dit:2018 - Revise for better understandability