Adminer - ArchWiki

# Adminer

Adminer is a simple tool for database management. It's possible to manage MySQL, PostgreSQL, Sqlite3, MS SQL and Oracle. It's a simpler alternative to PhpMyAdmin. You can find more pieces of information about this project at official page or Wikipedia.

## Installation

Ensure you do not have an older copy of Adminer:

    $ rm -r /srv/http/adminer

Install adminer from the AUR and add the following line to `/etc/httpd/conf/httpd.conf`:

## Configuration under Apache

    Include conf/extra/httpd-adminer.conf

Then restart your apache daemon.

    # systemctl restart httpd

Note: The Adminer can be accessed by your browser on http://localhost/adminer.

In case there is an (403) error, change the following lines inside the `/etc/httpd/conf/extra/httpd-adminer.conf` file:

    Alias /adminer "/usr/share/webapps/adminer"
           <Directory "/usr/share/webapps/adminer">
                   AllowOverride All
                   Require all granted
           #php_admin_value open_basedir      "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
    </Directory>

Restart the restart apache daemon again.

    # systemctl restart httpd

## Configuration under Nginx

This article or section needs language, wiki syntax or style improvements.

Reason: ArchWiki is not one's personal blog, see Help:Style. (Discuss)

create /srv/http/www/public_html directory

     $ mkdir /srv/http/www

     $ mkdir /srv/http/www/public_html

i suppose your Nginx server is installed and working ( systemctl start nginx ), and php and php-fpm is installed and working too (systemctl start php-fpm)

if not, install it and see this installation on the arch wiki page.

open your /etc/nginx/nginx.conf file and for a localhost server only, you can have this code:

(you can also uncomment the user line and make user http http (and if do that, allow http owner and group to the /srv/http/ directories)

     #add this...
     server {
         listen 80;
         server_name localhost default_server;

         root /srv/http/www/public_html;
         index index.html index.html index.php;   #this read the default files of nginx... or any other you had at this place...

         location ~ \.php$ {                                                        # this part can be cut/paste in a specific config file and be call by "include name_of_the_conf_file"
         try_files $uri =404;                                                       # this is for use the php engine fastCGI
         include fastcgi_params;                                                    #
         fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;                           #
         fastcgi_index index.php;                                                   #
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }        #
     }

you can refer to the doc of nginx and check you not have other localhost server declaration inside.

you can also create if you want a nginx_php-fpm.conf file just for make runing php-fpm fastCGI and call it by include it instead of declare the location in this file...

if you have some other call this way diminue the repeat code inside.

restart your nginx service and your php-fpm service together:

     $ systemctl restart nginx

     $ systemctl restart php-fpm

go on your web browser at the adress http://localhost/adminer

enjoy...

## See also

- Official Adminer webpage
- Author's weblog

Category:

- Web Server