Convalesco

Growing stronger every day!

Archive for the ‘openbsd’ tag

Going back to the roots: Gentoo

without comments

Yesterday I had to plug once again my home server. This server runs a few services and acts as a DNS for the local network. I have a machine like this up 24/7 to serve specific purposes. I haven’t find any router that can replace it. Of course, I didn’t try high range routers, like CISCO. Anyway, this machine used to run OpenBSD.

My experience after almost a year of OpenBSD (simple) administrating is somewhat bad. The home server used to run, DNSmasq, MySQL, Lighttpd with PHP5 and a modified version of lighttpd in order to run Ruby on Rails. It was an OpenVPN server, along with sshd and OpenNTPD. Also there was a Nessus server running on the same machine and FTP just for the local network.

The server is a Pentium 4 with 256 MB RAM. It can handle the above easily no matter what OS you install. However, the OpenBSD proved to be a bit too much frustrating for me. Although my experience allows me to do everything manually, download, install and configure programs manually, due to my experience with Gentoo, I was trying to find in every situation the right way to do things. The drawback is that you have to read a bit more usually, but in return you will be just fine when upgrading (hopefully!).

The problems with OpenBSD start exactly there. The manual clearly states that people should use the precompiled packages before using the Ports. First thing, using precompiled packages saves huge amounts of time compared to Gentoo’s philosophy of compiling everything. But! There’s always a “but”. They seriously lack of flexibility and that was a known issue. I was fine with that, after all I didn’t want a bleeding edge machine. I just needed a server to serve a few services to the local network, nothing more. The installation of the combo: lighttpd+mysql+php proved to be much more complicated than I ever imagined! First problem was that the precompiled binaries didn’t match in versions. I had to find manually my packages from various mirrors. You see I didn’t find a way to tell pkg_add to switch between mirrors automagically. Then, I found out that the precompiled versions of PHP and lighttpd were unfit. The fastcgi option is kinda rare. So I had to install them using ports. No problem, I thought. After a few tries and much reading, I managed to install the combo. The frustration continued with ruby on rails. Ruby on rails is not easy to install anywhere. I had a few issues on MacOSX as well but I managed to install them correctly in both systems using lighttpd and mysql correctly. Then I wanted to install DNSmasq. After the configuration and a few days of frustrating troubleshooting a guy told me that there was bug in the OpenBSD kernel that stops dnsmasq from working properly: DNSmasq was not able to assign ip’s because it couldn’t send announcements packets! I still didn’t thank this guy enough! I was going crazy, I never had issues before with dnsmasq!

Apart from the OpenBSD installation troubles: every single install, from irssi to complex PHP applications was an issue. The most frustrating for me was the version upgrade process. I don’t know why they need to upgrade the base system in that manner. I tried both cvsup -for advanced users and heavily discouraged by the handbook- and CD upgrade. Both methods gave me issues. The strange thing is that I was really going by the handbook! The folks on #openbsd@Freenode helped a lot. But still I didn’t understand this lack of flexibility and ease of package management and upgrade process. In the end everything became so frustrating that I really had no will to install anything more than the absolutely necessary.

After almost 3 years of absence from my computers, Linux came finally in (again). Gentoo was the obvious choice. I know very well the community and the mindset around Gentoo, so I feel very comfortable with it. Although it may seem an obsolete choice for a computer server, but for me is the best! The upgrade process is simple yet powerful, emerge is the perfect tool for package management and the troubleshooting is easy. While it was hard for me to find help with OpenBSD’s issues, the gentoo community is one of the most active communities I’ve ever seen. Plus the fact that… everything works! I just typed:

# env USE="cgi php mysql fastcgi" emerge lighttpd

and everything worked like a charm!

Written by Panagiotis Atmatzidis

April 30th, 2008 at 11:12 am