- Seting Server
Install paket
root@ns1:~# apt install mariadb-server mariadb-client php-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
galera-3 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3
libmpfr6 libreadline5 libsigsegv2 libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.3 mariadb-client-core-10.3
mariadb-common mariadb-server-10.3 mariadb-server-core-10.3 mysql-common rsync socat
Suggested packages:
gawk-doc libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test
netcat-openbsd tinyca
The following NEW packages will be installed:
galera-3 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3
libmpfr6 libreadline5 libsigsegv2 libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client mariadb-client-10.3
mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 mysql-common rsync socat
0 upgraded, 35 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.1 MB of archives.
After this operation, 169 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.smkn1klaten.sch.id/debian/buster/amd64 libmpfr6 4.0.2-1 [775 kB]
Get:2 http://repo.smkn1klaten.sch.id/debian/buster/amd64 libsigsegv2 2.12-2 [32.8 kB]
Get:3 http://repo.smkn1klaten.sch.id/debian/buster/amd64 gawk 1:4.2.1+dfsg-1 [660 kB]
Get:4 http://repo.smkn1klaten.sch.id/debian/buster/amd64 mysql-common 5.8+1.0.5 [7,324 B]
Setting up libcgi-fast-perl (1:2.13-1) ...
Setting up mariadb-server (1:10.3.15-1) ...
Processing triggers for systemd (241-5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
root@ns1:~#
Konfigurasi database MySQL
root@ns1:~# mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 47
Server version: 10.3.15-MariaDB-1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "dbroot";
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> quit
Bye
root@ns1:~#
Install PHPMyAdmin
root@ns1:~# wget https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip
--2021-01-05 01:15:20-- https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip
Resolving files.phpmyadmin.net (files.phpmyadmin.net)... 89.187.162.49, 89.187.162.46, 89.187.162.57, ...
Connecting to files.phpmyadmin.net (files.phpmyadmin.net)|89.187.162.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14316903 (14M) [application/zip]
Saving to: ‘phpMyAdmin-5.0.4-all-languages.zip’
phpMyAdmin-5.0.4-all-languages.zip 100%[============================================================================>] 13.65M 624KB/s in 14s
2021-01-05 01:15:34 (1020 KB/s) - ‘phpMyAdmin-5.0.4-all-languages.zip’ saved [14316903/14316903]
root@ns1:~# apt install unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
zip
The following NEW packages will be installed:
unzip
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 169 kB of archives.
After this operation, 567 kB of additional disk space will be used.
Get:1 http://repo.smkn1klaten.sch.id/debian/buster/amd64 unzip 6.0-23 [169 kB]
Fetched 169 kB in 10s (16.6 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 29949 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-23_amd64.deb ...
Unpacking unzip (6.0-23) ...
Setting up unzip (6.0-23) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for man-db (2.8.5-2) ...
root@ns1:~# unzip phpMyAdmin-5.0.4-all-languages.zip
inflating: phpMyAdmin-5.0.4-all-languages/version_check.php
inflating: phpMyAdmin-5.0.4-all-languages/view_create.php
inflating: phpMyAdmin-5.0.4-all-languages/view_operations.php
inflating: phpMyAdmin-5.0.4-all-languages/yarn.lock
root@ns1:~# mv phpMyAdmin-5.0.4-all-languages /var/www/html/phpmyadmin
root@ns1:~# cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php
root@ns1:~# pico /var/www/html/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = 'RfMd2oX7L7vT9Ls6fkuM0KwY;9gcho3C'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
root@ns1:~# mkdir /var/www/html/phpmyadmin/tmp
root@ns1:~# chown www-data:www-data -R /var/www/html/phpmyadmin
root@ns1:~# service apache2 restart
- Pengujian
- Selesai
- Semoga bermanfaat