安装php

1 、如果之前已经安装我们先卸载一下

        yum -y remove php*

2 、由于linux的yum源不存在php7.x,所以我们要更改yum源

        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

3、yum 安装php7和各种拓展,选自己需要的即可

        yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

安装mysql

1.源码下载mysql-server的rpm的包

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 

2.rpm安装

rpm -ivh mysql-community-release-el7-5.noarch.rpm 

3.使用yum命令进行安装

yum install mysql-server

安装nginx

1.使用yum命令进行安装

yum install mysql-server

文章来源于互联网,如有雷同请联系站长删除:Linux centos 安装nginx mysql php

发表评论