Bonjour, si vous voulez installer Adminer voici comment faire :
Installer Nginx / PHP :
CentOS / Fedora / RHEL
yum install -y nginx php-fpm php-pdo php-mysqlnd wget
Télécharger Adminer :
mkdir -p /var/www/adminer
wget -O /var/www/adminer/index.php https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1-mysql.php
chown -R nginx: /var/www/adminer
Configurer Tomcat :
Créer le service :
nano /etc/nginx/conf.d/adminer.conf
server {
listen 80;
root /var/www/adminer;
error_log /var/log/nginx/adminer_access.log;
access_log /var/log/nginx/adminer_error.log;
location / {
# Path to source
alias /var/www/adminer/;
# Default indexes and catch-all
index index.php;
try_files $uri $uri/ /index.php?$args;
# Prevent useless logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny access to hidden files and directories
location ~ ^/(.+/|)\.(?!well-known\/) {
deny all;
}
# Upload Size.
client_max_body_size 30m;
# Execute and serve PHP files
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_read_timeout 600;
}
}
}
Configurer PHP :
sed -i "s@upload_max_filesize = 2M@upload_max_filesize = 30M@g" /etc/php.ini
systemctl restart php-fpm
Démarrer Nginx :
systemctl enable --now nginx
Voilà Adminer est disponible sur le port 80
ex 192.168.0.30