Archive for the ‘General’ Category

Skype Video, and a Logitech webcam

Was hardware shopping yesterday, and couldn’t resist getting myself a webcam, now that Skype 2.0 on Linux supports it (okay, its beta, but it works). Picked up a Logitech QuickCam Family for RM65. There was a more expensive version (RM10 more) that was “Skype certified”, but I figured I could save the cash, seeing that there is no way Logitech supports Linux officially anyway.

Did it work with Linux? Most certainly, on Fedora 8, it just worked. Of course, you need the livna repository. Just install gspca (it’ll pull in some kernel modules too), and then run modprobe gspca, and voila! you have a working webcam. Tried it with Ekiga, it was detected. Tried it with Skype, and even had a chat, with a user on Windows, and it worked. Glad to be webcam enabled.

Technorati Tags: , , , , , , ,

Zimbra ZCS 5.0 GA – is it really a GA release?

I took the opportunity today evening to get myself upgraded (from 4.5.3_GA_733) to the latest (5.0.0_GA_1869) open source version of Zimbra – ZCS 5.0 GA. The database migration took about the longest, mainly due to some schema changes. Lots of starts and stops to the database. Its now running MySQL 5.0.45 Community.

What prompted the upgrade? A few days ago, I got a bunch of new packages, and rebooted the server (new kernel). To my dismay, Zimbra started to have issues – amavisd wouldn’t start. This meant that there was a large amount of mail, sitting in the queue, not being delivered. Things you don’t normally check for, immediately, anyway.

Turns out Compress::Zlib was too old. Well, not the system provided Compress::Zlib, but the Zimbra provided Compress::Zlib. Kind of annoying when there are two packages of software, sitting on your system, right? However, the benefits of having an easy-to-administer and use mail system, somehow I think outstrips all the pain associated.

I found the web interface in ZCS 4.5.3 to be a bit limited, even when logged in as an administrator. There was absolutely no way to restart, failed services. For this, I actually needed to login via SSH, and use zmcontrol. Running SSH on a non-standard port, and not having your laptop nearby (or remembering the non-standard port) can allow you to have some fun :)

So after fixing ZCS 4.5.3, and realising that it had some gaping holes, I decided to upgrade. The upgrade process went on pretty smoothly, till I saw:
Updating from 5.0.0_RC3
5 is only avaliable with the XS version at /opt/zimbra/zimbramon/lib/IO/Socket/SSL.pm line 30
BEGIN failed--compilation aborted at /opt/zimbra/zimbramon/lib/IO/Socket/SSL.pm line 30, <DBCONFIG> line 21.
Compilation failed in require at /opt/zimbra/zimbramon/lib/Net/LDAP.pm line 970, <DBCONFIG> line 21.

This has largely got to do with the RHEL4 supplied Perl, as referenced by zimbra bug #22466. However, it seems that it was fixed in 5.0.0_GA_1809. Problem still seems to be around in 5.0.0_GA_1869. Verified that it existed – /opt/zimbra/zimbramon/lib/i386-linux-thread-multi/Scalar/Util.pm (and was newer than the version on the system). Verified that Zimbra saw it too – check out .bashrc in /opt/zimbra (the home directory for the zimbra user) for the various PATHs that Zimbra sees/requires. However, I was running this install, not as the zimbra user, so the Perl PATHs had to be specified.

Specifying the Perl PATH, also didn’t help. The forums mentioned just installing from cpan, Scalar::Util and letting the install progress. It still failed.

I thought I’d try a clean install. By golly, it failed on RHEL4. An upgrade of a clean install from ZCS 4.5.10 also failed. I’m almost convinced that Zimbra spent very little time QA’ing ZCS on RHEL4. Sure, RHEL5 probably works a charm, but the drive of enterprise software is not upgrading the OS too often. This is where I can so see, FreeBSD succeeding – pity there isn’t an official Zimbra/FreeBSD port.

For fun reading, check out their forums: [SOLVED] Big Fubar on 5 FOSS GA Upgrade (how was it solved?), Upgrade 4.5.7 -> 5.0 GA Failed, centos4 upgrade to 5.0 errors. I’m sure this magical list can go on and on. All purported solutions generally, do not work.

Moral of the story? Even with backups, don’t try upgrading Zimbra on a production box. Be prepared to cry, a lot.

Technorati Tags: , , , , , ,

VirtualBox on Fedora 8

I managed to get my old Vista image created on Ubuntu Gutsy, to see if it would run under KVM on Fedora 8. Turns out I get a similar blue screen of death. Looks like it might be the splash screen of Windows causing KVM/QEMU to bork. Decided that it might be time to try VirtualBox.

No Fedora 8 RPMS are provided, so the Fedora 7 RPM will have to suffice. First snag? Lacking kernel-devel (by default, you now get kernel and kernel-headers). After installing that, its a simple sudo /etc/init.d/vboxdrv setup. Ensure that the user you’re running as, is also a member of the group vboxusers (you have to do this manually).

Starting up innotek VirtualBox is now a breeze. Though I have a feeling I have to run the setup everytime I get a new kernel (which is a problem in Fedora land, as there’s a rapid pace of development). This feeling was confirmed quite quickly, as I had a new kernel release almost immediately from the time I trialled this to the time I wrote this. At first glance, its an ugly application (Qt based).

Setting up a VM requires no KVM support, so in Fedora, this means removing kvm_intel and kvm from the running kernel. Good thing they’re modules, eh?

Setting up Window Vista was a breeze. Allocating it 1GB of RAM on my 2GB machine, seemed OK, as long as Firefox with multiple tabs weren’t running. Vista does something quirky – it pre-allocates all the RAM, probably by writing zeroes, and thus makes use of 1GB of RAM even before it starts. Oh well. At least I have Windows, and it performs, relatively well, so I can test software.

Networking? Much has been written about this, in fact, there’s even a ticket #504 for this. In fact, it was easy – Devices -> Install Guest Additions. Then get Windows to probe for new hardware, and add the network card. Very simple, quite unlike my KVM experience. If you for some reason want to mount the image itself, its located at /usr/share/virtualbox/VBoxGuestAdditions.iso.

Technorati Tags: , , , , ,

Fedora more successful, developer-wise, than Ubuntu

Statistics are interesting. Every Fedora Project Contributor gets an @fedoraproject.org alias. So I’m presuming, this number is greater than just package maintainers…

Fedora, via Max Spevack:

  • non-RH maintainers: 276
  • RH maintainers: 202

total @fedoraproject.org aliases for package maintainers: 478

Ubuntu, via Daniel Robitaille:

  • 348

total @ubuntu.com aliases: 348

By the above, does it mean Fedora is way more successful than Ubuntu? Some detractors will say, RH has a lot more package maintainers than Canonical can afford. Sure. But an @fedoraproject.org “Fedora Membership” also extends to ambassadors, translators, etc. and not just package maintainers (so the number, 478 up there, is woefully under-reported). Sadly, I couldn’t find a nice easy way to show all the @fedoraproject.org aliases via the online pkgdb application.

Long gone are the days where these aliases were maintained in /etc/aliases by Seth and I ;-)

Technorati Tags: , , ,

WordCamp Melbourne: making money with WordPress, bbPress, caching, WordPress Sandbox

On November 17 2007, I went to the inaugural WordCamp Melbourne. It was a truly interesting event – crowded, filled to the brim, and held at the pretty amazing Watermark Bar, in Docklands. It was a really warm day, and the only complaint would be that Watermark put is in a glass dome, with only 2 fans and no air-conditioning – nice, greenhouse we were in! Food and drink were good, as were the talks in general. I took some notes, and am placing them online now (late, but better than never). Note that the event was sold out – so kudos to James Farmer for organising it.

Making money with WordPress – Darren Rowse

– exclusive content, for a paid area (like forums?)
– textlinkads/paid links/paid reviews – nasties from Google, so this can be an issue
– RSS advertising?
– direct ad sales, and getting rid of the google adwords…
– donations? jason kotke survived for a year on donations
– book deals? other writing gigs? consulting? many other ‘unofficial’ ways
– give away a lot for free (principles, what you want to talk about in your niche), then consult, with individuals
– align yourself with a niche – the more people think about your branding, the more people think about you when its time to look for an expert
  – establish trust, expertise, authority
  – showcase what you do; do case studies, showcase what you can do, for free, and others will pay
  – give away the principles
  – sell someone not yourself (be careful of adsense, because someone else might be making money out of you)
  – make yourself accessible (write comments, participate)
– best places to place an ad: top left hand corner, or at the bottom of a post
– I find it interesting, that my quick analysis of Darren’s site, without AdBlock Plus, shows that he only feeds B5Media ads, and doesn’t actually use adsense. He however, does recommend you to earn money via adsense… so he writes about adsense, and so on, and encourages people to sign up via his link. Crafty.

bbPress – Sam Bauers at Automattic, who hacks on it

– install wordpress
– install bbpress in a subdirectory (/forum)
– cookie is shaed of wordpress/bbpress, so login in wordpress, and you’re logged into bbpress
– disable registration on the blog, and allow registration of users on the forum only
– plugin that attempts to make a post in wordpress, and starts a new bbpress forum post (bbsync). can be improved…
– beware htaccess rewrite rules… WordPress takes “Everything”, so might redirect to the blog even when you want to go to the forums… Consider placing bbpress .htaccess before the wordpress stuff
– in config.php for wordpress, watch the trailing slashes. http://bytebot.net/blog is BETTER than http://bytebot.net/blog/ (no trailing slashes == good)
– bbPress Integration installed on bbPress, and let bbPress handle the registration (and it will assign a default role in WordPress)
– uses mysqli now, but they want to switch to ext/mysql, because wordpress uses it too
– Check out the AppleSwitcher forums and website… Forums run bbPress, and is skinned really well

WordPress caching – Forum hosted by Alex Shiels (Automattic)

– Fix wordpress object cache, to work for large multiuser sites
– wordpress.com – dozen+ memcached servers
– custom version of wordpress object cache to talk to memcached
– Caching is counterproductive?
  – can’t just cache everything, because some blogs only get hit irregularly
  – have multiple levels of stuff, because there’s overhead in the caches
– SuperCache is used on wordpress.com, and this is released. Used only on specific content
  – builds flat HTML files
– wp-cache is down within the data structures. GZIP compression, and caches whole pages
Barry found php5 is about 15% slower than php4
  – IO is not a bottleneck, its more CPU

WordPress Sandbox – Alister Cameron

– XHTML and CSS
http://www.plaintxt.org/themes/sandbox/
– Customise it with CSS alone, you don’t mess with anything else in the sandbox. Its all fully valid XHTML
– sandbox has hAtom and hCard microformats, woven into the page
– He uses YUI’s toolkit + sandbox (makes use YUI grids)
– Pay a visit to the CSS Zen Garden
– Asides: look at photomatt.net – anything in red with a | bar, is an aside. Also check out http://www.alistercameron.com/ his asides are in green
http://codex.wordpress.org/Adding_Asides

WordPress.com – Alex Shiels
I took these notes on my mobile phone… before whipping out my laptop. They’re even more terse!

  • WordPress.com
  • 600gb mysql tables
  • 1.5tb worth of file uploads
  • currently, over 1000 cpu cores…
  • Mysql master-slave replication
  • special version of wpdb, known as hyperdb
  • use pound
  • heavily cache – edge caching with akamai (limited), full page caching for some pages, memcached for the wordpress object cache. Memcached handles 50000 pages/second
  • take a look at barry’s wordcamp 2007 video, about hyperdb
  • the memcache stuff isn’t released yet

All in all, I also need to take a closer look at nginx. It is apparently much nicer than lighttpd, in terms of it not using as much memory. However when I asked for some solid proof/evidence, I wasn’t given it, so I guess I’ll have to do my own research. Will be on my todo list for the holiday season (which has already started for me!).

Technorati Tags: , , ,

Adventures with Apache’s Rewrite Engine (and MediaWiki)

We’ve migrated some services from a machine, to another. The architecture of these machines, and directory structures are completely different. So I’ve played Joe Random Sysadmin.

MediaWiki is completely configured from LocalSettings.php. It does not have any configuration data stored in the database, so editing the LocalSettings.php file is really all you need to do. One document you want to read, in case the LocalSettings.php configuration is not hard-wired in your brain is the documentation on LocalSettings.php. Items you would likely need to change:

  • $IP – where on disk, MediaWiki is installed
  • $wgScriptPath – a lot of things depend on this, and if you’re making a change in Apache, I seriously suggest paying attention to this one. I have installed MediaWiki into a directory such that its called w/. There’s a RewriteRule for this, so $wgScriptPath is now set to /w.
  • $wgUploadDirectory – wherever this is, make sure its writeable by the web-server (let the directory be owned by www-data on a Debian system, for instance).

Everything else is pretty kosher, you don’t actually need to change much more than that. I found that using $wgCacheEpoch was really very handy, when actually testing MediaWiki. $wgCacheEpoch=”date +%Y%m%d%H%M%S”; (well, get that value from your shell, trivial to do in vim).

Now, on to Apache. Make sure the RewriteEngine is on (read more about mod_rewrite). The rewrite rule that I have in the configuration is:
    RewriteRule ^/wiki(/(.*))? /w/index.php$1

That basically ensures we get rid of the ugly index.php in MediaWiki URLs and we get sensible domain.name.com/wiki/PageTitle. When faced with problems, ensure you’re getting the RewriteLog. This is done via:
    RewriteLog /var/log/apache2/rewrite.log
    RewriteLogLevel 3

Now, to debug, get intimate with rewrite.log.

(2) init rewrite engine with requested uri /wiki/Contributing
(3) applying pattern ‘^/wiki(/(.*))?’ to uri ‘/wiki/Contributing’
(2) rewrite ‘/wiki/Contributing’ -> ‘/w/index.php?/Contributing’
(3) split uri=/w/index.php?/Contributing -> uri=/w/index.php, args=/Contributing
(2) local path result: /w/index.php
(2) prefixed with document_root to /data0/forge/work/w/index.php
(1) go-ahead with /data0/forge/work/w/index.php [OK]
(2) init rewrite engine with requested uri /data0/forge/work/w/skins/monobook/main.css
(3) applying pattern ‘^/wiki(/(.*))?’ to uri ‘/data0/forge/work/w/skins/monobook/main.css’

My real problem was there, where document_root was getting a prefix to the actual path. Which as we all know, is easily fixable in LocalSettings.php. And voila! that’s your Apache+MediaWiki issue solved. Now, everything just loads.

Another useful debugging tool, besides the access and error logs, is also the Firefox Page Information (Ctrl+I). You can also see what’s being loaded, and how.

Incidentally, I hopped on to #apache on freenode, only to see many a question being asked about mod_rewrite. I think there’s clearly a big opportunity here, business wise, for good sys-admins. Master Apache.

Technorati Tags: , , , ,


i