Digital Wanderer

We live as long as we fly

Console Linux Troubles

I got so sick of the constant troubles while setting up a Linux server from the console that I decided to write them all down. You can read them and decide whether I'm complaining for nothing or not. I have Debian, this might not apply to other distros.

1. If you paste from putty into the midnight commander editor, it automatically tries to add extra spaces at the beginning of the line (so-called autoindent) and the formatting goes to hell. This can be disabled, but I had a really hard time finding how to invoke the mc editor options.

It also seems you can disable this by holding down shift, but it looks like putty itself intercepts the shift when you use shift+insert to paste text and it never reaches mc.

2. If you simply write a greeting, which is displayed upon logging into the console, right into the contents of the /etc/motd file, it will get overwritten on the next reboot. I spent over an hour drawing it, and now it's all lost (we hadn't had time to set up backups yet). To avoid this, make the /etc/motd symlink point to your file with the text, not the default one.

3. If you make a mistake in some system configuration file, the server just won't boot. And that's it. I made a mistake in /etc/network/interfaces. Naturally, all files have their own format, making a mistake is a piece of cake. How to check the validity of such a file beforehand is beyond me.

4. I copied over phpbb (already configured). It doesn't work, but it doesn't output any error messages. Options don't help. It's impossible to understand what's the matter. I tried reinstalling it, the installation showed that the php-mysql plugin wasn't installed (the server was fresh). It's clear that it's partly my own fault, but damn, you'd think they could output normal error messages.

5. I set the upload_max_filesize option in php.ini to one gigabyte, everything works. Well, I figured, why hold back – I set it to 4 and forgot about it. It turned out that if it's set to 4, it stops working entirely – it won't let you upload even tiny files. This goes to the point of "Another reason to hate php" (just like the previous point, actually).

6. In the current version of debian (stable), the packages are very old, mono is completely ancient, for example, and nginx is version 6, despite the fact that its 7th version is considered stable, and the 8th is beta.

If you connect repositories from the testing/unstable versions, then it becomes impossible to install anything – apt-get constantly complains about dependencies. The only thing that helps is aptitude, which figures them out on its own and installs them the way it sees fit. If I hadn't known this, I would have just kept compiling fresh versions from source.

7. I'm not even talking about compiling. Nothing ever compiles on the first try (anything remotely complex), you have to install a bunch of various -dev packages, and guessing exactly which ones is far from easy. Error messages are often weird and confusing. For example, when building mono, I had a space in the folder name – and it complained about a missing file inside, and not even right away. If you take an old version of software or just old software that hasn't been updated in a long time – rest assured, on a new version of the gcc compiler you don't stand a chance – you'll be picking at the source code until you're blue in the face (I tried to compile SETedit, gave up).

Overall – the difference with Windows is striking. Here it's usually like this: you found the software (pirated), downloaded it from torrents, installed it and you're using it, clicking with your mouse.

The downsides are also known: the software is paid and can't always be cracked, sometimes it can't be configured flexibly enough, and in general it's not always available for various tricky features.