This is a step by step guide to install Piwik analytics software on Rackspace Cloud Server running Ubuntu 14.04 LTS with all the commands. We will recommend to open this detailed guide to Install WordPress on Rackspace Cloud Server (Ubuntu 14.04 PVHVM). All the need are exactly the same for Piwik, you will definitely not proceed to install WordPress. You will stop at the sub header named What is Next Steps. This is the backend setup for one server configuration running MySQL server on the same server. You can give the server a subdomain name like piwik.thecustomizewindows.com and add the A record and CNAME pointing towards your browser under the main domain record in Cloud DNS.
Install Piwik on Rackspace Cloud Server (Ubuntu 14.04) : Important Notes
Actually, the reason to install Piwik analytics software on Rackspace Cloud Server is basically security and privacy of data. We talked about that part on Piwik Analytics vs Google Analytics For the Sake of Data Privacy. Here are some technical considerations for variation in setup :
- You want to run Piwik on the Same Server : use either Apache2 virtual host or under a sub directory. If you are using a load balancer or Varnish Server in front, this ways are not recommended,
- You want to install Piwik on Rackspace Cloud Sites : read Installing Piwik on Rackspace Cloud Sites guide.
- You want to use MySQL Database as a Service not MySQL server on the same server. That is easy, simply create a new database.
Install Piwik on Rackspace Cloud Server (Ubuntu 14.04) : Steps
Basically, the steps to install Piwik analytics software on Rackspace Cloud Server is same like WordPress like we said before; still we are providing standalone commands, do not combine two tutorials unless you are cent percent sure what you are doing.
---
1 2 3 | apt-get update apt-get upgrade # regular work |
Now, install LAMP Server in case you want to install MySQL Server too :
1 2 | sudo apt-get install lamp-server^ # MySQL will ask for password, fill them and copy paste on your notepad |
If you do not want to install MySQL Server, i.e. you will use MySQL Database as a Service; you need to edit the sources.list
file (uncomment the recourses which are commented out) :
1 | nano /etc/sources.list |
Then run :
1 2 3 | apt-get update apt-get upgrade # if error arrives, search with the error to add things to PPA |
For WordPress we actually installed these too, we will install them here too :
1 | apt-get install unzip php5-gd |
Go to the default root directory of Apache2 :
1 2 3 | /var/www/html # delete the default file rm index.html |
Now wget the latest version of Piwik :
1 | wget http://builds.piwik.org/latest.zip |
unzip it :
1 | unzip latest.zip |
Delete the zip file :
1 2 3 4 5 6 7 8 9 | rm -r latest.zip # our files are probably at # /var/www/html/piwik # so run ls command and cd to piwik folder # move all the files to root cd piwik mv * .. cd .. rm -r piwik |
So, all our files are at the root now. Set permission properly :
1 2 3 | chown -R www-data:www-data /var/www/html # restart apache service apache2 restart |
If you have installed it on a subdomain, point your browser to :
1 | http://piwik.thecustomizewindows.com |
It will trigger the web installation steps, which is very easy. For database setup – follow that linked older guide for WordPress or use MySQL Database as a Service; to visually see the next steps, you can check the official doc :
1 | http://piwik.org/docs/installation/ |