Azimout's Linux weblog

Upgrade to CM11

leave a comment »

After freeing my Android a year ago, I decided to upgrade to a more up-to-date version of Android/CyanogenMod.

At first I upgraded from CM 10.1 to 10.2; however, many Google apps gave me a “cannot contact Google servers” error (mainly GMail, Google Calendar and Google Play; Maps worked fine).

I tried reinstalling the gapps .apk, I tried clearing the cache, I tried a factory reset and reinstalling CM. Nothing seemed to work. In the end, thanks to some forum thread I realized that maybe it does not work when you have 2-step authentication for your Google account (the authentication itself seemed to succeed on the phone, but then the sync services failed).

So, eventually I decided to try to upgrade to CM 11 nightly. The new problem was that the disk image would fail to install (some error about a get_metadata_recursive method). After some googling I realized that I needed a newer version of the ClockworkMod recovery, just wouldn’t cut it. So I downloaded and heimdall and tried flashing it, which also didn’t work (error message: no recovery partition found).

The solution was to install Rommanager and upgrade the CWM recovery from there. After that, I could install CM 11 and the corresponding Gapps, and now everything seems to work fine.


Written by azimout

02/03/2014 at 08:41

Posted in Problems

Rotate videos from the command line

leave a comment »

To rotate a video from the command line, use avconv (contained in the libav-tools package), which used to be called ffmpeg.

For a single file, type:

avconv -i original.mp4 -vf "transpose=1" rotated.mp4

Written by azimout

10/02/2014 at 09:45

Posted in Howto


leave a comment »

To install WordPress on a Debian system, do this (I’m assuming you have Apache and MySQL already):

  • sudo apt-get install wordpress
  • sudo cp /usr/share/doc/wordpress/examples/apache.conf /etc/apache2/sites-available/wordpress, and remove all lines but the ones you need
  • sudo a2ensite wordpress
  • sudo service apache2 reload

Written by azimout

13/01/2014 at 07:13

Posted in Uncategorized


leave a comment »

A rather useful Linux command that allows you to see all processes run by a user, along with their PIDs, in a tree format is pstree -Ap <user>

Written by azimout

09/01/2014 at 16:18

Posted in Uncategorized


leave a comment »

Installing munin on a Ubuntu system is very simple:

  • sudo apt-get install munin munin-node
  • sudo vi /etc/munin/apache.conf, remove the “Allow from” line and add “Allow from all”
  • sudo service apache2 restart

Now you can see your munin graphs on http:/myserver/munin (replace “myserver” with the URL of your server)

(I am assuming that you already have Apache running)

Architecture: Munin has a master (munin) which connects to one or multiple nodes (munin-node), collects data, produces the graphs and serves the html. In this simple case, there is only one node, which is the same as the master.

Disabling plugins: Munin comes with several plugins, some of which you might not care for. All plugins are installed under /usr/share/munin/plugins, and the enabled ones are symlinked-to under /etc/munin/plugins. So, to disable one, just remove the corresponding symlink under /etc/munin/plugins

For debugging the munin plugins, a useful command is this:
sudo /usr/sbin/munin-node-configure --suggest

Apache stats: In order to see statistics about Apache, you need to sudo a2enmod info

If you have Drupal installed with mod_rewrite enabled for clean URLs, you need to add the following line to the mod_rewrite section of the .htaccess file at the root of your Drupal installation, as described in this thread; otherwise, you’ll get a 404 error.

RewriteCond %{REQUEST_URI} !=/server-status

In order to test if this is enabled, type this:
links http://localhost/server-status

MySQL: Edit file /etc/munin/plugin-conf.d/munin-node, and in section [mysql*], add the following line:

env.mysqladmin /usr/bin/mysqladmin

Also, it might be a good idea to disable the following two (remove the symlinks in /etc/munin/plugins), as they’re currently broken: mysql_innodb, mysql_isam_space_

Run manually: If you’ve made changes to the munin configuration and want to test them without waiting for the 5 minutes to pass, run this command:

sudo -u munin /usr/bin/munin-cron

Written by azimout

25/12/2013 at 18:55

Posted in Reference


with 2 comments

Here’s how you can set up a Nagios server in order to monitor a publicly accessible website and get an email notification when it’s down.

On the monitoring server:

Now create a .cfg file under /etc/nagios3/conf.d with the following contents:

define host {
        use             generic-host
        host_name       xxx
        alias           xxx
        address         xxx
define service {
        use             generic-service
        host_name       xxx
        service_description     HTTP
        check_command   check_http

(replace all instances of xxx with the appropriate values)

Now restart Nagios: sudo service nagios3 restart

Any notifications will be emailed to root@localhost


Written by azimout

22/09/2013 at 20:06

Posted in Howto

How to install request tracker in Ubuntu

leave a comment »

  • sudo apt-get install request-tracker4 rt4-db-mysql rt4-apache2 libapache2-mod-fcgid
  • sudo cp /etc/request-tracker4/apache2-fcgid.conf /etc/apache2/sites-available/rt4
  • sudo a2ensite rt4; sudo service apache2 restart

To edit RT’s configuration, don’t edit directly the file /etc/request-tracker4/ Instead, change the files (or add one) under /etc/request-tracker4/RT_SiteConfig.d/*, then run sudo update-rt-siteconfig

Written by azimout

03/07/2013 at 10:17

Posted in Howto