Apache2: Ubuntu 20.04 instalasi Apache, PHP7, Percona 57

From OnnoWiki
Jump to navigation Jump to search

Sumber: https://ekozel.com/2019/10/05/install-ubuntu-18-4-apache2-php-7-3-and-mysql-5-6/

sudo apt update

Install Apache2

apt install apache2
sudo ufw allow 'Apache'

Install PHP 7.3

sudo apt update
sudo apt upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.3

Install extension

sudo apt install php7.3-extension_name
sudo apt install php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc \
php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev \
php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap \
php7.3-zip php7.3-int

Edit

sudo vi /etc/php/7.3/apache2/php.ini
upload_max_filesize = 100M
post_max_size = 48M
memory_limit = 512M
max_execution_time = 600
max_input_vars = 3000
max_input_time = 1000

Restart apache2

sudo systemctl restart apache2.service

Test

sudo vi /var/www/html/phpinfo.php
<?php phpinfo( ); ?>


Install Percona

sudo apt update
sudo apt -y install wget
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo percona-release setup ps80
sudo apt install percona-server-server
sudo vi /etc/mysql/percona-server.conf.d/mysqld.cnf
[mysqld]
max_allowed_packet=32M


Referensi