源码安装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 ...
随机推荐
- AE常用代码(标注要素、AE中画带箭头的线、如何获得投影坐标、参考坐标、投影方式、FeatureCount注意事项)
手上的电脑已经用了将近三年了,想入手一台Surface Pro,所以计划着把电脑上的资料整理下,部分资料打算发到博客上来,资料有同事.也有自己的.也有来自网络的,来源途径太多,也没法详细注明,请见谅! ...
- maven学习(一)setting.xml配置文件详解
maven环境搭建: 1.官网下载zip包,解压至任意目录(如:E:\wly\apache-maven-3.2.5) 2.环境变量MAVEN_HOME(E:\wly\apache-maven-3.2. ...
- maven---Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 Failure to transfer or ...
- Siebel应用数据结构层次
在Siebel应用里数据在多个层次上使用了不同的定义方式,每一个层次侧重于数据的不同的特征,主要分为数据用户界面层定义(UI),业务逻辑层定义(Business Layer,可以是业务含义层)以及数据 ...
- JSP中include动作与指令
include指令 JSP中有三大指令:page,include,taglib,之前已经说过了page的用法.这里介绍下include. 使用语法如下: <%@ include file=&qu ...
- Ext,合计保留两位小数
1. features: [{ ftype: 'summary', dock: 'bottom' }], 2. summaryType: function(records){ return '合计'; ...
- 【转载】SSH login without password 免密登陆
Your aim You want to use Linux and OpenSSH to automate your tasks. Therefore you need an automatic l ...
- Android NDK r8 Cygwin CDT 在window下开发环境搭建 安装配置与使用 具体图文解说
版权声明:本博客全部文章均为原创.欢迎交流.欢迎转载:转载请勿篡改内容,而且注明出处,谢谢! https://blog.csdn.net/waldmer/article/details/3272500 ...
- LA 4987 背包
题意: 有n个施工队,给定他们的位置,有m个防空洞,给定位置,求将施工队放到m个防空洞里面,最少的总距离? n<=4000 分析: dp[i][j] 前 i 个施工队,放到前 j 个防空洞里面的 ...
- Gulp 方法
Gulp有5个基本方法:src.dest.task.run.watch Gulp.src() gulp模块的src方法,用于产生数据流.它的参数表示索要处理的文件,一般有以下几种形式: js ...