Setting Up MariaDB & Phpmyadmin

Installing apache2

yum update -y
yum install httpd nano -y
systemctl enable httpd.service
systemctl restart httpd.service

Installing PHP

yum install -y php

Installing Mariadb

yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation

Installing phpymadmin

yum install epel-release -y
yum install phpmyadmin -y
nano /etc/httpd/conf.d/phpMyAdmin.conf

I want every ip to get to my phpmyadmin login page.

<Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> #Require ip 0.0.0.0 #Require ip ::1 Require all granted </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 0.0.0.0 Allow from ::1 </IfModule></Directory><Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 0.0.0.0 Require ip ::1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 0.0.0.0 Allow from ::1 </IfModule></Directory>

systemctl restart httpd.service

Open Ports

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload
systemctl restart firewalld
firewall-cmd --zone=public --list-ports

To access your new install.

http://server_domain_or_IP/phpMyAdmin

Was this helpful?

0 / 0