Blog Hosting, Server, Linux, Jaringan Komputer dan Internet 

Home Tutorial Install LAMP Server phpMyAdmin di Centos 7
formats

Install LAMP Server phpMyAdmin di Centos 7

Published on January 1, 2020, by in Tutorial.

Cek terlebih dahulu distibusi linux yang digunakan

cat /etc/redhat-release

Pastikan yum environment bersih dan update

yum clean all

yum update

 

INSTALL APACHE

Install Apache menggunakan yum

yum -y install httpd

Aktifkan dan enable kan apache

systemctl start httpd

systemctl enable httpd

Default lokasi instalasi apache berada pada

httpd binary: /sbin/httpd
Apache configuration file: /etc/httpd/conf/httpd.conf
Website files: /var/www/html/
Apache logs: /var/log/httpd/

 

INSTALL MARIADB

yum -y install mariadb-server

Aktifkan MariadB

systemctl start mariadb

Secure Install MariadB

mysql_secure_installation

Enable kan MariadB

systemctl enable mariadb

Lokasi default instalasi MariadB

MariaDB binary: /bin/mysql
MariaDB Configuration file: /etc/my.cnf
Database location: /var/lib/mysql
MariaDB logs: /var/log/mariadb/mariadb.log

 

INSTALLl PHP 7.0

Sekarang saatnya install PHP, yang kita butuhkan saat ini php versi 7.0

Install terlebih dahulu repository

yum -y install centos-release-scl.noarch

Sekarang Install php versi 7.0

yum -y install rh-php70

Sekarang fix the symbolic link binary

ln -s /opt/rh/rh-php72/root/usr/bin/php /usr/bin/php

Install modul PHP Mysql/MariadB

yum -y install rh-php70-php-mysqlnd

Restart apache

systemctl restart httpd

 

INSTALL PHPMYADMIN

Tambahkan repository phpmyadmin:

yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

Install phpMyAdmin

yum install phpmyadmin

Edit akses phpMyAdmin supaya bisa diakses dimana saja

nano /etc/httpd/conf.d/phpmyadmin.conf

Ganti Require menjadi all granted

<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8

<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

Install kembali PHP 7.0

yum -y install rh-php70

Restart Web Server

systemctl restart httpd

Untuk membuka phpmyadmin :

http://ip_address_server/phpmyadmin

selamat mencoba

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.