Entries Tagged 'Linux' ↓
October 28th, 2008 — Linux, PHP, Ruby
It was a troublesome day today. All did not go as planned.
I had to install fcgid + suexec on one of our servers, I had delayed it too long. So I used my how-to and it still worked flawless. But I noticed I hadn’t mentioned what the right were of the suexec binary. So here it goes:
chown root:www-data suexec
chmod 4754 suexec
After the install I restarted Apache and looked at one of the sites. And it worked! I was baffled. That’s the first time I installed fcgid without hours long of searching where the flaw was.
But then I looked at our support system (Redmine) and it didn’t work too well
All controllers were being executed ‘n stuff. But the stylesheets, images and javascripts were not loaded. When requesting an image in the browser I got Rails 404-error page. Huh? Apache should have handled that request. At first I thought it was because of some changes I made to the virtualserver configuration of an other Rails site. But after some trial and error I couldn’t find anything that was wrong.
Then I removed the .htaccess from the public directory of Redmine. That once worked for one of my rails sites. But no cigar. Then I noticed that there were a lot of dispatch*example.rb’s in the public directory. And: after removing them, the stuff worked. So it seems like Rails or Phusion Passenger uses some kind of fuzzy matching when searching for a dispatch.rb. And it first just worked because fcgid was not installed. So I don’t know who’s to blame. But the problem is solved. Phew!
October 14th, 2008 — Linux
I wanted to install flash player 10 because flash player nine kept crashing on my Ubuntu 8.10 installation. So I found a nice howto on google an followed it. The article explains how to install it on a 64 bit installation of the Ubuntu operating system.
The howto worked fine, but flash kept crashing. I think it has something to do with the nspluginwrapper package.
[edit]
Flash 10 is now the default install, so this post is no longer needed!
[/edit]
September 29th, 2008 — Linux
I needed to install a computer for my sister. She want a laptop, but until she has the money for it, she’ll be using one of my old computers.
It’s one with no dvd/cd drive (she doesn’t know that ), so I had to install ubuntu over the network.
First, like I always do:
aptitude install tftpd-hpa
Then make sure /etc/default/tftpd-hpa looks like:
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot -vvvvv"
And make sure you copy the right files to /var/lib/tftpboot. I don’t want to explain that here. If you’re interested in how to make that work: e-mail me or read the Ubuntu wiki.
Then you need a dhcp server that can send where to find the files. My router doesn’t support that (US Robotics), so I needed to install a local dhcp server. Usually I installed a fully-flexed dhcp server, but this time I wanted something simple. Apt-cache search showed me udhcpd. So:
aptitude install udhcpd
Then create /etc/udhcpd.conf and make it look like this (if you have a wireless interface):
dns 192.168.2.1 #Ip address of the local dns server (router in my case)
boot_file hardy/pxelinux.0
Then (re)start both services:
/etc/init.d/tftpd-hpa restart
/etc/init.d/udhcpd restart
Start the computer you want to install and select an option similar to: “Boot from network” and go!!!!!!
I really liked udhcpd: it’s really simple and fast. Tftpd-hpa always has worked great for me, so that’s why I picked it this time too.
There could be errors in this post, I typed it largely without checking. If you can’t figure out how to install it yourself: please let me know via a comment.
September 20th, 2008 — Linux
I’ve been using Ubuntu/Gnome fulltime now for some 2 years I believe. I never found out what the “show desktop” shortcup was. I always used the little icon. But while I was tweaking compiz I found out that the shortcut was <ctrl><alt>d. I Windows it was Super+D (Windows key + D). So I decided to change the keybinding to that. I couldn’t manage it via the “Keyboard shortcuts” configuration. I kept insisting on Super_L. So I “hacked” it via the gconf-editor. See the screenshot for the correct value:
But, I realized I had to set this up every time I reinstalled Gnome/Ubuntu. So I changed it back to Ctrl+D. Convention over configuration maybe?
September 8th, 2008 — Linux, Ruby
I’ve created a little merb app for a customer. The reason I chose merb because I really like the :provides-api. The app had to generate a lot of xml, so using Merb was really nice.
But the installation on the server was a little troublesome. I had to install some gems (which I of course forgot to do) and I had to figure out how the file permissions had to be.
First step: installing software
aptitude install build-essential ruby1.8-dev libxml2-dev libmysql++-dev
gem install merb datamapper do_mysql merb_datamapper --include-dependencies --no-ri --no-rdoc
gem update --include-dependencies
passenger-install-apache2-module
Step two: project’s dependency packages
aptitude install libmagick9-dev libtidy-0.99-0
gem install orderedhash shared-mime-info rmagick tidy
But the big problem here was libtidy! All the packages keep segfaulting. So I had to use the Gutsy or Feisty package (don’t remember which one exactly. One of the two ).
Step three: config.ru
Because I wanted to run Merb on apache2 with Phusion passenger I had to create a config.ru file. The contents of the file can be found on the merbivore wiki.
Last step: Adjusting permissions
I was ready to start merb, but when I tried to start it, it kept complaining about permission errors. So after a little fiddling I chmod’ed the whole shebang to 750. I think it will be solved if I install suexec on the server.
September 1st, 2008 — Linux
Ah, time for my yearrly recurring troubles with my Brother HL2030. Very nice printer. But the driver support under Linux is terrible. Yes, brother released some (crapy) closed source drivers for Linux. But in my opinion that’s even worse than no drivers for linux at all. If there’re no drivers, some opensource Kernel guru creates them. If there are drivers available, no matter how crappy they are, no one’s going throught the trouble of creating them.
I first picked the HL2060 drivers. But I had troubles printing pages in the landscape format. So after some searching I found the appropriate drivers. Just do:
aptitude install brother-cups-wrapper-extra brother-cups-wrapper-laser
I had to reboot before the drivers showed up in the system-config-printer tool. After the reboot I could select the HL-2030 drivers. But too bad,the same problem remained. When tweaking the default job options, I could set the orientation to landscape. Very weird. I believe it’s a bug in Gnome but I couldn’t find any similar cases.
So for now, it’s very annoying to set the default job options every time, but it works…
July 21st, 2008 — Linux, Ruby
Just some quick links!
This links describes how to manage multiple databases with Capistrano. That’s not why I picked it though. I liked it because it shows the “<<: *” syntax of yaml.
And a repository of Ubuntu Hardy Heron debs for mod_rails/Phusion passenger. At this time I installed mod_rails via rubygems. But if the guys at brighbox make the package so it builds/installs the Apache module automatically (without human intervention and pressing Y two times) I will install that one. Much, much nicer to use with Puppet.
July 21st, 2008 — Linux, Other
I was thinking about putting together a new low-energy VT-enabled HTPC. So I can use it to watch video’s, play my music on it, use it for testing purposes, put freebsd on it and a lot more. That’s why I want the VT extension. So I can install KVM/Xen with all the goodies
But, the trick question: what components? Pffff, I don’t know anything about hardware anymore so I had to brush-up my knowledge about this stuff. After reading a lot of forum posts, reviews and the lot, I came up with the following hardware components:
Case: Antec Fusion case
A nice looking case with a lcd display with Linux drivers for it available (I think). And also an infrared receiver. And the price is not too high like some other cases.
Motherboard: Gigabyte vs. Asus
I’ve got two options: The Gigabyte GA-MA78GM-S2H or the Asus M3A78-EMH HDMI. I also thought about a similar Asrock motherboard. Because they use very little energy (so I’ve read). But it’s a bit of a hassle to find a dealer who sells these boards. So I think I’ll stick with the former two.
Why one of these? They both have the new AMD 780G/SB700 chipset which supports full HD hardware encoding. So if I’m gonna us it as a HTPC it does it work descent.
CPU: AMD Athlon X2 4450e
Low power usage and only a couple of euro’s more than it’s brother the 4050. I think it supports amd-v/svm, but it’s not too obvious if you read the AMD site. So I hope I got it right
Cooler: Scythe Ninja mini
I want the system to be passively cooled. And this is the best small heatsink I could find.
Memory: 2 x 2GB
I don’t care what kind of memory goes into it. As long if it’s enough to support a couple of VM’s.
Hard disk: 32GB SSD
This one is hard! Is this worth the 160 euro’s? Well it is fast, silent and reliable! And it’s enough for DomU + some VM’s. All my data is gonna be saved on another (network) diskdrive. But still….
July 16th, 2008 — Linux, Ruby
Today I’ve installed Phusion passenger on one of our servers. I wanted Redmine for one of our projects so this seemede a nice opportunity to install it.
Installation was a breeze. For mod_rails as well Redmine.
So I was thinking: we have mod_rails installed, we could offer some rails hosting to attract new customers.
But I see three bears on the road with using mod_rails in a shared hosting environment.
1. Same user
Every mod_rails site runs on the same user I’ve spent hours on configuring fastcgi and suexec. But now every hosting custommer’s scripts run under their own user. Would be nice if mod_rails supported something like that.
2. Memory
I couldn’t find an option to limit the memory usage per mod_rails site. And I know how memory hungry rails can be
3. Aliases
Mod_rails doesn’t support host aliases. This is overcomable but feels like a hack. Wouldn’t it be nice if mod_rails supported aliases Pleeeeeeaaaaase?
Maybe I haven’t read the documentation to well and are my points useless In that case: please let me know!
July 15th, 2008 — Linux
Don’t!
I first wondered why Ubuntu chose KVM instead of Xen. Well, now I now: because it’s a piece of crap. Well, maybe not Xen, but definitely the products that claim to “support” Xen.
I tried Ubuntu (error in virt-install), Debian Lenny (doesn’t support Dom0 hosts), Fedora (don’t remember what was wrong with that), OpenSuse (yast2 bug) and some others. And they all had some bug in it that prevented me from using virt-install and/or Xen in a nice manner.
I eventually got virt-install working on Ubuntu by installing it from source. The Ubuntu/debian version has been broken for the last couple of months. So finally I was reading to use Xen. Downloaded an iso. Figured out how to use the commandline options and then: an iso can’t be used with a para-virtualized guest. You have to have the VT cpu extension for it.
Well, that did it. I removed xen, shut down the computer and offered it for sale on a couple of marketplaces. My next plan: buy a new one with VT on board so I can use KVM.
Stupid open source!