Wednesday, March 24, 2021

Cara Cepat Instalasi Apache + MariaDB + PHP + PHPMyAdmin + SSL di VPS Debian 9

1. Install Apache

apt-get -y install apache2

2. Install MariaDB

apt-get -y install mariadb-server mariadb-client

3. Install PHP

apt autoremove php

apt install ca-certificates apt-transport-https

wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -

echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list

4. Update repository dan install PHP 7.2

apt update

apt upgrade

apt install libapache2-mod-php7.2 php7.2 php7.2-cli php7.2-common php7.2-opcache php7.2-curl php7.2-mbstring php7.2-mysql php7.2-zip php7.2-xml php7.2-gd php7.2-intl php-imagick

5. Verifikasi hasil install PHP 7.2 untuk mengecek versi PHP.

php -v

6. Install APCu 

apt-get install php7.2-apcu

service apache2 restart

7. Install PHPMyAdmin

apt-get -y install phpmyadmin

8. Install SSL

a2enmod ssl

a2ensite default-ssl.conf

service apache2 restart

wget https://raw.githubusercontent.com/certbot/certbot/7f0fa18c570942238a7de73ed99945c3710408b4/letsencrypt-auto-source/letsencrypt-auto -O /opt/certbot-auto

apt-get update

apt-get install python-certbot-apache

certbot --apache -d domainAnda.com



0 comments:

Post a Comment