Install PHP dan MySQL di VPS dengan OS Centos 8

VPS adalah solusi yang lebih baik untuk memiliki web server dibandingkan web hosting. Tapi untuk memulai mengelola VPS dengan akses awal ssh (secure shell) perlu instalasi PHP dan MySQL secara manual.

Berikut langkah-langkah instalasi PHP dan Mysql di server VPS dengan sistem operasi Centos:

  1. Instalasi PHP
dnf info php

2. Install extensi standar PHP

dnf install php php-mysqlnd php-pdo php-gd php-mbstring

3. Aktifkan / auto running PHP

systemctl enable php-fpm
systemctl start php-fpm
systemctl status php-fpm

4. restart web server

systemctl restart httpd.service

Cek hasil instalasi dengan menuliskan <?php phpinfo(); ?> di /var/www/html dengan nama file info.php

5. Install MySQL

dnf install mysql

6. Aktifkan / auto running MySQL

sudo systemctl enable --now mysqld

7. Cek Hasil Instalasi

sudo systemctl status mysqld

8. Aktifkan pengamanan password dsb

sudo mysql_secure_installation

9. Tes MySQL

mysql -u root -p

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s