apache+mysql+php72w

yum check-update:更新 yum 软件包

yum list installed | grep httpd:检查是否安装 apache

rpm -qa | grep httpd:卸载 apache

yum install httpd:安装 apache

httpd -v:查看 apache 版本

systemctl start httpd:启动 apache

yum -y install mariadb-server mariadb mariadb-devel:安装 mysql(MariaDB 是 MySQL 的一个开源分支,和 MySQL 通用。mariadb-server:服务器端;mariadb:命令行客户端;mariadb-devel:开发库)

systemctl start mariadb:启动 mariadb

更新下 yum 源如果是 centos7 将 el6 改为 e17
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum list php*:查看 yum 下的 PHP 安装包

yum install php72w:安装 php7.2 版本

yum install php72w-fpm php72w-mysql php72w-xml php72w-mbstring php72w-openssl php72w-gd:安装 php 相关扩展

php -v:查看 php 版本

systemctl start php-fpm:启动 php

你可能感兴趣的:(Linux)