源码安装CentOs7下的PHP7
首先安装APACHE环境,直接用yum安装
yum install httpd httpd-devel
/etc/httpd/
systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重启apache
然后安装mysql(mariadb)
yum install mariadb mariadb-server
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
vi /etc/my.cnf
#最后添加
log-slow-queries=/var/log/mariadb/slow.log
long_query_time=1
log-queries-not-using-indexes systemctl start mariadb.service
mysql_secure_installation #(改密码,如果有密码 可能是root1234)
完装完这两个环境之后,现在源码安装PHP7.2.8
#下载镜像文件
wget http://hk1.php.net/get/php-7.2.8.tar.gz/from/this/mirror
tar zxvf mirror
cd php-7.2.8 #如果是新环境,需要安装一些依赖
yum install autoconf gcc httpd-devel libxml2 libxml2-* openssl.x86_64 openssl-devel.x86_64 libcurl.x86_64 libcurl-devel.x86_64 libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 libjpeg-turbo-devel -y ./configure --with-mysqli --with-curl --with-apxs2=/usr/bin/apxs --with-openssl --enable-mbstring --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-jpeg-dir --with-config-file-path=/etc/php.ini make && make install
之后要配置APACHE的配置文件
vi /etc/httpd/conf/httpd.conf
#找到LoadModule 大约在54行左右,在注释下面,加入下面的配置
#php.ini的目录
PHPIniDir /etc
LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so #解析.php文件
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch> <IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule> AddType application/x-httpd-php .php
之后重启apache就可以使用了
systemctl restart httpd.service
源码安装CentOs7下的PHP7的更多相关文章
- centos7 源码安装指定版本的php7
很多时候可能会遇到需要手动源码安装软件的时候,所以自己实践了一把,并且把安装过程中遇到的问题,以及在网上找到的解决办法(实测有效)都记录下来,方便日后学习实践. 1. 系统环境 # cat /etc/ ...
- MYSQL5.5源码安装 linux下
/* 首先安装必要的库 */ yum -y install gcc* ###### 安装 MYSQL ###### 首先安装camke 一.支持YUM,则 yum install -y cmake 二 ...
- 烂泥:源码安装apache
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近要开始学习nagios监控方面的知识了,但是nagios与apache结合的比较紧密,所以本篇文章就先把apache的源码安装学习下. 我们现在分以 ...
- 在ConoHa上Centos7环境下源码安装部署LNMP
本文记录了从源码,在Centos 7上手动部署LNMP环境的过程,为了方便以后对nginx和mariadb进行升级,这里采用yum的方式进行安装. 1.建立运行网站和数据库的用户和组 groupadd ...
- CentOS7下源码安装mysql5.6
目录 准备工作 运行环境 确认你的安装版本 下载mysql 安装mysql 准备安装环境 编译和安装 配置mysql 单实例配置 单实例配置方法 添加防火墙 ...
- nginx在Centos7.5下源码安装和配置
安装nginx 安装nginx依赖包 yum install -y pcre-devel zlib-devel openssl-devel wget gcc tree vim 进入目录/root/se ...
- CentOS7 下源码安装 python3
CentOS 7 下源码安装 python3 在CentOS7下,默认安装的是python2.7:为满足项目要求,安装python3 的方法如下: 1. 首先安装python3.6可能使用的依 ...
- CentOS7.3环境下源码安装httpd
CentOS7.3环境下源码安装httpd 本文在CentOS7.3下,源码安装apache服务httpd2.4. 1.下载好源码安装包 [root@localhost ~]#ll total 625 ...
- CentOS7下源码安装5.6.23
清理CentOS7下的MariaDB. [root@localhost ~]#rpm -qa | gremp mariadb [root@localhost ~]# rpm -e --node ...
随机推荐
- jmeter简单录制
JMeter介绍 1.JMeter,一个100%的纯Java桌面应用,它是Apache组织的开放源代码项目,它是功能和性能测试的工具.JMeter可以用于测试静态或者动态资源的性能(文件.Servle ...
- sqlserver学习3---sql函数
一.SQL DML 和 DDL 可以把 SQL 分为两个部分:数据操作语言 (DML) 和 数据定义语言 (DDL). SQL (结构化查询语言)是用于执行查询的语法.但是 SQL 语言也包含用于更新 ...
- t d x 示例z
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServi ...
- 【Leetcode】【Easy】Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the long ...
- XPS 13 9360安装ubuntu 18
XPS 13 9360安装ubuntu 18 标签(空格分隔): Linux 操作系统 1. 雷电口驱动bug 提示更新雷电口驱动bug(thunderbolt nvm for xps noteboo ...
- 基于k8s的ES集群定期删除索引
apiVersion: batch/v1beta1 kind: CronJob metadata: name: elasticsearch namespace: elasticsearch label ...
- JSP中include动作与指令
include指令 JSP中有三大指令:page,include,taglib,之前已经说过了page的用法.这里介绍下include. 使用语法如下: <%@ include file=&qu ...
- 用C#生成不反复的随机数
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/xiebaochun/article/details/28900237 对于随机数,大家都知道,计算机 ...
- [19/03/20-星期三] 常用类_Enum(枚举)类
一.概念(JDK 1.5之后才有的类) 所有的枚举(英语:enumeration) 类型隐性地继承自 java.lang.Enum.枚举实质上还是类,而每个被枚举的成员实质就是一个枚举类型的实例,他们 ...
- 分享一个关于pthread线程栈在mm_struct里面的分布问题
大家好,本人被下面这个问题困扰了一段时间,最近似乎找到了答案. 这里和大家分享一下,可能对有相同困惑的同学有点帮助,同时也请各位帮忙看看错漏的地方. 1================问题: 在使用p ...