1.apt install wget -y
------
(ini sudah skip saja)
2.apt install apache2 -y
------
3.systemctl status apache2
------
4.apt install php php-cgi php-mysqli php-pear php-mbstring php-gettext libapache2-mod-php php-common php-phpseclib php-mysql -y
------
5.php --version
------
7.apt install mariadb-server mariadb-client -y
jika error code(1) ulangi apt install mariadb-server mariadb-client -y
------8
systemctl status mariadb
jika tulisan running warna hijau berarti konfig benar
maka tekan ctrl z
------9
mysql_secure_installation
==
Set root password? [Y/n] – Type y and press Enter to create a strong root password for your database.
Remove anonymous users? [Y/n] – Type y and press Enter.
Disallow root login remotely? [Y/n] – Type y and press Enter.
Remove test database and access to it? [Y/n] – Type y and confirm with Enter.
Reload privilege tables now? [Y/n] – Type y and confirm with Enter.
------10
Step 2: Download phpMyAdmin
Use the wget command to retrieve the latest stable version of phpMyAdmin:
wget --no-check-certificate wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
-----11
wget --no-check-certificate wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring
-----12
wget --no-check-certificate wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc
-----13
mkdir /var/www/html/phpmyadmin
-----14
cd Downloads
----15
tar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin/
----16
cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php
----17
nano /var/www/html/phpmyadmin/config.inc.php
----18
Locate the following line:
$cfg['blowfish_secret'] = '';
----19
$cfg['blowfish_secret'] = 'my_secret_passphrase';
chmod 660 /var/www/html/phpmyadmin/config.inc.php
----20
chown –R www-data:www-data /var/www/html/phpmyadmin
----21
nano 000-default.conf
DocumentRoot /var/www/html/phpmyadmin
systemctl restart apache2
----22
localhost/phpmyadmin >> atau ganti dengan domain anda misal richan.net => ubah DocumentRoot di 000-default.conf
----23
akses login ke phpmyadmin harus membuat user grants privileges caranya adalah:
mysql -u root -p
----24
CREATE DATABASE richan;
SHOW DATABASES;
CREATE USER richan@localhost IDENTIFIED BY 'richan';
GRANT ALL PRIVILEGES ON * . * TO 'richan'@'localhost';
GRANT ALL PRIVILEGES ON richan.* TO 'richan'@localhost;
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'richan'@localhost;
lalu loginlah ke browser dengan mengetikan domainanda.net/phpmyadmin atau bisa menggunakan ip
No comments:
Post a Comment