CentOS 7 install httpd php7.3 MariaDB10.3(Mysql5.6)

  1. Login into centos via ssh or direct server
  2. $ yum install epel-release  -y
  3. $ yum install yum-utils -y
  4. $ yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  5. $ yum-config-manager –enable remi-php73 epel
  6. $ vim /etc/yum.repos.d/MariaDB.repo
  7. [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.3/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
  8. yum install httpd MariaDB-server MariaDB-client php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqphp-mysqlnd php-gd php-mbstring php-xml php-zlib ImageMagick php-memcached -y
  9. yum install MariaDB-server -y
  10. $ httpd -v
  11. $ php -v
  12. $ mysql –version
  13. systemctl start httpd.service
  14. systemctl start mariadb.service
  15. systemctl enable httpd.service
  16. systemctl enable mariadb.service
  17. mysql_secure_installation  (default password none, just enter, and set your root password then)
  18. put your website root to /var/www/html
  19. vim /etc/httpd/conf/httpd.conf
  20. <VirtualHost *:80>

    DocumentRoot /var/www/html/site

    ServerName www.xxx.com

    ServerAlias xxx.com

    <Directory /var/www/html/site>

    AllowOverride All

    </Directory>

    RewriteEngine On

    </VirtualHost>