How to install the LAMP in centos 7 ?


How to install the LAMP  in centos 7 ?

franklinneal Supporter Asked on January 30, 2017 in Technology.
Add Comment
1 Answer(s)

Hello  All,

Follow these steps :

1) APACHE
yum install httpd
systemctl start httpd
systemctl enable httpd
firewall-cmd –permanent –add-service=http
firewall-cmd –permanent –add-service=https
systemctl restart firewalld
http://localhost/ or http://IP_Address/.

2) MARIA DB

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

3) PHP

yum install php php-mysql php-gd php-pear
vi /var/www/html/info.php

add the following lines
<?php
phpinfo();
?>

systemctl restart httpd

http://IP_Address/info.php.

yum install php*

4) php my admin

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

comment all the lines below

#<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
# </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>

systemctl restart httpd

http://IP_Address/phpmyadmin/


jamesnathon Supporter Answered on February 10, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.