- linux #software #kali_Linux
- Install LAMP Stack on System KALI Linux Version 2022.2
- Authorize for setup
- Disallow web access to directories that don’t need it
- php-mysql on Kali Linux
- 2. Uninstall / Remove php-mysql package
- 3. Details of php-mysql package
- 4. References on Kali Linux
- 5. The same packages on other Linux Distributions
- How To Install php-mysql on Kali Linux
- What is php-mysql
- Install php-mysql Using apt-get
- Install php-mysql Using apt
- Install php-mysql Using aptitude
- How To Uninstall php-mysql on Kali Linux
- Uninstall php-mysql And Its Dependencies
- Remove php-mysql Configurations and Data
- Remove php-mysql configuration, data, and all of its dependencies
- Dependencies
- References
- Summary
linux #software #kali_Linux
Install LAMP Stack on System KALI Linux Version 2022.2
- Linux operating system.
- Apache HTTP server.
- MySQL relational database management system.
- PHP programming language.
- PhpMyAdmin
** Please Focus Step by step **
- Update System.
sudo apt update && sudo apt full upgrade -y - install php , mysql server ,apache2
sudo apt -y install wget php php-cgi php-mysqli php-pear php-mbstring libapache2-mod-php php-common php-phpseclib php-mysql - install phpMyAdmin last version
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
tar xvf phpMyAdmin-5.0.4-all-languages.tar.gz
** now add commands configuration files **
- sudo mv phpMyAdmin-*/ /usr/share/phpmyadmin
- sudo mkdir -p /var/lib/phpmyadmin/tmp
- sudo chown -R www-data:www-data /var/lib/phpmyadmin
- sudo mkdir /etc/phpmyadmin/
- sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
- sudo nano /usr/share/phpmyadmin/config.inc.php
- $cfg[‘blowfish_secret’] = ‘H2TxcGXxflSd8JwrXVlh6KW4s2rER63i’;
- $cfg[‘TempDir’] = ‘/var/lib/phpmyadmin/tmp’;
- sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
- add commands in file
Alias /phpmyadmin /usr/share/phpmyadmin
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
AddType application/x-httpd-php .php
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
php_admin_value mbstring.func_overload 0
AddType application/x-httpd-php .php
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
php_admin_value mbstring.func_overload 0
Authorize for setup
AuthType Basic
AuthName «phpMyAdmin Setup»
AuthUserFile /etc/phpmyadmin/htpasswd.setup
Disallow web access to directories that don’t need it
- sudo systemctl restart apache2
- systemctl status apache2
- sudo mysql -u root
- systemctl restart mysql
- CREATE USER ‘admin’@’%’ IDENTIFIED BY ‘admin4321’;
- GRANT ALL PRIVILEGES ON . TO ‘admin’@’%’ WITH GRANT OPTION;
- CREATE DATABASE database_name ;
- EXIT;
- now login in PhpMyAdmin :
http://localhost/phpmyadmin/index.php
php-mysql on Kali Linux
This guide covers the steps necessary to install php-mysql package:
2. Uninstall / Remove php-mysql package
This guide covers the steps necessary to uninstall php-mysql package:
3. Details of php-mysql package
Package: php-mysql
Source: php-defaults (92)
Version: 2:8.1+92
Installed-Size: 14
Maintainer: Debian PHP Maintainers
Architecture: all
Depends: php-common, php8.1-mysql
Size: 7208
SHA256: 2befc3c8e4a0e59c275f9936010aff15de6dd981a51829f504bc23f30cbce236
SHA1: 96da42237b929dd8b7854a5eb2a648589d6b7416
MD5sum: 883c5f65fb133498905ffd1a2598cbdc
Description: MySQL module for PHP [default]
This package provides a MySQL module for PHP.
.
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.
.
This package is a dependency package, which depends on Debian’s default
PHP version (currently 8.1).
Description-md5: b06938348d6d72a1f125f8d3d536eddb
Section: php
Priority: optional
Filename: pool/main/p/php-defaults/php-mysql_8.1+92_all.deb
4. References on Kali Linux
5. The same packages on other Linux Distributions
php-mysql (2:8.1+92+ubuntu18.04.1+deb.sury.org+2) Ubuntu 18.04 LTS (Bionic Beaver)
php-mysql (1:7.0+35ubuntu6.1) Ubuntu 16.04 LTS (Xenial Xerus)
php-mysql (2:8.0+85+ubuntu21.10.1+deb.sury.org+1) Ubuntu 21.10 (Impish Indri)
php-mysql (2:8.1+92+ubuntu22.04.1+deb.sury.org+1) Ubuntu 22.04 LTS (Jammy Jellyfish)
php-mysql (2:8.1+92+0~20220117.43+debian10~1.gbpe0d14e) Debian 10 (Buster)
How To Install php-mysql on Kali Linux
In this tutorial we learn how to install php-mysql on Kali Linux.
What is php-mysql
This package provides a MySQL module for PHP.
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
This package is a dependency package, which depends on Debian’s default PHP version (currently 7.4).
There are three methods to install php-mysql 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 php-mysql Using apt-get
Update apt database with apt-get using the following command.
After updating apt database, We can install php-mysql using apt-get by running the following command:
Install php-mysql Using apt
Update apt database with apt using the following command.
After updating apt database, We can install php-mysql using apt by running the following command:
Install php-mysql 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.
After updating apt database, We can install php-mysql using aptitude by running the following command:
How To Uninstall php-mysql on Kali Linux
To uninstall only the php-mysql package we can use the following command:
Uninstall php-mysql And Its Dependencies
To uninstall php-mysql and its dependencies that are no longer needed by Kali Linux, we can use the command below:
Remove php-mysql Configurations and Data
To remove php-mysql configuration and data from Kali Linux we can use the following command:
Remove php-mysql configuration, data, and all of its dependencies
We can use the following command to remove php-mysql configurations, data and all of its dependencies, we can use the following command:
Dependencies
References
Summary
In this tutorial we learn how to install php-mysql package on Kali Linux using different package management tools: apt , apt-get and aptitude .