Uncategorized

3 posts

A few Updates: Upgrade to Nginx 1.4, PHP 5.5, Munin 2.0

Today (well, actually it’s already some days ago on the day of the release of this post) I did some updates on the server. The server is now running nginx 1.4 (more about this change in one of the following blog articles), PHP 5.5 and Munin 2.0. All in all everything went pretty smooth, I had to disable one of my WordPress Plugins because it was not compatible with PHP 5.5 but as it was unmaintained for over 2 years and not important I just deleted it. All of the new software is in Personal Package Archives (ppa) repositories, so they are not part of the official Ubuntu Distribution. But all of the repositories (or at least the important ones: nginx and php) look maintained good enough. At least for my personal server.

add-apt-repository ppa:nginx/stable
add-apt-repository ppa:ondrej/php5
add-apt-repository ppa:josh-boon/munin

And then just run a normal update. Your software should be automatically updated! I also installed a new WordPress Plugin named W3 Total Cache with a nice memcache server, so my blog should be faster than ever 🙂

I still need to get some nice munin graphs for the new opCache in PHP 5.5. Remember that some things have changed in PHP 5.5. You might want to remove some config files on your own (e.g. suhosin.ini). suhosin seems to not maintained anymore and thus is not included in the PHP 5.5 packages. I’ve also had to path the upstart script to create /var/run/php5-fpm (for the sockets). Wev’ve encountered a similar problem at work this week with a different distrubution and a different repositories too.

Getting Munin 2.0 up and running with nginx is a bit tricky but there’s already good documentation out there. And just to be sure, here’s the correct nginx configuration:


    location /munin/static/ {
        auth_basic            "restricted";
        auth_basic_user_file  /etc/htpasswd;
        alias /etc/munin/static/;
    }

    location  ^~  /munin-cgi/munin-cgi-graph/ {
        auth_basic            "restricted";
        auth_basic_user_file  /etc/htpasswd;
        fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass unix:/var/run/munin/fastcgi-munin-graph.sock;
        include fastcgi_params;
    }

    location /munin/ {
        auth_basic            "restricted";
        auth_basic_user_file  /etc/htpasswd;
        fastcgi_split_path_info ^(/munin)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass unix:/var/run/munin/fastcgi-munin-html.sock;
        include fastcgi_params;
    }
  • Official Documentation about munin+nginx: http://munin.readthedocs.org/en/latest/example/webserver/nginx.html
  • A bit more in detail configuration: http://uname.pingveno.net/blog/index.php/post/2013/08/25/Configure-Munin-graphs-with-Nginx-and-Debian-7 Please note the nginx vhost on this site has the possibility to restrict munin users to a particular group. I recommend sticking with the more simpler configuration from the link above.

Learning something new every day…

One of the things I really like about working within a team in one location is the fact that are able to learn something new regularly. And of course you are also able to give some useful advice to others 🙂

Something I learned this week is how to turn on the UID light on a HP server without logging into the iLO webinterface. You can use the tool hpasmcli – which probably can do some more useful stuff too 🙂


# hpasmcli
HP management CLI for Linux (v2.0)
Copyright 2008 Hewlett-Packard Development Group, L.P.

--------------------------------------------------------------------------
NOTE: Some hpasmcli commands may not be supported on all Proliant servers.
Type 'help' to get a list of all top level commands.
--------------------------------------------------------------------------
hpasmcli> set uid on
UID is now on.
hpasmcli> set uid off
UID is now off.
hpasmcli> quit