Archive for the linux Category

Happy birthday Linux

Saturday, September 17th, 2011 | Permalink

Today, exactly 20 years ago, Linus Torvald released the first version of his kernel which is today known as Linux.

You can read his initial message to a minix newsgroup by following the link.

His release not for 0.2 can he found here.

Thank you Linus for starting with Linux and thank you to everyone who participated in creating a free and super stable operating system within the last 20 years. Awesome job and keep doing what you are doing!

Happy birthday Linux!

Hetzner EQ4 Xen Server Routing Problem with own subnet

Thursday, July 28th, 2011 | Permalink

I ran into the problem that I couldn’t get my DomU’s on a Hetzner EQ4 to connect to the internet.

Unfortunately this is because of the strange network settings Hetzner is using. There is a German manual how to set up a XEN server in their environment, but it is missing one really important part. Hetzner limits the access on their network equipment to the MAC address of your server. Hetzner is not giving you the possibility to set / create new MAC addresses for subnets.

Assuming you are using Debian Squeeze and your server is already set up, you will have to set a point to point connection in the Dom0 and each DomU.

DomO has the regular ip 178.x.x.x and one from the subnet 88.x.x.x – gateway is 178.x.x.1.
Edit the /etc/network/interfaces and add pointtopoint 178.x.x.1 after gateway. This should be the same ip address as your gateway.

For the routing you need one ip address of your subnet on the Dom0 installed. This will also be your default gateway for all DomU’s.

Add the default gateway as a pointopoint connection on every DomU and it should work.

Don’t forget to restart network or reboot the machine and instances.

Heartbeat GUI for Mac OS X – no way, sorry!

Thursday, June 18th, 2009 | Permalink

I really tried it for at least 10 hours. Installing everything needed including all the libs, compilers and whatever. I even hacked the configure files and copied all the libs manually. No WAY!

If someone has a solutions. Please comment!!!

My solution right now is to use X11 and connect to another server. Not the best solutions I would say.

Search and Replace on command-line for several files

Wednesday, January 7th, 2009 | Permalink

Here is a little helper which can be used to search and replace Words in several files at one time.
For this we use perl on the command-line.
perl -p -i.bak -e "~s|search|replace|" file1.txt file2.txt file3.txt
The system will add a .bak file for each file so you have the old stuff too.

problem with permalinks in wordpress on plesk – strato virtual server

Tuesday, August 12th, 2008 | Permalink

This took me a while!
We installed a wordpress on the strato virtual machine and changed the permalink structure, but it didn’t work.
My first thought was that there must be something wrong with mod_rewrite. Seems like apache is not reporting if a module isn’t loaded but tried to use.
As Plesk is doing a good job with it’s user interface, they are not using a standard apache installation with mods-enabled & mods-availible.
After searching for a while I found a file called /etc/sysconfig/apache2.

In my case it’s line 84:

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 perl python suexec"

This is telling the apache which modules have to loaded, as you can see there is nothing like rewrite.
Edit this line:

APACHE_MODULES="rewrite actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 perl python suexec"

Restart apache with:
/etc/init.d/apache2 restart
And it works.

MySQL stoped accepting connections.

Thursday, August 7th, 2008 | Permalink

Strange things are going on.

Actually, today one of my most frequented servers, running lighttpd, stopped serving php files after working for months.
After searching for a while in the lighttpd logs and php logs we figured out, that lighttpd still serves plain html files. So the problem seemed to come from the fast-cgi php. After swichting to apache for about 30 minutes, apache stopped too.
So we figured out that there must be something with the db server, which is an external machine.
Connection local worked fine. Connecting via socket didn’t!
We looked at the processes with:

mysql>show processlist;

The result was a lot of these:

| 108160 | unauthenticated user | 10.0.0.1:3449 | NULL | Connect | NULL | login | NULL

So we figured out that there is a problem with the authentification. First we thougt it is a switch or some kind of hardware problem. Nothing.
After looking around, we found out that MySQL is using reverse lookup at socket connections.
We added the machines in /etc/hosts and everything works fine for now.

What happend?
We are not using our own DNS for lookups. So what I think is that there was actually an entry for 10.0.0.1 in the dns server we use. This dns server served some domain name. Definitly not for our server, but it was a dns record. Mysql just checks and says yes or no. Someone must have updated the dns server and deleted this record so our system stopped.
Strange thing!
I think there is no good reason why mysql should do a reverse lookup. Do you have one?

Hey Novell, SuSE SLES 10 sucks!

Tuesday, April 8th, 2008 | Permalink

Normally I’m a total Debian guy, but for one of my projects I needed a certified linux os to the bought hardware.
So I decided to look at the market and there are just two systems I can use.
Redhat & SuSE SLES10
As this makes no different for me, I decided to give SuSE another shot.
The last version I worked with, was 7.1 or something like that.
I thought SuSE / Novell decided to change their update service and configuration tool YAST.
But what a surprise. NOTHING CHANGED.
It’s the same crap then 5 years ago. Big shot guys!

The update service costs a lot of money per year. Money YOU pay for opensource software packages!!! In times where datatransfer costs only cents, this could not be the reason.
Then I tried to install some basic packages.
And guess what, there are only basic-basic packages in yast.

One example is subversion. subversion is MISSING.
They don’t have to subversion in SUSE SLES 10 as RPM Package.
There is this old big brother cvs, but no svn.
Hello, good morning at SUSE. Every normal software development company is using svn. This is more than a standard package.
But, hey there is something good. You can download the package from Novell. Guess how you can get it? With svn!

Howto set the correct server time

Wednesday, January 16th, 2008 | Permalink

In the last years, I often had the problem that the system time of a linux server was not correct.
There’s a simple way the sync your internal clock with some of these ultra-correct clocks over the internet.
Just use ntpdate.

#ntpdate SERVERADDRESS

Here is a list with public timservers.

How to fix “transfer aborted. disk quota exceeded” –

Friday, January 11th, 2008 | Permalink

If you try to upload something you get “transfer aborted. disk quota exceeded”.

If you bought a webhosting package somewhere, the answer is simple: “You don’t have anymore space left”.
If this happens before the quota is exceeded and you have a root access to that machine, simple use this:

quotacheck -v -c -F vfsold -m /

and restart the quota daemon

/etc/init.d/quota restart

Howto install djbdns with autoaxfr

Saturday, January 5th, 2008 | Permalink

If you like to setup autoaxfr with djbdns, maybe this howto will help you.

First of all, I assume that you have already installed ucspi-tcp and daemontools. If not, look at D.J. Bernsteins Webseite
http://cr.yp.to and install it.

After that, you will have to download autoaxfr and the djbdns Package.
What I’m doing is a basic installation. If you need IPv6 support, watch out, there will be a patch somewhere for djbdns.

Now, add the necessary users:

groupadd dns
useradd -g dns -s /bin/false dnscache
useradd -g dns -s /bin/false tinydns
useradd -g dns -s /bin/false dnslog
useradd -g dns -s /bin/false axfrdns
useradd -g dns -s /bin/false autoaxfr


dnscache

First of all, we install dnscache to 127.0.0.1

dnscache-conf dnscache dnslog /etc/dnscache 127.0.0.1
If you like to distribute dns service to other machines in your network, add a real ip address.
WARNING: You can only use dnscache or tinydns on ONE ip address.

If you need dnscache to resolv domain names for other machines in your network, add the network or every machine by doing this.
touch /etc/dnscache/root/ip/192.168.0

Now it’s time to activate your dnscache.
ln -s /etc/dnscache /service

tinydns

You will need tinydns if you like to play dns server for domains.
First of all, configure it:
tinydns-conf tinydns dnslog /etc/tinydns 212.89.98.32
Use the external ip address, the server should be reachable at.

Now it’s time to setup autoaxfr.
autoaxfr-conf autoaxfr dnslog /etc/autoaxfr

You will now have to edit the file /etc/tinydns/root/Makefile
Replace everything with this:
data.cdb: data
/usr/local/bin/tinydns-data

data: mydata axfrdata
cat $^ > $@

axfrdata: /service/autoaxfr/root/zones/*
sort -u $^ > $@

Don’t forget to add the file mydata & axfrdata:

touch /etc/tinydns/root/axfrdata
touch /etc/tinydns/root/mydata

After every change of data, a secondary dns or whatever, you’ll have to type make in /etc/tinydns/root/
Just automate this with a cronjob.

*/10 * * * * cd /etc/tinydns/root && make > /dev/null 2>&1

Let’s start tinydns and autoaxfr.

ln -s /etc/tinydns /service
ln -s /etc/autoaxfr /service

Goto /etc/autoaxfr/root/slaves.
Add every domain you would like to distribute as secondary dns by adding the domain name as filename and the ip address of the primary dns controller as content in the file.

Example:
vi test.com
123.123.123.133

DONE! That’s the basic.

If you like to play primary dns server you’ll have to install axfrdns.
axfrdns-conf axfrdns dnslog /etc/axfrdns /etc/tinydns 212.89.98.32
Use the same ip address as for tinydns.

Set the servers that are allowed to be secondary dns servers.
cd /etc/axfrdns
vi /etc/axfrdns/tcp


insert to following.

122.22.22.22:allow
:deny


You can restrict that to networks, domains and so on. For that, see the axfrdns manuel from djb.

After you have changed the file, type make.

Start axfrdns.

ln -s /etc/axfrdns /service

Comments, questions, whatever are welcome.