LAMP

From AlphaBook
Jump to: navigation, search

Linux

  • Install Centos 7

Apache

  • yum install httpd -y
  • systemctl status httpd
  • systemctl start httpd
  • systemctl enable httpd
  • firewall-cmd --permanent --add-service=http
  • firewall-cmd --reload
  • firewall-cmd --list-service
  • More about httpd

MariaDB

  • yum install mariadb-server -y
  • systemctl start mariadb
  • systemctl enable mariadb
  • mysql_secure_installation
  • More about MariaDB

PHP

  • yum install php php-mysql -y
  • vi /var/www/html/info.php
    • <?php
    • phpinfo();
    •  ?>
  • systemctl restart httpd
  • http://x.x.x.x/info.php

Install phpMyAdmin

  • yum install epel-release -y
  • yum install phpmyadmin -y
  • vi /etc/httpd/conf.d/phpMyAdmin.conf
  • For the "Require ip" part, add 192.168.200.100 (one of your managing IPs from)
    • Require ip 127.0.0.1 192.168.200.100
  • If not, may get below error:
    • You don't have permission to access /phpmyadmin on this server.

LAMP on Ubuntu