<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #4: Migrate Piwik from GreenQloud</title>
    <link>https://trac.crin.org/trac/ticket/4</link>
    <description>&lt;p&gt;
Migrate the &lt;a class="ext-link" href="https://stats.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://stats.crin.org/&lt;/a&gt; Piwik site for the GreenQloud server to crin1.crin.org.
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CRIN Trac</title>
      <url>https://trac.crin.org/trac/chrome/site/logo.gif</url>
      <link>https://trac.crin.org/trac/ticket/4</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 29 Apr 2015 13:46:34 GMT</pubDate>
      <title>hours changed; totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/4#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/4#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;3&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;3&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
First set up ssh keys so that data can be rsynced from web2.crin.org to crin1.crin.org.
&lt;/p&gt;
&lt;p&gt;
Generate a ssh key pair on crin1:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
ssh-keygen -t rsa -b 4096
&lt;/pre&gt;&lt;p&gt;
Added the public key, &lt;tt&gt;~/.ssh/id_rsa.pub&lt;/tt&gt; to the &lt;tt&gt;~/.ssh/authorized_keys&lt;/tt&gt; file on web2.crin.org and created a &lt;tt&gt;~/.ssh/config&lt;/tt&gt; file on crin1 containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Host web2
  User root
  Hostname web2.crin.org
&lt;/pre&gt;&lt;p&gt;
Test the connection from crin1:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ssh web2
  The authenticity of host 'web2.crin.org (46.149.26.18)' can't be established.
  ECDSA key fingerprint is 2c:4d:b8:b7:f9:70:37:61:a0:80:cb:0c:2b:9b:e1:b6.
  Are you sure you want to continue connecting (yes/no)? yes
&lt;/pre&gt;&lt;p&gt;
Checked the fingerprint against the server, all good.
&lt;/p&gt;
&lt;p&gt;
Add a piwik user to crin1:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
adduser --system --disabled-password --disabled-login --group --home=/var/www/piwik piwik
&lt;/pre&gt;&lt;p&gt;
Install &lt;tt&gt;rsync&lt;/tt&gt; on both servers:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install rsync
&lt;/pre&gt;&lt;p&gt;
Copy data across and chown it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rsync -av web2:/var/www/piwik/ /var/www/piwik/
chown -R piwik:piwik /var/www/piwik/
&lt;/pre&gt;&lt;p&gt;
Create a script in &lt;tt&gt;/root/bin/&lt;/tt&gt; to sync the data containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
rsync -av --exclude "config.ini.php" web2:/var/www/piwik/ /var/www/piwik/
ssh web2 "mysqldump -upiwik -pXXXX piwik &amp;gt; /root/piwik.sql"
scp web2:piwik.sql /var/www/piwik/
&lt;/pre&gt;&lt;p&gt;
Install MySQL:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install mysql-server-5.5
&lt;/pre&gt;&lt;p&gt;
Create a &lt;tt&gt;/root/.my.cnf&lt;/tt&gt; file with the root password so root can use MySQL on the command line without a password:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[client]
user = root
password = XXXX
host = localhost
&lt;/pre&gt;&lt;p&gt;
Create a database for &lt;tt&gt;piwik&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
mysql mysql
 mysql&amp;gt; CREATE DATABASE piwik;
 mysql&amp;gt; GRANT ALL ON piwik.* to 'piwik'@'localhost' identified by 'XXX';
 mysql&amp;gt; FLUSH PRIVILEGES;
&lt;/pre&gt;&lt;p&gt;
Edit the password in &lt;tt&gt;/var/www/piwik/config/config.ini.php&lt;/tt&gt; and import the database and add this line to the script:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cat /root/piwik.sql | mysql piwik
&lt;/pre&gt;&lt;p&gt;
Set up Apache, create &lt;tt&gt;/etc/apache2/sites-available/piwik.conf&lt;/tt&gt; containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;&amp;lt;VirtualHost *:80&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID piwik piwik
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName stats.crin.org
        ServerAlias www.stats.crin.org
        ServerAlias stats.crin1.crin.org
        &amp;lt;If "%{HTTP_HOST} == 'stats.crin.org'"&amp;gt;
                Redirect / https://stats.crin.org/
        &amp;lt;/If&amp;gt;
        &amp;lt;If "%{HTTP_HOST} == 'www.stats.crin.org'"&amp;gt;
                Redirect / https://stats.crin.org/
        &amp;lt;/If&amp;gt;
        &amp;lt;If "%{HTTP_HOST} == 'stats.crin1.crin.org'"&amp;gt;
                Redirect / https://stats.crin1.crin.org/
        &amp;lt;/If&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;IfModule mod_ssl.c&amp;gt;
&amp;lt;VirtualHost *:443&amp;gt;
        &amp;lt;IfModule mpm_itk_module&amp;gt;
                AssignUserID piwik piwik
                MaxClientsVHost 60
        &amp;lt;/IfModule&amp;gt;
        ServerName stats.crin.org
        ServerAlias www.stats.crin.org
        ServerAlias stats.crin1.crin.org
        ServerAdmin chris@webarchitects.co.uk
        DocumentRoot /var/www/piwik
        &amp;lt;Directory /&amp;gt;
                Options FollowSymLinks
                AllowOverride None
                Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;Directory /var/www/piwik&amp;gt;
                Options SymLinksIfOwnerMatch
                AllowOverride All
                Require all granted
        &amp;lt;/Directory&amp;gt;
        &amp;lt;Directory /var/www/piwik/html/config&amp;gt;
                Require all denied
        &amp;lt;/Directory&amp;gt;
        &amp;lt;IfModule mod_php5.c&amp;gt;
                php_admin_value open_basedir /var/www/piwik
                php_admin_value upload_tmp_dir /var/www/piwik/tmp
                php_admin_value session.save_path /var/www/piwik/tmp
                php_admin_value file_uploads On
                php_admin_value geoip.custom_directory /var/www/piwik/misc
        &amp;lt;/IfModule&amp;gt;
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        ErrorLog ${APACHE_LOG_DIR}/piwik.error.log
        CustomLog ${APACHE_LOG_DIR}/piwik.ssl_access.log combined
        SSLEngine on
        SSLCertificateFile    /etc/ssl/gandi/stats.cert.pem
        SSLCertificateKeyFile /etc/ssl/gandi/stats.key.pem
        SSLCACertificateFile  /etc/ssl/gandi/root.pem
        &amp;lt;IfModule headers_module&amp;gt;
                # Use HTTP Strict Transport Security to force client to use secure connections only
                Header always set Strict-Transport-Security "max-age=31536000"
                # mitigate TIME attack
                Header always append X-Frame-Options "sameorigin"
        &amp;lt;/IfModule&amp;gt;
        &amp;lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/FilesMatch&amp;gt;
        &amp;lt;Directory /usr/lib/cgi-bin&amp;gt;
                SSLOptions +StdEnvVars
        &amp;lt;/Directory&amp;gt;
        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Check all the &lt;tt&gt;.htaccess&lt;/tt&gt; files in &lt;tt&gt;/var/www/piwik&lt;/tt&gt; for Apache 2.4 syntax and update &lt;tt&gt;misc/cron/.htaccess&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# Allow direct web access to Web cron
&amp;lt;Files "archive.php"&amp;gt;
&amp;lt;IfModule mod_version.c&amp;gt;
        &amp;lt;IfVersion &amp;lt; 2.4&amp;gt;
                Order Allow,Deny
                Allow from all
        &amp;lt;/IfVersion&amp;gt;
        &amp;lt;IfVersion &amp;gt;= 2.4&amp;gt;
                Require all granted
        &amp;lt;/IfVersion&amp;gt;
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule !mod_version.c&amp;gt;
        &amp;lt;IfModule !mod_authz_core.c&amp;gt;
                Order Allow,Deny
                Allow from all
        &amp;lt;/IfModule&amp;gt;
        &amp;lt;IfModule mod_authz_core.c&amp;gt;
                Require all granted
        &amp;lt;/IfModule&amp;gt;
&amp;lt;/IfModule&amp;gt;
&amp;lt;/Files&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Enable the headers module:
&lt;/p&gt;
&lt;pre class="wiki"&gt;a2enmod headers
service apache2 restart
&lt;/pre&gt;&lt;p&gt;
Rsync the certs:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /etc/ssl/gandi
rsync -av web2:/etc/ssl/gandi/stats* .
&lt;/pre&gt;&lt;p&gt;
Symlink the Apache config and test and restart:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /etc/apache2/sites-enabled/
ln -s ../sites-available/piwik.conf 10-piwik.conf
apache2ctl configtest
service apache2 restart
&lt;/pre&gt;&lt;p&gt;
Add the following to &lt;tt&gt;/var/www/piwik/config/config.ini.php&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[General]
trusted_hosts[] = "stats.crin1.crin.org"
&lt;/pre&gt;&lt;p&gt;
Edit &lt;tt&gt;/etc/apache2/apache2.conf&lt;/tt&gt; to change:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ServerName crin1.crin.org
&lt;/pre&gt;&lt;p&gt;
Edit &lt;tt&gt;/etc/apache2/mods-available/ssl.conf&lt;/tt&gt; to change:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        #   Enable only secure ciphers:
        #SSLCipherSuite HIGH:!aNULL
        # https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29
        SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
        # SSLProtocol all -SSLv3
        SSLProtocol -ALL +TLSv1 +TLSv1.1 +TLSv1.2
        SSLHonorCipherOrder on
	SSLCompression off
&lt;/pre&gt;&lt;p&gt;
Check the apache syntax:
&lt;/p&gt;
&lt;pre class="wiki"&gt;source /etc/apache2/envvars
/usr/sbin/apache2 -S
VirtualHost configuration:
93.95.228.179:80       trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:1)
93.95.228.179:443      trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:15)
*:80                   stats.crin.org (/etc/apache2/sites-enabled/10-piwik.conf:1)
*:443                  stats.crin.org (/etc/apache2/sites-enabled/10-piwik.conf:21)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
&lt;/pre&gt;&lt;p&gt;
Test the site at &lt;a class="ext-link" href="https://stats.crin1.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://stats.crin1.crin.org/&lt;/a&gt; and we have the TLS cert from trac.crin.org, this was fixed by changing the trac apache config VirtualHost configuration so we now have:
&lt;/p&gt;
&lt;pre class="wiki"&gt;/usr/sbin/apache2 -S
VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:1)
         port 80 namevhost trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:1)
         port 80 namevhost stats.crin.org (/etc/apache2/sites-enabled/10-piwik.conf:1)
                 alias www.stats.crin.org
                 alias stats.crin1.crin.org
*:443                  is a NameVirtualHost
         default server trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:15)
         port 443 namevhost trac.crin.org (/etc/apache2/sites-enabled/00-trac.conf:15)
         port 443 namevhost stats.crin.org (/etc/apache2/sites-enabled/10-piwik.conf:21)
                 alias www.stats.crin.org
                 alias stats.crin1.crin.org
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
&lt;/pre&gt;&lt;p&gt;
Install PHP:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install libapache2-mod-php5 php-pear php-xml-parser php5-curl php5-gd php5-geoip php5-imagick php5-intl php5-mysqlnd
&lt;/pre&gt;&lt;p&gt;
And now Piwik is working (with the cert error due to the tmp domain name):
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://stats.crin1.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://stats.crin1.crin.org/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Though note it needs upgrading and the system check threw this up:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;blockquote&gt;
&lt;p&gt;
always_populate_raw_post_data=-1
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
To prevent some critical issue, you must set the following in your php.ini file: always_populate_raw_post_data=-1
After making this change, restart your web server.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So &lt;tt&gt;/etc/php5/apache2/php.ini&lt;/tt&gt; was edited:
&lt;/p&gt;
&lt;pre class="wiki"&gt;always_populate_raw_post_data=-1
&lt;/pre&gt;&lt;p&gt;
There was also this issue with MySQL permissions:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
LOAD DATA INFILE
&lt;/p&gt;
&lt;p&gt;
Using LOAD DATA INFILE will greatly speed Piwik's archiving process up. To make it available to Piwik, try updating your PHP &amp;amp; MySQL software and make sure your database user has the FILE privilege.
&lt;/p&gt;
&lt;p&gt;
If your Piwik server tracks high traffic websites (eg. &amp;gt; 100,000 pages per month), we recommend to try fix this problem.
Error: LOAD DATA INFILE failed... Error was:
Try #1: LOAD DATA INFILE : SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'piwik'@'localhost' (using password: YES)[28000]
&lt;/p&gt;
&lt;p&gt;
Troubleshooting: &lt;a class="ext-link" href="https://stats.crin1.crin.org/index.php?module=Proxy&amp;amp;action=redirect&amp;amp;url=http://piwik.org/faq/troubleshooting/%23faq_194"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;FAQ on piwik.org&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql mysql
  mysql&amp;gt; GRANT FILE on *.* to piwik@localhost;
  mysql&amp;gt; FLUSH PRIVILEGES;
  mysql&amp;gt; exit;
&lt;/pre&gt;&lt;p&gt;
Also needed to:
&lt;/p&gt;
&lt;pre class="wiki"&gt;chmod 755 /var/www/piwik
&lt;/pre&gt;&lt;p&gt;
This is probably now working enough to switch the DNS after a final sync of the data using the script that was created for this, however since the ownCloud setup on &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/3" title="task: Migrate ownCloud from GreenQloud (closed: fixed)"&gt;ticket:3&lt;/a&gt; and MediaWiki setup on &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/5" title="task: Migrate MediaWiki from GreenQloud (closed: fixed)"&gt;ticket:5&lt;/a&gt; will probably involve some Apache / MySQl downtime best wait till those sites are also ready to be made live.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 01 May 2015 11:42:04 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/4#comment:2</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/4#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.6&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3&lt;/em&gt; to &lt;em&gt;3.6&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
A &lt;a class="ext-link" href="https://piwik.org/changelog/piwik-2-13-0/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;new version of Piwik is out&lt;/a&gt;, so this is a good opportunity to document the upgrade steps, first sync the server with the current live server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;bash /root/bin/piwik-sync
&lt;/pre&gt;&lt;p&gt;
Set Piwik not to record stats while we are upgrading:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
cd /var/www
vi piwik/config/config.ini.php
&lt;/pre&gt;&lt;p&gt;
Added this section to the ini file:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[Tracker]
record_statistics = 0
&lt;/pre&gt;&lt;p&gt;
Download and verify the new version:
&lt;/p&gt;
&lt;pre class="wiki"&gt;export PIWIK="2.13.0"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz.asc"
gpg --verify piwik-$PIWIK.tar.gz.asc
  gpg: directory `/root/.gnupg' created
  gpg: new configuration file `/root/.gnupg/gpg.conf' created
  gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
  gpg: keyring `/root/.gnupg/pubring.gpg' created
  gpg: assuming signed data in `piwik-2.13.0.tar.gz'
  gpg: Signature made Thu 30 Apr 2015 02:51:13 AM GMT using RSA key ID 5590A237
  gpg: Can't check signature: public key not found
gpg --search-keys 5590A237
  gpg: keyring `/root/.gnupg/secring.gpg' created
  gpg: searching for "5590A237" from hkp server keys.gnupg.net
  (1)     Matthieu Aubry &amp;lt;matt@piwik.org&amp;gt;
          Matthieu Aubry &amp;lt;matt@piwik.pro&amp;gt;
          Matthieu Aubry (WCuCl7) &amp;lt;matt@piwik.pro&amp;gt;
          Matthieu Aubry &amp;lt;matthieu.aubry@gmail.com&amp;gt;
            4096 bit RSA key 5590A237, created: 2013-07-24
  Keys 1-1 of 1 for "5590A237".  Enter number(s), N)ext, or Q)uit &amp;gt; 1
  gpg: requesting key 5590A237 from hkp server keys.gnupg.net
  gpg: /root/.gnupg/trustdb.gpg: trustdb created
  gpg: key 5590A237: public key "Matthieu Aubry &amp;lt;matt@piwik.org&amp;gt;" imported
  gpg: no ultimately trusted keys found
  gpg: Total number processed: 1
  gpg:               imported: 1  (RSA: 1)
&lt;/pre&gt;&lt;p&gt;
Backup the config file:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cp piwik/config/config.ini.php .
&lt;/pre&gt;&lt;p&gt;
Extract the new version, set the ownerships, copy back the config file and run the updater:
&lt;/p&gt;
&lt;pre class="wiki"&gt;tar -zxvf piwik-$PIWIK.tar.gz
cp config.ini.php piwik/config/
chown -R root:root /var/www/piwik/
chown piwik:piwik /var/www/piwik/config/config.ini.php
chown -R piwik:piwik /var/www/piwik/tmp
php /var/www/piwik/console core:update
      *** Update ***
      Database Upgrade Required
      Your Piwik database is out-of-date, and must be upgraded before you can continue.
      Piwik database will be upgraded from version 2.11.2 to the new version 2.13.0.
      *** Note: this is a Dry Run ***
      *** End of Dry Run ***
  A database upgrade is required. Execute update? (y/N) y
  Starting the database upgrade process now. This may take a while, so please be patient.
      *** Update ***
      Database Upgrade Required
      Your Piwik database is out-of-date, and must be upgraded before you can continue.
      Piwik database will be upgraded from version 2.11.2 to the new version 2.13.0.
      The database upgrade process may take a while, so please be patient.
  ****************************************
    Piwik has been successfully updated!
  ****************************************
&lt;/pre&gt;&lt;p&gt;
Then reset the config file to record stats:
&lt;/p&gt;
&lt;pre class="wiki"&gt;vim piwik/config/config.ini.php
&lt;/pre&gt;&lt;p&gt;
And check the status of the system check in the web interface at &lt;a class="ext-link" href="https://stats.crin1.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://stats.crin1.crin.org/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
There was this issue:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Uploading files is not enabled in your PHP configuration. To upload your custom logo please set file_uploads=1 in php.ini and restart your webserver.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
But in &lt;tt&gt;/etc/php5/apache2/php.ini&lt;/tt&gt; there is:
&lt;/p&gt;
&lt;pre class="wiki"&gt;file_uploads = On
&lt;/pre&gt;&lt;p&gt;
And also this is set in &lt;tt&gt;/etc/apache2/sites-enabled/10-piwik.conf&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;php_admin_value file_uploads On
&lt;/pre&gt;&lt;p&gt;
So that was changed to:
&lt;/p&gt;
&lt;pre class="wiki"&gt;php_admin_value file_uploads 1
&lt;/pre&gt;&lt;p&gt;
And the error has gone.
&lt;/p&gt;
&lt;p&gt;
I have also created &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/PiwikServer"&gt;wiki:PiwikServer&lt;/a&gt; and added the steps to upgrade Piwik to that page, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/PiwikServer#Upgrades"&gt;PiwikServer#Upgrades&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 07 May 2015 11:05:12 GMT</pubDate>
      <title>hours, estimatedhours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/4#comment:3</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/4#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.07&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;estimatedhours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;4&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.6&lt;/em&gt; to &lt;em&gt;3.67&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This site is ready for a final sync using &lt;tt&gt;/root/bin/piwik-sync&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and then a DNS update, and also a &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Piwik#Upgrades"&gt;wiki:Piwik#Upgrades&lt;/a&gt; as &lt;a class="ext-link" href="https://piwik.org/changelog/piwik-2-13-1/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Piwik 2.13.1&lt;/a&gt; is out.
&lt;/p&gt;
&lt;p&gt;
3h 36m has been spent on this ticket so far, I estimate that it will end up taking 4 hours in total.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 05 Jun 2015 19:12:09 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/4#comment:4</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/4#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.35&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.67&lt;/em&gt; to &lt;em&gt;4.02&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Syncing the GreenQloud server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
bash bin/piwik-sync
&lt;/pre&gt;&lt;p&gt;
Update the server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /var/www
export PIWIK="2.13.1"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz"
wget "https://builds.piwik.org/piwik-$PIWIK.tar.gz.asc"
gpg --verify piwik-$PIWIK.tar.gz.asc
cp piwik/config/config.ini.php .
tar -zxvf piwik-$PIWIK.tar.gz
cp config.ini.php piwik/config/
chown -R piwik:piwik /var/www/piwik/
php /var/www/piwik/console core:update
      *** Update ***
      Database Upgrade Required
      Your Piwik database is out-of-date, and must be upgraded before you can continue.
      Piwik database will be upgraded from version 2.11.2 to the new version 2.13.1.
      *** Note: this is a Dry Run ***
      delete from `option` where option_name like '%defaultReport%' and option_value='';
      *** End of Dry Run ***
  A database upgrade is required. Execute update? (y/N) y
  Starting the database upgrade process now. This may take a while, so please be patient.
      *** Update ***
      Database Upgrade Required
      Your Piwik database is out-of-date, and must be upgraded before you can continue.
      Piwik database will be upgraded from version 2.11.2 to the new version 2.13.1.
      The database upgrade process may take a while, so please be patient.
    Executing delete from `option` where option_name like '%defaultReport%' and option_value=''... Done. [1 / 1]
  ****************************************
    Piwik has been successfully updated!
  ****************************************
&lt;/pre&gt;&lt;p&gt;
Tested the web interface, everything seems fine.
&lt;/p&gt;
&lt;p&gt;
I have updated the DNS in the web interface so soon people should start to get the Piwik site on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; rather than the GreenQloud server.
&lt;/p&gt;
&lt;p&gt;
The DNS servers haven't updated yet, this will need checking again in a while.
&lt;/p&gt;
&lt;pre class="wiki"&gt;dig @NS1.1984.IS www.stats.crin.org +short
  46.149.26.18
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 05 Jun 2015 19:17:50 GMT</pubDate>
      <title>cc, hours, status, totalhours changed; resolution set</title>
      <link>https://trac.crin.org/trac/ticket/4#comment:5</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/4#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;gillian&lt;/em&gt; &lt;em&gt;jenny&lt;/em&gt; added; &lt;em&gt;jonas&lt;/em&gt; removed
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.05&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;4.02&lt;/em&gt; to &lt;em&gt;4.07&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The 1984.is DNS servers have updated, so they should for everyone else soon, closing this ticket as completed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>