LAMP on CentOS 7


  • Step 1: Install Apache
    yum clean all
    yum -y update
    yum -y install httpd
  • Step 2: Allow Apache Through the Firewall
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    firewall-cmd --zone=public --add-port=443/tcp --permanent
    firewall-cmd --reload
  •  Step 3: Configure Apache to Start on Boot
    systemctl start httpd
    systemctl enable httpd


  • CentOS/RHEL 7.x:
    rpm -Uvh
    rpm -Uvh
  • Install php 7
    yum -y install php70w php70w-opcache

MySQL / MariaDB

  • Install MySQL / MariaDB
    yum -y install mariadb-server mariadb
    systemctl start mariadb
    systemctl enable mariadb


  • Step 1: Add the EPEL Repository
    rpm -iUvh
  • Step 2: Install phpMyAdmin
    yum -y update
    yum -y install phpmyadmin
  • Step 3: Basic Configuration for phpMyAdmin
    vi /etc/httpd/conf.d/phpMyAdmin.conf
    systemctl restart httpd


  • Disabled SELINUX
  • vi /etc/sysconfig/selinux
    set SELINUX=disabled

Leave a Reply

你的電子郵件位址並不會被公開。 必要欄位標記為 *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料