Install Apache, MySQL, PHP/PhpMyAdmin on Centos 7
Gunakan root untuk menginstall dan configure service
1. Install Apache
# yum install httpd
Setelah terinstall restart dengan perintah berikut :
# yum systemctl restart httpd ( restart apache )
# yum systemctl status httpd ( cek status apache )
Setelah ini tambahkan http pada firewall dengan perintah berikut :
# firewall-cmd --add-service=http
# firewall-cmd --permanent --add-service=http
# systemctl restart firewalld
Akses browser masukkan ip anda, maka akan muncul seperti berikut :
Apabila sudah muncul seperti diatas maka konfigurasi apache berhasil.
2. Install PHP5 Support for Apache
Masukkan command berikut untuk menginstall PHP 5 :
# yum install php php-mysql php-pdo php-gd php-mbstring
Masukkan command berikut untuk mengecek php nya sudah ada :
# echo "<?php phpinfo(); ?>" >
/var/www/html/info.php
# systemctl restart httpd
3. Install and Configure MariaDB
Masukkan command berikut untuk mengintall :
# yum install mariadb-server mariadb
Setelah itu mulai dengan command berikut :
# systemctl start mariadb
Dan untuk configure password database gunakan command berikut :
# mysql_secure_installation
Apabila sudah , bisa coba login dengan command berikut :
# mysql -u root -p
4. Install PHPMyadmin
Sebelum menginstall phpmyadmin, install package berikut :
# yum install epel-release
Install package dengan command berikut :
# yum install phpmyadmin
edit file berikut untuk mengarahkan ip address dengan command berikut :
# nano /etc/httpd/conf.d/phpMyAdmin.conf
Tambahkan ip address anda pada
Require ip ( Masukkan ip address anda )
Allow from ( Masukkan ip address anda )
Require ip ( Masukkan ip address anda )
Allow from ( Masukkan ip address anda )
Setelah itu restart dengan command berikut :
# systemctl restart httpd.service
Coba akses dengan browser anda http://ipaddressanda/phpmyadmin
Terima kasih semoga membantu.