Skip to content

Commit

Permalink
Adding old content "Instalasi PHP, Apache, MySQL dan PhpMyAdmin di Ar…
Browse files Browse the repository at this point in the history
…ch Linux"
  • Loading branch information
ditatompel committed May 27, 2023
1 parent d17179b commit f8a4323
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/archives/2012/02/_index.id.md
@@ -0,0 +1,3 @@
---
title: Feb
---
3 changes: 3 additions & 0 deletions content/archives/2012/02/_index.md
@@ -0,0 +1,3 @@
---
title: Feb
---
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,91 @@
---
title: "Instalasi PHP, Apache, MySQL dan PhpMyAdmin di Arch Linux"
description: "Step-by-step instalasi PHP Apache, MySQL dan PhpMyAdmin di Arch Linux."
# linkTitle:
date: 2012-02-18T05:01:30+07:00
lastmod:
draft: false
noindex: false
# comments: false
nav_weight: 1000
# nav_icon:
# vendor: bootstrap
# name: toggles
# color: '#e24d0e'
series:
# - Tutorial
categories:
- SysAdmin
tags:
- Linux
- MySQL
- Apache
- PHP
images:
# menu:
# main:
# weight: 100
# params:
# icon:
# vendor: bs
# name: book
# color: '#e24d0e'
authors:
- ditatompel
---

*Step-by-step* instalasi **PHP**, **Apache**, **MySQL** dan **PhpMyAdmin** di **Arch Linux**.

<!--more-->

Kenapa Arch Linux? Karena saya nyaman menggunakan Arch, dan hanya dengan package managernya kita udah dapet kernel dan software-software terbaru dan *up-to-date*.

{{< youtube zr7TVU7SZUs >}}

1. Pertama kita pastikan bahwa sistem kita sudah up to date.
```bash
pacman -Syu
```
2. Jika sudah, kita mulai *install* apa yang kita butuhkan.
```bash
pacman -S php apache php-mcrypt phpmyadmin mysql
```
3. masuk pada folder `/etc/webapps/phpmyadmin`, kemudian copy konfigurasi **phpmyadmin** ke `/etc/httpd/conf/extra`
```bash
cp /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpmyadmin.conf
```
4. Kita *include-kan* konfigurasi tersebut pada `httpd.conf` utama di folder `/etc/httpd/conf`
```apache
# Konfigurasi phpmyadmin
Include conf/extra/httpd-phpmyadmin.conf
```
![Apache Config PHPMyAdmin](phpmyadmin-include.png#center)

Kemudian cek `localhost` dan `phpmyadmin` pada browser.

6. Jika ada pesan *forbidden* pada **phpmyadmin**, kita tambahkan konfigurasi `DirectoryIndex index.html index.php` pada `/etc/httpd/conf/extra/httpd-phpmyadmin.conf` lalu **restart** http server.

![DirectoryIndex Apache](directoryIndex.png#center)

7. Jika **PhpMyAdmin** sudah dapat diakses, tetapi masih ada pesan error *"The mysqli extension is missing."* atau *"The mcrypt extension is missing"*; Kita perlu *me-enable* ekstensi tersebut pada `php.ini` dengan menghilangkan tanda titik koma (`;`) di depan ekstensi yang dibutuhkan.

![PHP Extension](extension.png#center)

```ini
extension=mcrypt.so
extension=mysqli.so
extension=mysql.so
```

kemudian kita coba **restart** http server lagi.

Untuk informasi, pada Arch Linux, secara default `httpd` berjalan dengan *user* `http` dan *group* `http`. Agar lebih nyaman dan tidak terdapat pesan error pada CMS2 tertentu, kita perlu merubah permission dan owner pada folder `/srv/http` (tempat folder `public_html`)

```bash
chown -R http:http /srv/http
```
maka selesai sudah proses installasi Apache, PHP, MySQL, dan PhpMyAdmin.

Nah sementara basicnya sampe disini dulu.


Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f8a4323

Please sign in to comment.