How do you configure phpmyadmin on linux?

0

I gave apt-get install phpmyadmin and linux installed it in the etc folder; I ran in the browser http://localhost/phpmyadmin and gave 404 error. I changed and threw the phpmyadmin folder into the www directory, but it just shows the Apache interface and the folder list of the folder. It does not open the phpmyamind interface like in Windows. What should I do?

    
asked by anonymous 21.01.2016 / 16:10

3 answers

0

Download and unzip the files to the directory where you want to access them.

Example, if you wanted to access as http://localhost/phpmyadmin , enter the folder of DOCUMENT_ROOT set in VirtualHost of Apache. Then create a folder as the name you want "phpmyadmin". Unzip everything in this folder.

Once you've done this, just go to http://localhost/phpmyadmin and configure following the on-screen instructions.

obs: I'm considering that your environment is already Apache configured and% accessible%.

    
21.01.2016 / 17:30
1

By default, apt-get install phpmyadmin installs and create a file /etc/apache2/conf.d/phpmyadmin.conf.

Contents page is on / usr / share / phpmyadmin /

Take a look:

/etc/apache2/conf.d/phpmyadmin.conf

# phpMyAdmin default Apache configuration

Alias /dbo /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyad                                                                                                              min/:/var/lib/phpmyadmin/
        </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>
    
21.01.2016 / 16:16
0

Installing using apt-get, in some versions of ubuntu / ubuntu server it is necessary to directly append the phpmyadmin path in the apache configuration file, to do so type in the terminal:

vim /etc/apache2/apache2.conf

Add a last line with the parameter below and save the file

Include /etc/phpmyadmin/apache.conf

After restarting apache:

service apache2 restart

How did you decide to change the folder and such, if it does not work, uninstall, install and follow what I said up there. Another way is to install by downloading the package rather than using apt-get:

In the terminal enter your apache root folder, usually / var / www / or / var / www / html

Download the file at link

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

unzip phpMyAdmin-4.5.2-all-languages.zip

mv phpMyAdmin-4.5.2-all-languages phpmyadmin
Ready! Visit link .

* Remember that the phpmyadmin login screen makes a connection to the mysql server. If your mysql server password is blank, you need to change the phpMyAdmin configuration file to allow logins with blank passwords. For this we will edit the file:

vim /var/www/phpmyadmin/libraries/config.default.php

Find the line $ cfg ['Servers'] [$ i] ['AllowNoPassword']=";

Replace with

$ cfg ['Servers'] [$ i] ['AllowNoPassword'] = 'true';

Save and close the file. Soon!

    
22.01.2016 / 13:35