QuicksearchCreative CommonsBlog Administration |
Upgrade packages on Centos 4 for Wordpress 3.3Friday, December 16. 2011Recently I had to upgrade MySQL and PHP to enable the latest and greatest version of WordPress on a server. The server is currently still running CentOS 4, but didn't want to upgrade it to a newer major version. Thanks to the builds of Jason Litka for RHEL4/CentOS 4, I was able to upgrade the packages... Finally I was able to upgrade the following packages:
You can easily enable the repo by adding a .repo file to /etc/yum.repos.d/ on your box with the following content: [utterramblings] Please note that some modules are changed if you upgrade Apache from 2.0 to 2.2, for example mod_access functionality moved into mod_authz_host. Another "weird" thing was that the dovecot package had a dependency on /usr/lib/mysql/libmysqlclient.so.14, this can be solved by installing the mysqlclient14.i386 rpm.
Posted by Pieter de Rijk
at
13:48
Block mail from certain countries with sendmailMonday, December 12. 2011If you have your own MTA running... you are probably known with the spam-problems... Once you've tuned the filters, you have to do it again... because a new spam-run comes in. I also blocked whole /8 subnets in different countries (India/China/...)... but that is not a "real" solution... aka I want to block the whole country... The "DNSBL" countries.nerd.dk allows you to do so... the map ip-adresses to countries based on whois-information... so on my MTAs I added the following lines to the mc sendmail file: FEATURE(dnsbl,`br.countries.nerd.dk', `554 - Rejected - SPAM from Brazil:$&{client_addr} rejected')dnl And within a few hours the first are already blocked... I hope this will reduce the amount of incomming spam at the "front door". Because simply... I don't know people in these countries... FreeBSD upgrade a prerelease to a releaseWednesday, November 30. 2011Some while ago I installed a FreeBSD server with 7.3-PRERELEASE, although now I wanted to have it properly upgraded to 7.3-RELEASE. I looked into it quite often... although run into the issue that it didn't work... # uname -r On the FreeBSD forum I found the following thread: Based on the information there I performed the following steps: # env UNAME_r=7.3-RELEASE freebsd-update -v debug fetch -r 7.3-RELEASE Then install the updates: # env UNAME_r=7.3-RELEASE freebsd-update -v debug install And as last step do a reboot, and the result is: # uname -r How to update Python bindings to subversion.Wednesday, July 13. 2011Recently I run into the problem that a team had a requirement for subversion 1.6.6 (while CentOS 5u3 was not supporting this... but the vendor didn't provide a newer release). This team also had a requirement to have TRAC... TRAC is depended on Python... but I was not allowed to update the subversion bindings for python by updating the it on the whole system... so... this is what I did:
Posted by Pieter de Rijk
in Linux/Unix/BSD, System Information Scanner, System Op stuff, Work
at
20:33
CentOS 5 enabling Two-factor SSH authentication via GoogleTuesday, June 21. 2011Today I noticed a very nice article about enabling Google's two-factor authentication for Linux SSH. After reading it... I found some time to play with it... so I enabled it within 10 minutes on my CentOS 5 64bit play-ground server... but there are some small 'caveats'. hg - Command To checkout the code, you must make install the mercurial RPM... this one is available via the EPEL repositories. So after having the EPEL repositories enabled, run as root: yum -y install mercurial Compiling the PAM module When you checked out the code. hg clone https://google-authenticator.googlecode.com/hg/ google-authenticator/ You cannot compile directly the module... therefor you must apply a small change to the Makefile. Change where /usr/lib/libdl.so is stated to /usr/lib64/libdl.so (3 occurrences) $ make Now you've to update the /etc/pam.d/sshd so it contains: #%PAM-1.0 Configure SSH You also have to make sure that in /etc/ssh/sshd_config the following settings are set on yes: ChallengeResponseAuthentication yes And restart the SSH-daemon Set up your smartphone/credentials on the system $ google-authenticator And you're done Give it a try to SSH to that box... TIP: Make sure you've an SSH session still open... or you might lock yourself out of the system...
WordPress template with jQuery flippageTuesday, May 24. 2011Recently I've been working on creating a template for WordPress for my brother in law's company. My brother in law is photographer so I had also had to implement albums/galleries using "jQuery jFlip". So I decided to use the "NextGEN Gallery" plugin for WordPress. The benefit of NextGEN Gallery is that it allows you to add custom gallery templates to your WordPress template/theme by having in your theme-folder a nggallery folder and files named gallery-{template_name}.php. To enable jQuery jFlip with NextGEN Gallery I had to do the following modifications: Add to $TEMPLATE_PATH/header.php the following lines in the head section: <!--[if IE]><script src="<?php bloginfo('template_url'); ?>/js/excanvasX.js" type="text/javascript"></script><![endif]--> Make sure you put jquery-1.6.1.min.js and jquery-jflip-0.4.min.js and excanvasX.js (for IE support) in your template, or deep link to the developer sites. And now create a NextGEN template $TEMPLATE_PATH/nggallery/gallery-flippage.php: <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?> Please note the 'jQuery.noConflict()'... please make sure it's there other wise it will drive you crazy Now make sure the NextGen gallery plugin is active and make a page in WordPress with the following content:
[nggallery id=5 template=flippage] That's all
And the results can be checked here. Use maildrop to forward a mail to another mail boxThursday, November 11. 2010I recently had the need to forward e-mail based on the from field to another mailbox. I know, it's possible with a simple .forward in your $HOME, but that will forward all the mail. So after some further searching I end up with the following rule for your maildrop filter... it simply checks if the mail (in this example) is from linus@mail.example.com and will forward it to linuxbox@collector.example.com: if ( /^From: .*linus@mail\.example\.com.*/ ) And that's all you need to put add to your $HOME/.mailfilter Use Picasa RSS Feed to show album on my own websiteTuesday, October 19. 2010Recently I've moved the web albums of my kids from my own webserver to Google Picasa. But... I wanted to keep my nice javascript based carousel In the current code I already had some PHP-code that creates the content of the carousel using an array. Now I added two new features in the 'website'.
1. Config files One 'global' config:
Per album I've a config.php in that directory, so for example we've the following content: <?php 2. Download the RSS (XML) feed and cache it: <?php 3. Extract the URLs with the photos from the feed <?php That's all The Linux Kernel exploit - become root by running 32bit code on a 64bit machineWednesday, October 13. 2010A lot of discussion is about one of the last kernel exploits... the one that you can become root using 32bit code on a 64bit machine. So I wanted to know if I'm vulnerable as well... just wanted to know how it works So I simply did (as normal user) on a vulnerable version of the Linux kernel on CentOS 5.5: $ mkdir /tmp/expl Now run the binary: [pieter@testbox ~]$ whoami [pieter@testbox ~]$ whoami
Fixed LDAP after upgrading from CentOS 5.4 to 5.5Monday, October 4. 2010Some months ago I upgraded my CentOS servers from version 5.4 to 5.5. One of these servers were running LDAP Master and LDAP Slave as playground. Although after the upgrade to CentOS 5.5 it was broken, but due to other priorities I didn't had a change to fix it. On my systems I enabled TLS to communicate to LDAP-servers and also enabled kerberos. So this results in a modified /etc/sysconfig/ldap: # Enable Kerberos But I noticed that the RPM installed a new version of that, although with the extension .rpmnew. So after applying the changes that were in the .rpmnew file and when I set SLAPD_LDAPS and SLAPD_LDAPI to "yes" I end up with the following content: # Parameters to ulimit called right before starting slapd And guess what... It works again use subversion to publish websitesWednesday, August 4. 2010Sometimes I'm really surprised about myself... especially how lazy I am. I'm currently playing around with one of my private websites, and to improve developing I decided to use subversion. So far so good, but I wanted that the committed subversion code was automatically online on the webserver. So I did the following very simple trick. First I check out the code (subtree) from the subversion server (which is using https): $ cd /sites Next step was to commit the current content of the website into subversion: $ cd /sites/dev.adslweb.net Now download the simple script I created for making sure that subversion doesn't fire off twice for updating the same tree. Download svn-update.sh via this link. So something like this: $ mkdir ~/scripts/ Now... the last step... create a crontab entry with the following content: */1 * * * * /home/pieter/scripts/svn-update.sh /sites/dev.adslweb.net 2>&1 > /dev/null And guess... and it works like a charm, on every new commit done by whoever... you get your online site updated within 1 minute without the need log in into the website/webserver using ftp/ssh/whatever.
Posted by Pieter de Rijk
at
19:54
More flexible yum-repo sync scriptTuesday, June 1. 2010In the past I started syncing every night the Updates-repositories from Fedora and CentOS on a local server, just to speed up updates/kick starts et cetera... The first version of the script was very quick and dirty, now I've a more decent script that allow you to add/remove very quick new versions of CentOS and Fedora. You can find the script here.
Posted by Pieter de Rijk
at
08:30
How full are your snapshot volumes in LVM?Thursday, April 22. 2010As I mentioned in my previous post, which is already 2 months old :(, I'm using snapshots for data retention. Now I run up in the situation, that I wanted to know how full the snapshots are. A 'normal' df will not work... but I figured it out! The command lvs is willing to do the work: # lvs --aligned --separator \| vol_backup
In the 'Snap%' column you can see how full your snapshot volume is!
Posted by Pieter de Rijk
at
08:29
Creating Snapshots of a backup using LVM snapshotMonday, February 22. 2010Normally I used to have a backup-retention-script in place that will create a TAR-ball of the backup data (using Herakles). But this way I was not able to have a retention of longer then 3 days So I had to look into another solution, I could add a new harddrive in the server... but there should be something else possible. So I ended up by using LVM snapshots. So I created a Volume group of about 100GB. In that volume group I created a logical volume of about 30GB, which is enough (and if not, we can 'grow' the Filesystem thanks to LVM After having all that done, I've created a script located in /root/scripts/lvm-snapshot. This script runs every midnight and creates a snapshot. #!/bin/bash And the crontab entry is: # crontab -l Import private key and (signed) certificate into Java keystore (JKS)Thursday, January 28. 2010Last monday, I had to 'secure' the smcwebserver from Sun (or should I say Oracle?), that is used by ARCo. But I run into a few issues:
But... I was able to handle them both and know I have an smcwebserver (which is using Java-keystores) running with a key that was generated by openssl and a certificated signed by our enterprise CA. There for I had to do some Java 'hacking'. After some hours spending on Google-searches, I landed on a posting on the website of 'Agent Bob'. He has some Java-program that allows you to 'import' keys and certificates that were generated outside keytool Although, I had to perform some minor modification on the Java-code, to set the password of the new JKS to 'changeit', because that is what smcwebserver will try to open the keystore. So, you need to make sure that line 87 is: Now, create a Java class with the command (please note, I'm not a Java-specialist, so something else will work as well... but this worked for me
$ openssl x509 -in server.crt \
We can import the keys with the Java-program: And last, but not least, put the keystore in place (and of course we make sure we've a backup of the old one): Now we have to restart the smcwebserver: # smcwebserver stop That's all
Posted by Pieter de Rijk
at
08:25
(Page 1 of 13, totaling 181 entries)
» next page
Competition entry by David Cummins powered by Serendipity v1.0 |
Some cool linksCategoriesgoogle Analytics |

