0%

记录Kali下安装phpmyadmin

记录下Kali安装phpmyadmin连接mariadb步骤,先安装Lighttpd(Apache/Nginx)做为web服务器,然后以此为承载安装使用phpmyadmin。

  1. Install mariadb
    sudo apt install mariadb-server

  2. Install web server and run it

    1
    2
    3
    sudo apt-get update
    sudo apt-get install lighttpd
    sudo service lighttpd start && service lighttpd status
  3. Install php, php FastCGI and php-mysql for mysql
    sudo apt-get install php php-cgi php-mysql

  4. Enable the php module for lighttpd

    1
    2
    3
    4
    sudo lighty-enable-mod fastcgi 
    sudo lighty-enable-mod fastcgi-php
    sudo service lighttpd force-reload
    sudo vim /var/www/html/test.php

    Add the following line to test.php

    1
    <?php phpinfo(); ?>

    Then open “http://localhost/test.php" for testing php in lighttpd

  5. Install phpmyadmin
    sudo apt-get install phpmyadmin

    • choosing option that “configure database for phpmyadmin with dbconfig-common” with no
    • choosing lighttpd
  6. create phpmyadmin page soft link for server directory

    1
    2
    cd /var/www/html
    ln -s /usr/share/phpmyadmin .

    Open “http://localhost/phpmyadmin" with web browser for testing phpmyadmin

  • lighttpd configuration path : /etc/lighttpd/lighttpd.conf,server.document-root option is related to server root directory.