yum install httpd -y
systemctl start httpd
systemctl enable httpd
firewall-cmd --permanent --add-service=http
systemctl restart firewalld
http://localhost/
or http://server-ip-address
You should see Apache default page.
yum install mariadb-server mariadb -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
yum install php php-mysql php-gd php-pear -y
nano /var/www/html/phpinfo.php
then add:
<?php
phpinfo();
?>
systemctl restart httpd
http://localhost/phpinfo.php
or http://server-ip-address/phpinfo.php
First install EPEL Repository: yum install epel-release
then install phpMyAdmin: yum install phpmyadmin -y
Access phpMyAdmin conf file: nano /etc/httpd/conf.d/phpMyAdmin.conf
Find and comment the whole / section and add the lines as shown below:
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
## Comment the following Section ##
#<Directory /usr/share/phpMyAdmin/>
# <IfModule mod_authz_core.c>
# # Apache 2.4
# <RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
# </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>
## Add the following lines:
<Directory /usr/share/phpMyAdmin/>
Options none
AllowOverride Limit
Require all granted
</Directory>
[...]
Edit “config.inc.php” file and change from “cookie” to “http” to change the authentication in phpMyAdmin:
nano /etc/phpMyAdmin/config.inc.php
then Change ‘cookie’ to ‘http’:
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
[...]
systemctl restart httpd
http://localhost/phpmyadmin
or http://server-ip-address/phpmyadmin