How To Install phpmd on Kali Linux
Introduction
In this tutorial we learn how to install phpmd on Kali Linux.
What is phpmd
phpmd is:
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. This project uses PHP Depend to measure several software metrics from given source code, then it compares the calculated values with customizable thresholds and reports all suspect software artifacts.
There are three methods to install phpmd on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install phpmd Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install phpmd using apt-get by running the following command:
sudo apt-get -y install phpmdInstall phpmd Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install phpmd using apt by running the following command:
sudo apt -y install phpmdInstall phpmd Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install phpmd using aptitude by running the following command:
sudo aptitude -y install phpmdHow To Uninstall phpmd on Kali Linux
To uninstall only the phpmd package we can use the following command:
sudo apt-get remove phpmdUninstall phpmd And Its Dependencies
To uninstall phpmd and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove phpmdRemove phpmd Configurations and Data
To remove phpmd configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge phpmdRemove phpmd configuration, data, and all of its dependencies
We can use the following command to remove phpmd configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge phpmdDependencies
phpmd have the following dependencies:
References
Summary
In this tutorial we learn how to install phpmd package on Kali Linux using different package management tools: apt, apt-get and aptitude.