Mysql & Apparmour
Monday 18 August 2008When tweaking mysql to use a different data directory, don’t forget to tweak the app armour profile to use the new directory.
For more info on app armour see here.
Systems Administrator at epiGenesys Ltd, Sheffield, UK
When tweaking mysql to use a different data directory, don’t forget to tweak the app armour profile to use the new directory.
For more info on app armour see here.
In the process of installing one of our new servers today I have yet again encountered the annoyance of linux’s arrangement of network cards. Why oh why is the default eth0 never the first network card in the machine. Well after snooping around and being scarred (yes mentally scarred) by talk of udev rules and messing around with the kernel it occured to me that as we use ubuntu and ubuntu is normally sensible there would probably already be a rule and there is, 30 seconds later of swapping around commands and the eth’s were in a sensible order once more. Hurrah!
P.S.
The required rule is:
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address]==”insert_macaddress_of_eth0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
P.P.S
For those less scared by mentions of kernels and rules there is a useful site for writing udev rules over here.
The motto of the Wombles of Wimbledon common, from the books of Elisabeth Beresford and children’s TV show of the 1970s, was to “Make Good Use of Bad Rubbish”. Why have I mentioned this on a technology blog?
Well recently I have been refactoring one of our php applications, in the hope we can resell it to a wider audience than originaly intended, as well as adding extra features to the original application. Whilst writing these updates it struck me that wombling provides an excellent analogy for the process of making a good, reusable, application out of a more disorganised one. We have the “code monkey” term for developing so why not “code womble” for someone refactoring. After all refactoring code is just another term for the process of recycling our old applications, it’s not going to save the earth but it does provide a more agile development process.
Having recently installed a new copy of media wiki I thought I would pass on a few tips towards customising a media wiki install…. There is nothing ground breaking here just a few handy hints.
The mediawiki namespace.
One of the features of mediawiki is that it allows you to edit internal variables through the mediawiki namespace, these are nothing fancy but allow you to edit things like: what the default (main page) is, what the sidebar menus options are, etc.
You can list all of these with the Special:Allmessages page.
Basic Access Control
Another feature we have added is to use the ldap_auth plugin we have tweaked over time which allows us to handle authentication via ldap in apache and media wiki then picks up on these session vars and creates users automatically. We have taken this one step furthur in our current setup and used variables to restrict anonymous users to no access, logged in users to read only and only let sysops edit the wiki using:
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = true;
Yesterday we decided to deploy bugzilla to track our development bugs in an orderly fashion. It’s written in perl, something I have a limited knowledge of, so I duly followed the supplied instructions.
*HINT* If like me you run a debian/ubuntu environment…. ignore the perl based installer instructions (MCAP), use apt-get to install the relevant modules instead.
After spending a few hours yesterday trying just to get it running under MOD_PERL (mainly caused by following the instructions a little too blindly but solved by using apt-get) I eventually had to give up and go home. This morning I decided to abandon MOD_PERL and switch to MOD_CGI which was a much quicker setup method and aparently uses less resources. (According to mozilla’s own doc’s. We are a small company so the speed of MOD_PERL is of not a huge significance).
All well and good I thought, now to intergrate it with our LDAP and authentication option….
Om my word the documentation is poor for this. I eventually figured out that in order to use LDAP and environment session (so my poor users don’t have to login twice) you need to specify an email prefix and use AUTHENTICATE_SAMACCOUNTNAME supplied from apache for the email name. Another tip if your bugzilla LDAP isnt working is to use a cn=;dn=;dn=:passwd format for the bind information.
Whilst Mozilla have not yet released a MSI installer package for their popular web browsing application, there is hope at hand for those that need to deploy the application to a large number of machines. A texan software company, FrontMotion, who provide MSI installer packages to the masses, as well as offering a custom packaging service for those that need it. Check it out @ http://www.frontmotion.com/Firefox/