yum install httpd -y
systemctl start httpd
systemctl enable httpd
http://云服务器实例的公网 IP

rpm -qa | grep -i mariadb

yum -y remove 包名
/etc/yum.repos.d/ 下创建 MariaDB.repo 文件。 vi /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.4 CentOS repository list - created 2019-11-05 11:56 UTC# http://downloads.mariadb.org/mariadb/repositories/[mariadb]name = MariaDBbaseurl = http://yum.mariadb.org/10.4/centos7-amd64gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDBgpgcheck=1
yum -y install MariaDB-client MariaDB-server
systemctl start mariadb
systemctl enable mariadb
mysql

\\q
rpm -Uvh https://mirrors.cloud.tencent.com/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php70w php70w-opcache php70w-mbstring php70w-gd php70w-xml php70w-pear php70w-fpm php70w-mysql php70w-pdo
vi /etc/httpd/conf/httpd.conf




ServerName www.example.com:80 下另起一行,输入以下内容:ServerName localhost:80
<Directory> 中的 Require all denied 修改为 Require all granted。<IfModule dir_module> 中内容替换为 DirectoryIndex index.php index.html。AddType application/x-gzip .gz .tgz 下另起一行,输入以下内容:AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps
systemctl restart httpd
echo "<?php phpinfo(); ?>" >> /var/www/html/index.php
http://云服务器实例的公网 IP/index.php

文档反馈