• CentOS7 yum安装lamp环境


    1.安装apache

        yum install httpd #根据提示,输入Y安装即可成功安装 
        systemctl start httpd.service #启动apache 
        systemctl stop httpd.service #停止apache 
        systemctl restart httpd.service #重启apache 
        systemctl enable httpd.service #设置apache开机启动 ·
    

    systemctl stop firewalld.service

    2.检查当前安装的PHP包

    yum list installed | grep php
    

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

    yum remove php.x86_64 php-cli.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.1配置 CentOS 7的yum源。

    yum -y install epel-release
    
    rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
    

    2.2使用yum list命令查看可安装的包(Packege)

    yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
    

    3.安装PHP5.6.x

    3.1yum源配置好了,下一步就安装PHP5.6。

    yum -y install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-gd
    
    

    用PHP命令查看版本。

    [root@localhost ~]# php -v
    PHP 5.6.36 (cli) (built: Apr 25 2018 10:02:39) 
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
        with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
    
    

    3.2安装PHP-fpm

    yum -y install --enablerepo=remi --enablerepo=remi-php56 php-fpm 
    
    

    重新启动服务:

    在 CentOS 7 系统上:
    
    $ sudo systemctl restart httpd
    $ sudo systemctl restart php-fpm
    
  • 相关阅读:
    Echarts之美国新冠疫情地图制作
    前端三件套--CSS(pink老师课程笔记)
    数据预处理与转存(Hive--Mysql)
    HDFS的命令行使用
    hdfs的写入过程和读取过程
    树(一)树的基本知识
    指针中容易混淆的概念
    顺序查找、单链表查找、折半查找
    JAVA之I/O流
    SpringBoot-自定义spring-boot-starter
  • 原文地址:https://www.cnblogs.com/caiji/p/9288270.html
Copyright © 2020-2023  润新知