yum安装lnmp环境
  • 分类:Linux
  • 发表:2017-03-15
  • 围观(508)
  • 评论()

1.检查当前安装的PHP包

yum list installed | grep php

如果有安装的PHP包,先删除他们

yum remove php.x86_64 php-cli.x86_64 php56w-devel.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64

2.Centos

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm    ##CentOs 5.x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm    ##CentOs 6.x
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm   ##CentOs 7.X
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

如果想删除上面安装的包,重新安装
rpm -qa | grep webstatic
rpm -e  上面搜索到的包即可

3.运行yum install

yum install php55w.x86_64 php55w-cli.x86_64 php55w-devel.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64

64位
yum install php56w php56w-common php56w-cli php56w-devel php56w-fpm php56w-gd php56w-imap php56w-mbstring php56w-mcrypt php56w-pdo php56w-mysql php56w-xml php56w-pear php56w-process php56w-pecl-igbinary php56w-xmlrpc php56w-opcache php56w-intl php56w-pecl-memcache php56w-soap php56w-pecl-imagick-devel php56w-pecl-imagick php56w-pecl-redis php56w-ldap php56w-pecl-xdebug php56w-pecl-memcached php56w-pecl-redis php56w-fpm
32位
yum install php56w.i386 php56w-cli.i386 php56w-devel.i386 php56w-common.i386 php56w-gd.i386 php56w-ldap.i386 php56w-mbstring.i386 php56w-mcrypt.i386 php56w-mysql.i386 php56w-pdo.i386

注:如果想升级到5.6把上面的55w换成56w就可以了。

yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
4.安装PHP FPM

yum install php55w-fpm
yum install php56w-fpm
yum install php70w-fpm

5、安装linux

直接安装 yum -y install nginx

6、安装mysql
centos6.5

yum -y install mysql-server

yum -y install mysql-devel

centos7.0

CentOS7的yum源中默认是没有mysql的。为了解决这个问题,我们要先下载安装mysql的repo源。

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

安装这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。

执行安装命令

yum install mysql-server

yum -y install mysql-devel

共有 0 条评论

analytical essay conclusion steps to writing an argumentative essay writing a scholarship essay essay introduction outline speech writing services custom dissertation writing master thesis proposal law essay help uk dissertation writing help essay outline format essay proofreading service