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
CentOS7 yum安装lamp环境的更多相关文章
- yum安装LAMP环境与管理(七)
[教程主题]:yum安装LAMP环境与管理 [1] 什么是LAMP 目前世界最流行的企业建站方式是LAMP(Linux+Apache+MySQL+PHP),即使用Linux作为操作系统,Apache作 ...
- centos 安装卸载软件命令 & yum安装LAMP环境
安装一个软件时 yum -y install httpd 安装多个相类似的软件时 yum -y install httpd* 安装多个非类似软件时 yum -y install httpd php p ...
- 使用ansible 完成yum安装lamp环境
使用ansible 完成yum安装lamp环境 [root@node2 ~]# cd /etc/ansible/playbook/[root@node2 playbook]# lslamp[root@ ...
- yum安装LAMP环境与管理
yum安装LAMP环境与管理 参考:http://www.zixue.it/ yum添加163源 地址: http://mirrors.163.com/.help/centos.html 下载方式: ...
- centos7.2 yum安装lamp环境
一.准备工作 1. 下载并安装centos7.2,配置好网络环境,确保centos能上网,可以获取到yum源. centos7.2的下载地址:http://pan.baidu.com/s/1eRT ...
- 将php网站移到CentOS 6.7上[一]:yum安装lamp环境
最近应老师要求,将一个网站从51php上转移到学校提供的服务器上,之前对Linux没有了解,一切都在百度百度百度.于是发现很多步骤自己做过后就忘了,现将有效步骤记录下来,以供下次参考. 原51php上 ...
- CentOS 7.4 yum安装LAMP环境
配置防火墙,开启80.3306端口.CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #停止firewall服务 systemctl stop firewa ...
- linux centos yum安装LAMP环境
centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...
- yum安装lamp环境
装了好些次lamp环境了,都没好好总结下,现在总结下 ^ ^ 1.替换163的yum源 1.检查系统版本 cat /etc/redhat-releas (我的版本是CentOS release 6 ...
随机推荐
- 深入浅出K-Means算法
在数据挖掘中,K-Means算法是一种cluster analysis的算法,其主要是来计算数据聚集的算法,主要通过不断地取离种子点最近均值的算法. 问题 K-Means算法主要解决的问题如下图所示. ...
- Linux Shell 1>/dev/null 2>&1 含义
shell中可能经常能看到:echo log > /dev/null 2>&1 命令的结果可以通过%>的形式来定义输出 /dev/null :代表空设备文件> :代表 ...
- Kaggle 比赛项目总结(项目流程)
一.EDA(Exploratory Data Analysis) EDA:也就是探索性的分析数据 目的: 理解每个特征的意义: 知道哪些特征是有用的,这些特征哪些是直接可以用的,哪些需要经过变换才能用 ...
- java多线程实现每隔500毫秒输出一个数字
总结:主要是利用多线程来进行控制它输出的速度,而且这里要处理异常,这个异常我是这样处理的 1.首先写完一个for循环后,写这个:Thread.currnetThread().sleep(500); 然 ...
- Linux学习笔记 -- 硬链接与软连接(转)
原文地址: http://www.cnblogs.com/itech/archive/2009/04/10/1433052.html Linux链接概念 Linux链接分两种,一种被称为硬链接(Har ...
- Flask之邮件扩展
4.4 Flask—Mail 在开发过程中,很多应用程序都需要通过邮件提醒用户,Flask的扩展包Flask-Mail通过包装了Python内置的smtplib包,可以用在Flask程序中发送邮件. ...
- numpy的一些用法
安装numpy windows安装pip即可,具体方法参考pip官网 http://pip-cn.readthedocs.io/en/latest/installing.html 安装方法:pip i ...
- Spring AOP 中pointcut expression表达式解析及配置
Pointcut是指那些方法需要被执行”AOP”,是由”Pointcut Expression”来描述的. Pointcut可以有下列方式来定义或者通过&& || 和!的方式进行组合. ...
- delphi 在桌面屏幕上模拟鼠标单击
delphi 在桌面屏幕上模拟鼠标单击 procedure TFrmUnicom.Button1Click(Sender: TObject); var oldPoint, newPoint: TPoi ...
- axis调用webservice客户端开发
第一步:wsdl2Java.bat文件编写 Axis_Lib表示依赖的jar包路径 Output_Path表示生成的class路径 Package包名 还需要手动更改 -p %Package%表示we ...