Linux

[Part 3] Instalasi PhpMyAdmin di Debian 10

Thursday, 17th September 2020

Lanjutan dari Part 1 dan 2 ya 🙂

E. Install PHPMyAdmin
1.	#wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.tar.gz
2.	#tar -zxvf phpMyAdmin-4.9.0.1-all-languages.tar.gz
3.	#mv phpMyAdmin-4.9.0.1-all-languages /usr/share/phpMyAdmin
4.	#cp -pr /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
5.	#nano /usr/share/phpMyAdmin/config.inc.php
    ----- cari bagian ini ----
    $cfg['blowfish_secret'] = 'Isidenganapasajaboleh'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
    ------cari bagian ini kemudian di hilangkan tanda garis miringnya/comment nya --------------------
    /**
    * phpMyAdmin configuration storage settings.
    */

    /* User used to manipulate with storage */
    $cfg['Servers'][$i]['controlhost'] = 'localhost'; /*<------- isi dengan "localhost"*/
    // $cfg['Servers'][$i]['controlport'] = '';
    $cfg['Servers'][$i]['controluser'] = 'pma';
    $cfg['Servers'][$i]['controlpass'] = 'pmapass';

    /* Storage database and tables */
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma__relation';
    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
    $cfg['Servers'][$i]['history'] = 'pma__history';
    $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
    $cfg['Servers'][$i]['recent'] = 'pma__recent';
    $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
    $cfg['Servers'][$i]['users'] = 'pma__users';
    $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
    $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
    $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
    $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
    $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
    $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
    ---------------------------- simpan Crtl+x, Y
6.	#mysql < /usr/share/phpMyAdmin/sql/create_tables.sql -u root -p
7.	#mysql -u root -p
8.		mysql>GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
9.		mysql>FLUSH PRIVILEGES;
10.		mysql>quit;
    
11.	#nano /etc/apache2/sites-available/phpmyadmin.conf
        ---- isi dengan script ini, copas saja.
        Alias /phpMyAdmin /usr/share/phpMyAdmin
        Alias /phpmyadmin /usr/share/phpMyAdmin

        <Directory /usr/share/phpMyAdmin/>
            AddDefaultCharset UTF-8

       <IfModule mod_authz_core.c>
         # Apache 2.4
         <RequireAny> 
          Require all granted
         </RequireAny>
       </IfModule>
       <IfModule !mod_authz_core.c>
         # Apache 2.2
         Order Deny,Allow
         Deny from All
         Allow from 127.0.0.1
         Allow from ::1
       </IfModule>
    </Directory>

    <Directory /usr/share/phpMyAdmin/setup/>
       <IfModule mod_authz_core.c>
         # Apache 2.4
         <RequireAny>
           Require all granted
         </RequireAny>
       </IfModule>
       <IfModule !mod_authz_core.c>
         # Apache 2.2
         Order Deny,Allow
         Deny from All
         Allow from 127.0.0.1
         Allow from ::1
       </IfModule>
    </Directory>
    --------------------- simpan Ctrl+x, Y
12.	#/usr/sbin/a2ensite phpmyadmin
13.	#mkdir /usr/share/phpMyAdmin/tmp
14.	#chmod 777 /usr/share/phpMyAdmin/tmp
15.	#chown -R www-data:www-data /usr/share/phpMyAdmin
16.	#/etc/init.d/apache2 restart
    
    ---- membuat akses login ke phpmyadmin ----
17.	#mysql -p -u root
18.	mysql>CREATE USER 'tekaje'@'%' IDENTIFIED BY 'tekaje';
19.	mysql>GRANT ALL PRIVILEGES ON *.* TO 'tekaje'@'%' WITH GRANT OPTION;
20.	mysql>quit;
    ----- selesai coba login ke phpmyadmin user dan password: tekaje----

Video tutorial:

Leave a Reply

Your email address will not be published. Required fields are marked *