#apt install -y apache2 apache2-utils
C. Install PHP (PHP 7.3)
#apt install -y php libapache2-mod-php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear
php-bcmath
D. Install Database
#apt install -y mariadb-server mariadb-client #mysql_secure_installation
-----------
Set root password? [Y/n] Y
New password: tekaje
Re-enter new password:
Password updated
#phpMyAdmin
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
$cfg['blowfish_secret'] = 'Isisandiandika'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* 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
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;
Login database dengan sandi phpmyadmin
إرسال تعليق