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

CentOS7 yum安装lamp环境的更多相关文章

  1. yum安装LAMP环境与管理(七)

    [教程主题]:yum安装LAMP环境与管理 [1] 什么是LAMP 目前世界最流行的企业建站方式是LAMP(Linux+Apache+MySQL+PHP),即使用Linux作为操作系统,Apache作 ...

  2. centos 安装卸载软件命令 & yum安装LAMP环境

    安装一个软件时 yum -y install httpd 安装多个相类似的软件时 yum -y install httpd* 安装多个非类似软件时 yum -y install httpd php p ...

  3. 使用ansible 完成yum安装lamp环境

    使用ansible 完成yum安装lamp环境 [root@node2 ~]# cd /etc/ansible/playbook/[root@node2 playbook]# lslamp[root@ ...

  4. yum安装LAMP环境与管理

    yum安装LAMP环境与管理 参考:http://www.zixue.it/ yum添加163源 地址: http://mirrors.163.com/.help/centos.html 下载方式: ...

  5. centos7.2 yum安装lamp环境

    一.准备工作 1.   下载并安装centos7.2,配置好网络环境,确保centos能上网,可以获取到yum源. centos7.2的下载地址:http://pan.baidu.com/s/1eRT ...

  6. 将php网站移到CentOS 6.7上[一]:yum安装lamp环境

    最近应老师要求,将一个网站从51php上转移到学校提供的服务器上,之前对Linux没有了解,一切都在百度百度百度.于是发现很多步骤自己做过后就忘了,现将有效步骤记录下来,以供下次参考. 原51php上 ...

  7. CentOS 7.4 yum安装LAMP环境

    配置防火墙,开启80.3306端口.CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #停止firewall服务 systemctl stop firewa ...

  8. linux centos yum安装LAMP环境

    centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...

  9. yum安装lamp环境

    装了好些次lamp环境了,都没好好总结下,现在总结下 ^ ^ 1.替换163的yum源 1.检查系统版本 cat /etc/redhat-releas   (我的版本是CentOS release 6 ...

随机推荐

  1. Fragment和FragmentActivity的使用

    可以分为下面的几部分: 使用支持库 创建一个Fragment 创建一个动态UI 多个Fragment之间的通信 1.使用支持库 如果您的应用需要运行在3.0及以上的版本,可以忽略这部分内容. 如果您的 ...

  2. Jmeter录制HTTPS 补充

    Jmeter有录制功能,录制HTTPs需要增加一个证书配置,录制步骤如下: 1.打开jmeter,添加线程组.线程组右键,逻辑控制器>录制控制器 工作台 右键 非测试元件 >HTTP代理服 ...

  3. windows提权辅助工具koadic

    项目地址:https://github.com/zerosum0x0/koadic ┌─[root@sch01ar]─[/sch01ar] └──╼ #git clone https://github ...

  4. storm集群配置以及java编写拓扑例子

    storm集群配置 安装 修改配置文件 使用java编写拓扑 storm集群配置 storm配置相当简单 安装 tar -zxvf apache-storm-1.2.2.tar.gz rm apach ...

  5. win7下cygwin 中 root用户的设置

    问题描述: cygwin 在 win10下安装完成后使用当前用户登录后看所在磁盘的文件权限是没有问题的,但在cygwin编译出来的文件的权限为空,这个问题可以使用以下方法来解决: 解决办法: 将cyg ...

  6. Java面向对象-递归

    Java面向对象-递归 递归,就是程序调用自身,我们讲的是方法递归调用,也就是在方法里自己调用自己: 我们给出一个案例,求阶乘  1*2*3*...*(n-1)*n 我们用非递归和递归方式分别实现下, ...

  7. vmware 仅主机模式 ip配置

    首先关闭防火墙 主机(宿主机器 win7) 虚拟机(xp) 3..重要提示:  如果ping不通首先考虑防火墙的问题!!! vmware配置: nat模式下玩耍: 1. 配置nat的虚拟网卡:  2. ...

  8. struts2结合axis开发webservice

    第一步:引入axis的依赖jar包  第二步:修改web.xml文件  <listener> <listener-class>org.apache.axis.transport ...

  9. C++风格与C风格文件读写效率测试-vs2015,vs2017

    void test_write() { ; const char* c_plus_write_file = "H://c_plus_write_file.txt"; const c ...

  10. C#使用ADO操作Excel

    1 说明 把excel当成一个数据库,类似于Access数据库来操作. 2 源代码 2.1 Model层 /// <summary> /// 人员信息 /// </summary&g ...