1 line
3.0 KiB
JSON
1 line
3.0 KiB
JSON
{"uuid":"06c4a59c-7892-4138-986d-667b3263b16f","slug":"installer-phpmyadmin","title":"Installer phpMyAdmin","author":"cedric@abonnel.fr","published":true,"published_at":"2023-02-09 16:12:18","created_at":"2023-02-09 16:12:18","updated_at":"2023-02-09 16:12:18","revisions":[],"cover":"","files_meta":[],"external_links":[],"seo_title":"","seo_description":"","og_image":"","category":"Informatique","content":"# Installer phpMyAdmin\n\nPrérequis :\n- PHP 7.4\n- Apache 2.4\n- MariaDB / MySQL 5.5 et plus\n\nLes modules PHP **mysql**, **zip**, **gd** et **mbstring** sont nécessaires pour une utilisation optimale de l'application.\n```BASH\nsudo apt install php7.4-mysql php7.4-mbstring php-zip php-gd\n```\n\nTélécharger l'archive présent sur le site `phpmyadmin.net` permet d'avoir la dernière version stable en date. A l'heure où j'écris ces lignes, il s'agit de la version 5.0.2.\n\n cd /var/www\n\n wget https:*files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.tar.gz\n\n sudo tar -xzvf phpMyAdmin-5.0.2-all-languages.tar.gz\n sudo rm phpMyAdmin-5.0.2-all-languages.tar.gz\n\t\tcd phpMyAdmin-5.0.2-all-languages\n\t\tsudo chgrp -R www-data .\n\t\tsudo chmod -R g+s .\n\t\n---\n\t\t\nConfiguration simple avec le fichier présent dans ``/var/html/phpMyAdmin-5.0.2-all-languages/config.inc.php``\n\n```PHP\n<?php\n* use here a value of your choice at least 32 chars long\n$cfg['blowfish_secret'] = '1{dd0`<Q),5XP_:R9UK%%8\\\"EEcyH#{o';\n\n$i=0;\n$i++;\n$cfg['Servers'][$i]['auth_type'] = 'cookie';\n* if you insist on \"root\" having no password:\n* $cfg['Servers'][$i]['AllowNoPassword'] = true;\n```\n\n---\n\nconfiguration site avaible\n\n sudo nano /etc/apache2/sites-available/100-phpmyadmin.conf\n\n```\nAlias /phpmyadmin /var/www/phpMyAdmin-5.0.2-all-languages\n\n<Directory /var/www/phpMyAdmin-5.0.2-all-languages>\n Options Indexes FollowSymLinks\n DirectoryIndex index.php\n\n <IfModule mod_php5.c>\n AddType application/x-httpd-php .php\n\n php_flag magic_quotes_gpc Off\n php_flag track_vars On\n php_flag register_globals Off\n php_value include_path .\n </IfModule>\n\n</Directory>\n\n# Authorize for setup\n<Directory /var/www/phpMyAdmin-5.0.2-all-languages/setup>\n <IfModule mod_authn_file.c>\n AuthType Basic\n AuthName \"phpMyAdmin Setup\"\n AuthUserFile /etc/phpmyadmin/htpasswd.setup\n </IfModule>\n Require valid-user\n</Directory>\n\n# Disallow web access to directories that don't need it\n<Directory /var/www/phpMyAdmin-5.0.2-all-languages/libraries>\n Order Deny,Allow\n Deny from All\n</Directory>\n<Directory /var/www/phpMyAdmin-5.0.2-all-languages/setup/lib>\n Order Deny,Allow\n Deny from All\n</Directory>\n```\n\n---\nActiver la configuration du site\n\n sudo a2ensite 100-phpmyadmin\n\n sudo systemctl reload apache2\n\n \n---\n\n \n\nCode intégral et interactif en cours de rédaction sur <https://github.com/cedricAbonnel/server-web/scripts/install-phpmyadmin>","featured":false,"tags":[]} |