Konfigurasi PHP 7.3
Pastikan kita sudah login ke dalan root dan terhubung ke internet, untuk mengambil repo local dengan catatan file repo sudah ditambahkan kedalam /etc/apt/sources.list
Untuk menambahkan file sources.list silahkan dilihat pada jebsheet sebelumnya
1. root@alan:~# apt -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring
2. lalu mulai mengConfigure Apache2.
root@alan:~# /sbin/a2enconf php7.3-cgi
Enabling conf php7.3-cgi.
To activate the new configuration, you need to run:
systemctl reload apache2
root@alan:~# vi /etc/php/7.3/apache2/php.ini
# line 960: uncomment and add your timezone
date.timezone = "Asia/Tokyo"
root@alan:~# systemctl restart apache2
[3] Create a PHP test page and access to it from client PC with web browser. It's OK if following page is shown.
root@alan:~# vi /var/www/html/index.php
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
<?php
print "PHP Test Page";
?>
</div>
</body>
</html>
Tidak ada komentar:
Posting Komentar