Showing posts with label Open Source. Show all posts
Showing posts with label Open Source. Show all posts

Saturday, May 9, 2009

Generating Website Statistics With Piwik, An Open-Source, Google Analytics-Like Web Analytics Tool - Page 2

Now fill in a user name for the Piwik administrator (e.g. admin), a password for that user, and the email address of that user. This is the username and password that you'll need later on to log into Piwik:














You can configure Piwik to generate reports for multiple web sites later on, but during the installation, we configure Piwik for our first (and maybe only?) web site. Fill in a name for that web site and its URL:














Afterwards, Piwik will display a Javascript code for that web site. Copy it and paste it right above the tag of all pages belonging to the web site that you've configured in the last screen (www.example.com):














Click on Next afterwards:

The installation is now finished. Click on Continue to Piwik:





3 Using Piwik

Now log in with the account you've created during the installation:



This is the Piwik Dashboard (in my example it's quite empty, but on a real-life system, you should see quite a lot statistics after some time):

You can manage Piwik by clicking on the Settings link in the upper right corner. Here you can enable or disable Piwik plugins,...

..., manage users and access permissions,...


... and add further web sites (you will get a unique Javascript code for each web site):


4 High-Traffic Web Sites

The Piwik reports are generated in real-time which can make the Piwik web interface a little bit slow on high-traffic web sites. Therefore you should set up a cron job (as described on http://piwik.org/docs/setup-auto-archiving/) that generates the reports once a day - the Piwik interface should then react faster again:

crontab -e

MAILTO="falko@example.com"
5 0 * * * www-data /var/www/example.com/web/piwik/misc/cron/archive.sh

(This generates the reports each day at 00:05h. Make sure you use the correct user name for the web server. On Debian/Ubuntu, it's www-data, on Fedora/CentOS, it's apache.)

Make the /var/www/example.com/web/piwik/misc/cron/archive.sh file executable:

chmod 755 /var/www/example.com/web/piwik/misc/cron/archive.sh

Then run it manually to see if it throws any errors:

/var/www/example.com/web/piwik/misc/cron/archive.sh

If you see something like this...

[root@server1 cron]# /var/www/example.com/web/piwik/misc/cron/archive.sh
/var/www/example.com/web/piwik/misc/cron/archive.sh: line 20: /usr/bin/php5: No such file or directory
[root@server1 cron]#

... run...

which php

... to find out where PHP is located...

[root@server1 cron]# which php
/usr/bin/php
[root@server1 cron]#

... and edit /var/www/example.com/web/piwik/misc/cron/archive.sh:

vi /var/www/example.com/web/piwik/misc/cron/archive.sh

Change PHP_BIN; also adjust the PIWIK_PATH variable:

[...]
PHP_BIN=/usr/bin/php
PIWIK_PATH=/var/www/example.com/web/piwik/index.php
[...]

Then run

/var/www/example.com/web/piwik/misc/cron/archive.sh

again. It shouldn't throw any errors anymore.

Generating Website Statistics With Piwik, An Open-Source, Google Analytics-Like Web Analytics Tool

This guide explains how you can install and use Piwik for generating website analytics. The reports generated by Piwik are similar to the ones generated by Google Analytics. Piwik is an Open-Source (GPL) tool that you can download and host on your own servers which means you are in full control over your data. In addition to that, Piwik's functionality can be extended by plugins.

I do not issue any guarantee that this will work for you!

1 Preliminary Note

I'm using the web site www.example.com here with the document root /var/www/example.com/web/. I'm assuming that the web site is working, and that PHP 5.1 or newer is installed on the server. I'm also assuming that you have an empty MySQL database that you can use for the Piwik installation. I'm using the database c0piwik with the database user c0piwik and the password piwik here (ask your hoster to create an empty MySQL database for you, or create it yourself through your control panel, e.g. ISPConfig).

2 Installing Piwik

Download Piwik to your desktop and unzip it. This will give you a folder latest/piwik/. Upload the piwik/ folder to your document root (e.g. with FTP). In my case where the document root is /var/www/example.com/web/ this will result in a folder /var/www/example.com/web/piwik/.

Now open a browser and go to http://www.example.com/piwik to start the Piwik installer. If you see something like this...












... either run the shown commands in the command line (if you have shell access)...

chmod 777 /var/www/clients/client0/web1/web/piwik/tmp
chmod 777 /var/www/clients/client0/web1/web/piwik/tmp/templates_c
chmod 777 /var/www/clients/client0/web1/web/piwik/tmp/cache

(In my installation, /var/www/example.com/web/ is a symlink to /var/www/clients/client0/web1/web/, that's why you see /var/www/clients/client0/web1/web/ instead of /var/www/example.com/web/ here in the screenshot and the command.)

... or change the folder permissions in your FTP client:






















(In my installation, the tmp/ folder was empty, so I did not have to change permissions for tmp/templates_c and tmp/cache.)

Then refresh the Piwik page in your browser. You should now see the welcome page of the installer. Click on Next:











On the next page, the installer performs a system check to see if all prerequisites are fulfilled. If there's a problem with the config folder,...















... scroll down, and you should see the command to execute to solve the problem (if you don't have shell access, you can as well fix the permissions with your FTP client):






















After you have fixed the problem, scroll down and click on the Refresh the page link:













The system check should now succeed. Click on Next:















Now we come to the database settings. Fill in the database name of your empty database as well as the database user and the password. You can leave the table prefix (piwik_) as it is. The same goes for the MySQL server (localhost) unless it is located on a remote server:

















The installer creates the necessary database tables. Click on Next:
























Page 2

Friday, May 8, 2009

Linux Proves - The Best Things In Life Are Free


They say - there's no such thing as a free lunch. But, Linux and FOSS software can be used to start, run and grow your business for, you guessed it, free. February survey of IT managers by IDC indicated that hard times are accelerating the adoption of Linux. The open source operating system will emerge from the recession in a stronger data center position than before, concluded an IDC white paper. Reducing costs and stronger interoperability with Windows were listed as the two top issues in a new survey of IT managers.

Sun Microsystems, Novell, Microsoft and many more have been down because of bad economy. But, Free software vendor such as Red Hat, IBM and others are doing fine. Here in India, many Government projects and schools found success with Linux. Also, Linux found good successes in emerging economies where Microsoft Windows doesn't already dominate end user computing. The increasing use of Linux as a pre-loaded system on mobile devices is another area where Linux use is likely to grow on.

However, Linux may be free, but you still need to invest in the training and getting involved in the community to get support. What do you thing? Have you found success with Linux in your data center? Please add your thoughts in the comments below.

Monday, January 28, 2008

5 Ways to Contribute to Open Source Projects Without Coding

Maybe you've seen many good Open Source projects that are no longer maintained. One of the many reasons for that may be lack of contribution. In fact, there are many one-man projects out there. Most of any program's users are just that, users, not developers. Nevertheless, average users still can contribute to Open Source programs to make them better.

I made a search for ways to contribute before writing this and I didn't find much. However, I found two very good articles: "How to Contribute to Open Source Without Coding" and "HOWTO Pay for Free Software". These articles explain how to contribute to Open Source. I summarize the information in this post, with a little info added by me.
  1. Contribute quality: help to make a better project, better looking and with new features
    • Submit bug reports
    • Suggest new features and options
    • Suggest ways to improve the framework (maybe comparing it to similar OS or comercial projects)
    • Submit some artwork (icons, backgrounds, logos) to use in the program
    • Correct spelling and grammar mistakes in documentation
    • Help maintain a web site for an Open Source project

  2. Contribute documentation: Some Open Source projects have a poor or insufficient documentation
    • Help write good documentation
    • Translate the documentation (and program text) into another language
    • Read existing documentation, follow the examples, and make corrections
    • Create diagrams, screen-shots, and graphics for documentation
    • Develop spelling and grammar style conventions for documentors
    • Build a glossary of technical terms (so non geek people can understand)
    • Convert documentation into more useful formats (i.e. DocBook)

  3. Contribute support: everybody need it at least once. Let programmer do their work while you help other people
    • Answer questions on forums, mailing lists or IRC channels
    • Contribute to (or start) an online support group
    • Help other people learn how to use the program (or programming library)
    • Write HOWTOS and post them in related forums or your own blog (you can find more info in "How To Write a Good Howto" post)

  4. Contribute money: many Open Source projects have a donate button or a shop where to buy related products, but there are other ways to contribute money
    • Send a developer, project or company some money
    • Buy a Free Software product, or associated products
    • Hire Free Software developers
    • Contribute hardware
    • Contribute bandwidth
    • Advertise in their web site if they show ads
    • Buy products from companies that support Free Software

  5. Contribute publicity: If the project gets popular there will be more people wanting to contribute
    • Package the application for a particular Linux distro (or other OS)
    • Convince people to chose Open Source products when possible
    • Write reviews
    • Write about new ways of using an Open Source program

  6. Contribute appreciation: it's an extra way to contribute but may be the most important
    • Express your appreciation to developers (through email or forum post)
    • Send the programmers post cards
    • Give a project or developer a gift (some have wish lists for this)
    • Be polite when reporting bugs or asking for new features; developers has no obligation to do it after all
Although most of the list is self-explanatory I plan to post more in depth info in the future.

Finally, this list is in no way complete. You can read the mentioned articles for more information or add more tips in the comments.

Thursday, November 22, 2007

Memory test - Firefox 2.0.0.9 vs Firefox 3.0 b 1

Does Firefox 3.0 beta 1 do a better job of handling memory than earlier versions? In a test put Firefox 3.0 beta up against Firefox 2.0.0.9 in a series of tests.

Before I go any further, a few disclaimers and notes. First off, I’ve carried out this test on a single system running Windows Vista Home Premium on which Firefox had not been previously installed. The system has 2GB of RAM. Both Firefox 2.0.0.9 and Firefox 3.0 b 1 were installed fresh using a standard install. For each test I visited the same web pages and did my best to make the browsing the same on both versions.

OK, with that out of the way, on with the tests. I simulated three different browsing scenarios:

  • Loading a five pages into the browser
  • Loading a single page and leaving the browser for 10 minutes
  • Loading 12 pages into the browser and wait 5 minutes

Here are the results:

Firefox 2.0.0.9

  • The memory test - Firefox 2.0.0.9 vs Firefox 3.0 b 1Loading a five pages into the browser - 35,640KB (img)
  • Loading a single page and leaving the browser for 10 minutes - 47,852KB (img)
  • Loading 12 pages into the browser and wait 5 minutes - 103,180KB (img)

Firefox 3.0 b 1

  • Loading a five pages into the browser - 38,644KB (img)
  • Loading a single page and leaving the browser for 10 minutes - 63,764KB (img)
  • Loading 12 pages into the browser and wait 5 minutes - 62,312KB (img)

Check out the complete screenshot gallery.

Just to give us a baseline, I repeated the 12 page test using Internet Explorer 7 and found that the browser used 89,756KB (img), more than Firefox 3.0 beta 1 but substantially less than Firefox 2.0.0.9.

This is interesting. Initially it seemed that Firefox 3.0 beta 1 was consuming more memory than 2.0.0.9, but during the twelve page test I started seeing what I’ve been seeing before - spiraling memory consumption when the browser is under significant load. I’m certain that if the browser had been left open longer, memory usage would have continued to rise. I didn’t see much signs of Firefox 3.0 beta 1 doing this. Certainly based on this test and from using Firefox 3.0 beta 1 today, I do think that things have significantly improved.

Anyone else taken Firefox 3.0 beta 1 for a spin? Any thoughts, feelings or observations?

Tuesday, October 9, 2007

Opera v Firefox

Opera has a very optimized rendering structure. it is capable of drawing the page element by element without needing to wait for the entire structure.

I think the reasons so many prefer Firefox are rational enough, rather than pseudo-religious. The clear interface, the ease of use of the tabs, as well as the wide range of plug-ins (largely a result of its open source origins) all add up to an excellent browser.

However, Opera is great browser too. The voice control features and the amazing range of views achievable make it a must for widening access to the Web, while the Transfers page is a really excellent tool for contolling multiple downloads. It's also got an integrated email client.

The problem is that most users seem to think they must commit themselves to one browser. The rational course is to install a range and use them for their specific strengths. I use both Firefox and Opera as I see fit.

In computing, recommendations often have a pseudo-religious nature. Firefox was claimed to be innovative for adding features that Opera already had because Firefox is open source and free. Opera's genuine innovations, superior accessibility (eg for blind users), robustness, standards-compliance and security were ignored because it is a commercial program.

Also, Firefox comes from California, whereas Opera comes from Norway. However, Opera has found support from companies based outside Silicon Valley, including Nintendo, Nokia, Sony, Sharp, Archos and Psion.