Have trouble installing phpmyadmin on PHP7 Apache/2.4.7 (Ubuntu)

后端 未结 6 1973
执笔经年
执笔经年 2020-12-05 00:18

I installed PHP7 today with

sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get install php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0 php7.0-mysq         


        
6条回答
  •  独厮守ぢ
    2020-12-05 00:53

    Install it via wget and create an alias in Apache. Keep track:

    Change to directory /usr/share:

    cd /usr/share
    

    Change to root user:

     sudo su
    

    Download phpMyAdmin:

    wget https://files.phpmyadmin.net/phpMyAdmin/4.5.4.1/phpMyAdmin-4.5.4.1-all-languages.zip
    

    Unzip it: (you may install unzip first)

    unzip phpMyAdmin-4.5.4.1-all-languages.zip
    

    Rename the folder:

    mv phpMyAdmin-4.5.4.1-all-languages phpmyadmin
    

    Change permissions:

    chmod -R 0755 phpmyadmin
    

    Configure apache so that it can find it correctly:

    vim /etc/apache2/sites-available/000-default.conf
    

    Anywhere after "DocumentRoot /var/www/html" insert these line:

    Alias /phpmyadmin "/usr/share/phpmyadmin/"
    
         Order allow,deny
         Allow from all
         Require all granted
    
    

    Restart Apache:

    service apache2 restart
    

    And you are ready to go!

    Just took a screenshot from my current installation for you to validate it works.

提交回复
热议问题