Installation & Configuration of Piwik on Linux

Step 1: At first, we have to open the terminal Linux. There we have to run the following command. This will help to install the Piwik in the machine. Piwik will go to be downloaded in the .zip file. We have to wait till the process is completed.

wget https://builds.matomo.org/piwik.zip

 

Step 2: Then after downloading the .zip file, we have to run the following command. This will help to extract the .zip file.

unzip piwik.zip

 

Step 3: Extracting the .zip file will a long time. We have to wait till the process is completed.

 

Step 4: After extracting the Piwik, we have to move it to a certain directory. For moving it we need to run the below command. Then we have to switch to a certain directory. For that purpose, we need to run the second command. These commands will not provide any output. Simply, it will do the job. After running those commands we can visualize that our directory has changed.

mv piwik /var/www/
cd /var/www/

 

Step 5: Then we have to change the ownership of the file. As well as we need to change the permission. The first command will change the ownership of Piwik & the second command will change the permission required for running Piwik on the machine. Both these commands will not provide any output. They will simply do the work.

chown -R www-data.www-data piwik
chmod -R 775 piwik

 

Note: The above step is very important. Users should perform the step by paying attention to it. Any mistakes made in this case will hamper the installation of Piwik. It will not only hamper the installation of Piwik in this attempt but also in the future when users want to again install Piwik in that machine, then again it will prompt an error. So, it is advisable to perform it cautiously.

Step 6: Then we have to run the following command. This will open an editor-like window in front of the users. The terminal window will get open. There we have to configure something important.

vim /etc/apache2/sites-available/piwik.conf

 

Step 7: Then we have to write the following items in that editor window. This is needed for the configuration purpose in the Apache server. As per the user’s choice they can change the server name. The items are written below. Users can just copy & paste it over the editor. After writing all the items, we just need to press Enter. Hence, the editor window will get closed & it will return to the original terminal window.

< VirtualHost \*:80> 
ServerName www.linux.com
DocumentRoot /var/www/piwik/
< Directory /var/www/piwik/> 
AllowOverride All
allow from all
< /Directory> 
< /VirtualHost>

 

Note: Users please don’t make any changes to any other part of the configuration. If needed, users can only change the ServerName. Users don’t need to afraid of the same ServerName problem. Suppose, users have already given the same server name to some other software & for Piwik also they have given the same ServerName. In that case also, there will not any problem when they open that server. But please don’t make any changes other than the ServerName. It can lead to unsuccessful installation of Piwik.

Step 8: Now, after all, the configuration, we need to activate the new server. For that purpose, users need to execute the following command. It will take a small amount of time.

a2ensite piwik.conf

 

Step 9: Now, after activating the new server, we need to disable the default Apache server. For that purpose, we need to run the following command. It will also take small amount of time to complete.

a2dissite 000-default.conf

 

Note: For installing any server previously, if the users already disabled the Apache Server, then also they can perform the step. It will not hamper any thing. It is advisable to perform this step even if user already disabled the Apache Server

Step 10: Now, we have to rewrite or save the changes which we have made in the Apache server. For that purpose, we need to execute the following command. It will save the changes.

a2enmod rewrite

 

Step 11: After saving the changes, it is always a good practice to restart the application. In this case also, for Apache Server, we need to restart it. For restarting purposes, we need to run the below command. It will not prompt anything. It will just simply, restart the Apache.

systemctl restart apache2

 

Step 12: Now, we have installed the Piwik in the machine. Now, we will open the browser & search for our ServerName. Here in this case ServerName is “www.linux.com”. After searching for it, it will provide the home page of Piwik. As Piwik is now known as Matomo, it will be redirected to the Matomo home page. Hence, the installation of Piwik is successful.

 

How to Install Piwik (Alternative to Google Analytics) in Linux

Piwik is open-source software. It is currently known as the Matomo software. Piwik is the older version of this software product. Formerly, Matomo is known as the Piwik. Matomo is also known as Piwik Pro. Means, Piwik, Matomo, and Piwik Pro all are the same things with different names. Piwik is a web analytics software. It can be an alternative to Google Analytics. It is developed by a group of developers throughout the globe. It mainly runs on PHP & MySQL. Generally, it visits a certain website which users will provide to it. Then it will analyze the website & generate a report of it. For installing Piwik in the machine, the Apache server needs to be installed in the machine previously.

Similar Reads

Features of Piwik:

Piwik provides a wide analysis of the website. Such as how many visitors visit the website per day, month, or year. Also, it can able to provide a real-time view of the website. Piwik provides a beautiful user interface. By which users can able to navigate to every website where Piwik is running for analysis purposes. Even, Piwik can be used for E-Commerce websites also. It can analysis the profit or loss for any certain business website also....

Installation & Configuration of Piwik on Linux

Step 1: At first, we have to open the terminal Linux. There we have to run the following command. This will help to install the Piwik in the machine. Piwik will go to be downloaded in the .zip file. We have to wait till the process is completed....

Some More Configurations (Tasks)

After installing Piwik in the machine some simple configurations need to be carried out. We can assume those configurations as some simple tasks. Though in many tasks we need to just press Next, there are some tasks where a guideline will be better for the users. Here, we will list those tasks in a step-by-step manner....

Contact Us