Archive for August, 2006

Never timeout with SSH again

Tuesday, August 29th, 2006

Yesterday I was updating my website over a ssh(2) connection. I use SSH by preference for it’s sequre and quick. While I was editing I needed to do something else first for approximately five to ten minutes. When I wanted to continue updating the website, I discovered that I had to login again because my connection timed out. If this happens once it isn’t that much of a problem, but this is becoming a daily-scenario.

A solution I found (and seems to work) is to add the next line in ~/.ssh/config:
ServerAliveInterval 150

Now every 150 seconds I packet is requested (and sent) from the server in order to keep the connection alive. And no firewall may ever dare to think that the connection is dead/timed-out.

I found here a website where you can find many more of SSH(2) options.

Strato (NL)

Monday, August 28th, 2006

This is a summary in Dutch of my Strato introduction post
Dit is een samenvatting van mijn uitgebreide(re) strato introductie artikel.

Pc-active, een van mijn favoriete tijdschriften, heeft recentelijk een leuke deal gemaakt met Strato. Pc-active verdeelt 25 (virtuele) rootservers over 25 lezers. Deze lezers doen hier voor zes maanden een leuk project mee, om hierna de servers weer af te staan. Natuurlijk krijgen de lezers dit niet voor niets, zij vertellen zo af en toe aan pc-active hoe het hun bevalt, en de pc-active kan op basis hiervan weer een artikel schrijven.
I was busy on other things than computers for the last few weeks, and therefor I wasn’t able to post anything here. Well, let’s hope that changes with this post ;)

Alhoewel er veel configuratie panels voor servers zijn, ben ik er nog nooit eentje tegengekomen welke volledig aan mijn eisen voldeed: Goedkoop (bij voorkeur gratis0, simpel, veel (en geavanceerde) opties, veilig en een overzichtelijke interface. Ik ben een van de gelukkige lezers die ook zo’n virtuele server beloofd is. Het project dat ik zal doen is eerst eens verschillende config panels bekijken, om vervolgens er zelf eentje te schrijven.

Het idee van zo’n configuratie panel is om het front-end gedeelte gescheiden te houden van het back-end gedeelte door bijvoorbeeld een (mysql) database. het config panel zou servers zoals Bind (DNS), Apache (web), MYSQL (database), ProFTPD(?) (FTP) en Postfix (mail). Ik denk dat php5 de gebruikte scripting taal wordt. Python mag hiervoor misschien beter geschikt zijn, zes maanden is te kort om het goed genoeg te leren.

Netzoals Cpanel en Plesk wil ik een configuratie panel maken dat bestaat uit drie lagen:

  1. Beheerders laag: In deze laag de beheerders kunnen dingen doen als server-onderhoud, maar ook het toevoegen van nieuwe users toevoegen.
  2. The resellers laag: Hetzelfde als laag #3, met het verschil dat deze laag ook nieuwe accounts kan toevoegen en hier een overzicht op houden
  3. Standaard-gebruikers laag: De meeste gebruikers zitten in deze laag. Hier kunnen ze hun eigen website, DNS, email en misschien nog wat andere dingen waar ik (of u) later nog mee komt.

Zoals gezegt, weet ik nog niet of ik ook echt de tweede laag ga implementeren.

Ik heb hierboven gewoon wat dingetjes naar mijn idee opgeschreven. Twee dingen zijn zeker:
Ik ga eerst wat verschilllende configuratie panels onder de loep nemen,
vervolgens schrijf ik er zelf een.
Voor de rest zijn al uw ideeen welkom.

The Dutch nightmare

Friday, August 25th, 2006

I initially wanted to write all posts in English because of the very simple reason that there are far more people that speak/read English than Dutch. However, te Strato project, is mainly in Dutch….

For this reason I decided to create a new Category: Strato – NL, in this cattegory I’ll be writing summaries of all (important) posts that are in the Strato Category.

Please note that the Dutch posts will not appear on the Front Page.

Lees meer voor de Nederlandse versie.
(more…)

Placing a heatsink on my nforce

Thursday, August 24th, 2006

When I went to sleep 2 days ago, I noticed a weird sound, comming from my server (wich is almost directly above where I sleep). I decided to take a look, and I discovered my chipset fan had some troubles makeing its rounds. I powered off the server, and decided to go shopping the next day.

(more…)

Strato

Wednesday, August 23rd, 2006

A summary in Dutch was just added here
Een samenvatting van dit artikel in het Nederlands is zojuist hier geplaatst

I was busy on other things than computers for the last few weeks, and therefor I wasn’t able to post anything here. Well, let’s hope that changes with this post ;)

One of my favourite magazines is the dutch magazine pc-active. They have a nice deal with Strato which offers Shared hosting, Virtual dedicateds and Dedicated servers in Germany. In various other countries they offer shared webhosting for the moment only (which is to be extended in near future by virtual dedicateds and dedicated servers).

The deal pc-active made is that they get 25 servers (20 virtual servers, 5 dedicated servers), and distribute them to their readers for a six-month period. The readers can think all of their own project to do on the servers. Of course the readers have to do something in return: they report their experiences to the pc-active magazine, and so co-orperate with an series of articles.

Though there are plenty of configuration panels (think about Cpanel and webmin e.g.), I never found one that suited my needs: Cheap (preferably free), simple, lots (and advanced) options, secure and have a native interface. I wouldn’t post an article about this whole Strato and Pc-active deal – and even create an entire category for it – if I wasn’t joining as well. I was one of the lucky ones who got a V-PowerServer A promised. The project I’m going to do is to first take a look at several free configuration panels, and take notes of the pro’s and cons of every configuration panel tested. In a second phase I plan to make a configuration panel myself based on my experiences of the earlier tested configuration panels and the experiences of others.

The idea of this configuration panel is to keep the front-end and back-end seperated from eachother by a (mysql)database for example. The config panel should be able to manage servers like Bind (DNS), Apache (web), Mysql (database), ProFTPD(?) (FTP) and a mail-server (of which I don’t know which one will do). I’m not sure what scripting language I’ll use. Though Python is very flexible and suited for things like these, I think that I’ll go for PHP5. We have to hand in the servers after six months, and that is in my opinion too short to learn a language like Python well enough to write a config panel with it.

Alike Cpanel and Plesk I want to make a configuration panel that exists of three layers (maybe two):

  1. The administration layer. In this layer only system administrators are allowed to do things like maintenance et cetera, but also add new accounts and keep an oversight on them.
  2. The Reseller layer. Same as level three, with the difference that this layer is also allowed to add accounts and keep an oversight on the accounts which they added.
  3. Normal user layer. Most users will be in this layer. They can manage their website, DNS, email and maybe some other things of which I (or you) think off later.

As mentioned before, I’m not sure yet whether to implement the second layer as well, but that’s kind of a detail.

I just wrote down my own ideas. Two things are for sure, I’ll be looking at several configuration panels first, after that, I’ll make my own. The rest is not sure yet, so any idea is welcome.

Natting the VM’s

Monday, August 14th, 2006

In order to use the VM I created succesfully, I want to use NAT for this pc will become shortly the gateway/router for the entire home-network here, and then NAT is required for I get only one IPv4-address of my ISP :’( . I wasn’t able to figure it out right away, however, I found here a website describing it all.

(more…)

python for webscripting

Sunday, August 6th, 2006

Recently i decided to try and build a website for http://www.moshe.nl/ (again). I know python’s wsgi interface well, because i’ve done some webprogramming. This time I didn’t want to “program” a complete website, I merely wanted to be able to use python (and wsgi) for some scripting (like powering a contact form).

I started building some “browsing” functionality, at first it used dir(SomeObj) to gather the contents of a “directory”, it worked straight forward by using the wgsi application class to figure out another object to call, and it calls it just like it is another wsgi application. After working on the layout for a bit (i didn’t want to write a wsgi framework, I wanted to build a website ;) ), I made a ’static’ directory class, so I could just include real dirs along with the dynamic code.

This way, I build a flexible framework in a couple of hours. It really is nothing special, but now I have a framework I know, and one that is able to adress my needs for ocasional python scripting. Maybe I’ll release the framework when it is crystalised a bit further. And when my site is in a state worthy for everyone to see, the framework can be seen powering www.moshe.nl :D

For everyone thinking about using python for website programming or scripting, it is worth the try. Either with a framework someone else built, or by writing some lines of code yourself, The startup of a site with FastCGI and WSGI (my favorite setup) is a bit more difficult than a php like setup, but it is a very clear and easy way once you are familiar with it.

(So far for my first post here.)

Apache + php4 + php5

Sunday, August 6th, 2006

I recently asked my host whether they could enable php5. For I had made a php5 script, and php4 only is installed on their server. After several days I got a reply: “This is not possible without running two instances of apache”. Today I’m gonna try to install CentOS (which they run as well), php4 and php5.

First we have to create a machine with CentOS for I want to make a replica as good as possible.
debian:/vz/template/cache# w-get http://download.openvz.org/template/precreated/centos-4-i386-minimal.tar.gz
debian:/vz/template/cache# cp centos-4-i386-minimal.tar.gz /var/lib/vz/template/cache/
debian:/vz/template/cache# vzctl create 101 --ostemplate centos-4-i386-minimal --config vps.basic
Creating VPS private area: /var/lib/vz/private/101
Performing postcreate actions
VPS private area was created
debian:~# vzctl start 101
debian:~# vzctl set 101 --ipadd 192.168.127.1 --save
debian:~# vzctl exec 101 passwd
debian:~# vzctl exec 101 hostname VM101centos

Okay, so we’ve now got a machine running centos, the hostname is not nescesary, but I just added that one in order to keep a bit of structure between all our Virtual Machines. I’m used to work with Debian and APT, so I’m really interested in how centOS will suit my needs. I want to run apache 1.3 and PHP4 as a module first, and afterwards see how I can enable PHP5 using the cgi wrapper.


debian:~# ssh 192.168.127.1
debian:~# RPM -uvh apache

At this point I encountered a problem, there’s no internet connection available. Which means that I will have to do that first. I pick NAT (other possibilities were Routering and bridging), I’ll explain some other post why.

Packaging the linux kernel with openVZ support

Saturday, August 5th, 2006

The past few days I tried to patch the openvz patch with the default linux kernel, then I tried to compile it, and afterwards, package it. And guess what, I succeeded :D . My goal, run several (virtual) machines on one pysical machine using OpenVZ. I used the openvz kernel patch of Henk van de Kamer (www.hetlab.tk) and the default vanilla kernel.

(more…)

Introduction

Friday, August 4th, 2006

Welcome at my new blog, here I’ll post all my progressions related to computers.

It is meant for myself as some big log-file, so I can look afterwards what I exactly did. However, I decided to make it all public because it can be of help to you.

Dolf