{"id":3046,"date":"2023-07-24T18:58:31","date_gmt":"2023-07-24T16:58:31","guid":{"rendered":"http:\/\/fliegerhorst.dyndns.org\/?p=3046"},"modified":"2023-07-25T17:48:25","modified_gmt":"2023-07-25T15:48:25","slug":"phpmyadmin","status":"publish","type":"post","link":"https:\/\/fliegerhorst.dyndns.org\/index.php\/2023\/07\/24\/phpmyadmin\/","title":{"rendered":"phpMyAdmin"},"content":{"rendered":"\n<p>Seit Debian Buster ist phpMyAdmin nicht mehr in den Repositories zu finden und muss manuell installiert werden.<\/p>\n\n\n\n<p>Weseln Sie auf dem Server (auf dem ihr phpMyAdmin installiert werden soll) zu folgendem Pfad:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">cd \/usr\/share<\/pre><\/div>\n\n\n\n<p>und holt euch mittels wget die aktuellste Version von <code>https:\/\/www.phpmyadmin.net\/<\/code><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/4.9.0.1\/phpMyAdmin-4.9.0.1-all-languages.zip<\/pre><\/div>\n\n\n\n<p>Im Anschluss wird die Zip Datei entpackt, umbenannt und mit den passenden Rechten f\u00fcr den Apache Webserver ausgestattet:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">unzip phpMyAdmin-4.9.0.1-all-languages.zip\nmv phpMyAdmin-4.9.0.1-all-languages phpmyadmin\nchown www-data:www-data -R phpmyadmin<\/pre><\/div>\n\n\n\n<p>Als n\u00e4chstes erstellen wir unter MariaDB eine Datenbank sowie einen Benutzer f\u00fcr phpMyAdmin. <strong>ACHTUNG: Passwort unbedingt ab\u00e4ndern!<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">mysql -u root\nCREATE DATABASE phpmyadmin DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nGRANT ALL ON phpmyadmin.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'Ihr-Sicheres-Passwort';\nFLUSH PRIVILEGES;\nEXIT;<\/pre><\/div>\n\n\n\n<p>Sollten nicht alle Abh\u00e4ngigkeiten von PHP installiert sein, so kann man dies wie folgt nachholen:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">apt install php-phpseclib php-php-gettext php-imagick php7.3-imap php7.3-gmp php7.3-common php7.3-gd php7.3-mbstring php7.3-xml php7.3-json php7.3-curl php7.3-zip php7.3-bz2 php7.3-intl php7.3-mysql<\/pre><\/div>\n\n\n\n<p>Nun wird die Konfigurationsdatei f\u00fcr den Apache Server unter <code>\/etc\/apache2\/conf-available\/phpmyadmin.conf<\/code> angelegt:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">Alias \/nichtphpmyadmin \/usr\/share\/phpmyadmin\n&lt;Directory \/usr\/share\/phpmyadmin&gt;\n    Options SymLinksIfOwnerMatch\n    DirectoryIndex index.php\n    AllowOverride All\n    &lt;IfModule mod_php5.c&gt;\n        &lt;IfModule mod_mime.c&gt;\n            AddType application\/x-httpd-php .php\n        &lt;\/IfModule&gt;\n        &lt;FilesMatch &quot;.+\\.php$&quot;&gt;\n            SetHandler application\/x-httpd-php\n        &lt;\/FilesMatch&gt;\n        php_value include_path .\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/php-gettext\/:\/usr\/share\/php\/php-php-gettext\/:\/usr\/share\/javascript\/:\/usr\/share\/php\/tcpdf\/:\/usr\/share\/doc\/phpmyadmin\/:\/usr\/share\/php\/phpseclib\/\n        php_admin_value mbstring.func_overload 0\n    &lt;\/IfModule&gt;\n    &lt;IfModule mod_php.c&gt;\n        &lt;IfModule mod_mime.c&gt;\n            AddType application\/x-httpd-php .php\n        &lt;\/IfModule&gt;\n        &lt;FilesMatch &quot;.+\\.php$&quot;&gt;\n            SetHandler application\/x-httpd-php\n        &lt;\/FilesMatch&gt;\n        php_value include_path .\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/php-gettext\/:\/usr\/share\/php\/php-php-gettext\/:\/usr\/share\/javascript\/:\/usr\/share\/php\/tcpdf\/:\/usr\/share\/doc\/phpmyadmin\/:\/usr\/share\/php\/phpseclib\/\n        php_admin_value mbstring.func_overload 0\n    &lt;\/IfModule&gt;\n&lt;\/Directory&gt;\n&lt;Directory \/usr\/share\/phpmyadmin\/templates&gt;\n    Require all denied\n&lt;\/Directory&gt;\n&lt;Directory \/usr\/share\/phpmyadmin\/libraries&gt;\n    Require all denied\n&lt;\/Directory&gt;\n&lt;Directory \/usr\/share\/phpmyadmin\/setup\/lib&gt;\n    Require all denied\n&lt;\/Directory&gt;<\/pre><\/div>\n\n\n\n<p>Bitte darauf achten nicht \/phpmyadmin als Alias zu verwenden, da dieser Pfad von Hackern und Co immer zuerst ausprobiert wird. Im obigen Beispiel wurde der Alias \/nichtphpmyadmin verwendet. Achten Sie auch auf die Zeile<\/p>\n\n\n\n<p><code>AllowOverride All<\/code><\/p>\n\n\n\n<p>Diese ist nur erforderlich, wenn Sie die Installation zus\u00e4tzlich mit einem htaccess Passwortschutz versehen wollen (empfohlen), andernfalls \u00e4ndern Sie die Angabe in <code>AllowOverwrite None<\/code>. <\/p>\n\n\n\n<p>Um den Passwortschutz einzurichten, legen sie die Datei <code>\/usr\/share\/phpmyadmin\/.htaccess<\/code> mit folgendem Inhalt an:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">AuthName &quot;Restricted&quot;\nAuthType Basic\nAuthUserFile \/etc\/phpmyadmin\/.htpasswd\nrequire valid-user<\/pre><\/div>\n\n\n\n<p>Die <code>.htpasswd<\/code> Datei wird unter <code>\/etc\/phpmyadmin\/.htpasswd<\/code> erstellt. Der Ordner <code>\/etc\/phpmyadmin<\/code> muss dazu ggf. neu erstellt werden.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">htpasswd -c \/etc\/phpmyadmin\/.htpasswd meinBenutzerName<\/pre><\/div>\n\n\n\n<p>Jetzt erstellen wir ein tempor\u00e4res Arbeitsverzeichnis f\u00fcr <code>phpMyAdmin<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">mkdir -p \/var\/lib\/phpmyadmin\/tmp\nchown www-data:www-data \/var\/lib\/phpmyadmin\/tmp<\/pre><\/div>\n\n\n\n<p>Die Apache Konfigurationsdatei wird noch aktiviert und Apache neu gestartet:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">a2enconf phpmyadmin.conf\nsystemctl restart apache2<\/pre><\/div>\n\n\n\n<p>Zum Schluss kann man entweder die URL von <code>phpMyAdmin<\/code> mit einem angeh\u00e4ngten <code>\/setup<\/code> aufrufen um die Konfiguration abzuschlie\u00dfen, oder man kopiert die <code>config.sample.inc.php<\/code> zu <code>config.inc.php<\/code> und erg\u00e4nzt manuell einen 32stelligen Blowfish Secret Schl\u00fcssel. Dieser muss nicht gemerkt werden.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seit Debian Buster ist phpMyAdmin nicht mehr in den Repositories zu finden und muss manuell installiert werden. Weseln Sie auf dem Server (auf dem ihr phpMyAdmin installiert werden soll) zu folgendem Pfad: und holt euch mittels wget die aktuellste Version von https:\/\/www.phpmyadmin.net\/ Im Anschluss wird die Zip Datei entpackt, umbenannt und mit den passenden Rechten[&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3048,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_general_container_width":0,"zakra_general_content_width":0,"zakra_general_sidebar_width":0,"zakra_sticky_header":"customizer","zakra_header_main_area":true,"zakra_site_logo_width":0,"zakra_header_top_enabled":"customizer","zakra_header_top_style":"customizer","zakra_primary_menu_item_style":"customizer","zakra_page_header_text_color":"","zakra_page_header_layout":"customizer","zakra_page_title_bg":"","zakra_footer_widgets_bg_image":0,"zakra_page_title_bg_repeat":"customizer","zakra_page_title_bg_position":"customizer","zakra_page_title_bg_size":"customizer","zakra_page_title_bg_attachment":"customizer","zakra_breadcrumbs_enabled":"customizer","zakra_breadcrumbs_text_color":"","zakra_breadcrumbs_separator_color":"","zakra_breadcrumbs_link_color":"","zakra_breadcrumbs_link_hover_color":"","zakra_page_title_bg_image":0,"zakra_footer_widgets_enabled":"customizer","zakra_footer_column_layout_1_style":"customizer","zakra_footer_widgets_bg":"","zakra_footer_widgets_bg_repeat":"customizer","zakra_footer_widgets_bg_position":"customizer","zakra_footer_widgets_bg_size":"customizer","zakra_footer_widgets_bg_attachment":"customizer","zakra_footer_bar_enabled":"customizer","zakra_footer_bar_style":"customizer","zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server"],"_links":{"self":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts\/3046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=3046"}],"version-history":[{"count":0,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts\/3046\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/media\/3048"}],"wp:attachment":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=3046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/categories?post=3046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/tags?post=3046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}